feat(body): Update Payload to be a trait alias of http_body::Body (#1908)
				
					
				
			This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							49b12c415d
						
					
				
				
					commit
					79c32f8953
				
			| @@ -289,19 +289,10 @@ where | ||||
|                     } | ||||
|  | ||||
|                     // automatically set Content-Length from body... | ||||
|                     if let Some(len) = body.content_length() { | ||||
|                     if let Some(len) = body.size_hint().exact() { | ||||
|                         headers::set_content_length_if_missing(res.headers_mut(), len); | ||||
|                     } | ||||
|  | ||||
|                     if let Some(full) = body.__hyper_full_data(FullDataArg(())).0 { | ||||
|                         let mut body_tx = reply!(false); | ||||
|                         let buf = SendBuf(Some(full)); | ||||
|                         body_tx | ||||
|                             .send_data(buf, true) | ||||
|                             .map_err(crate::Error::new_body_write)?; | ||||
|                         return Poll::Ready(Ok(())); | ||||
|                     } | ||||
|  | ||||
|                     if !body.is_end_stream() { | ||||
|                         let body_tx = reply!(false); | ||||
|                         H2StreamState::Body(PipeToSendStream::new(body, body_tx)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user