File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 53
53
54
54
// If we have reference to the stream, unwrap it. Otherwise,
55
55
// get the underlying stream from the request
56
- let to_decode = decoded. into_stream ( ) ;
56
+ let to_decode = decoded. into_reader ( ) ;
57
57
58
58
// Copy the response into the writer
59
59
io:: copy ( & mut res, & mut writer) . await ?;
@@ -264,10 +264,11 @@ impl DecodedRequest {
264
264
}
265
265
}
266
266
267
- /// Consume self and get access to the underlying stream
267
+ /// Consume self and get access to the underlying reader
268
268
///
269
- /// If the request has a body, the underlying stream is t
270
- fn into_stream ( self ) -> Box < dyn BufRead + Unpin + Send + ' static > {
269
+ /// When the request has a body, the underlying reader is the body.
270
+ /// When it does not, the underlying body has been passed alongside the request.
271
+ fn into_reader ( self ) -> Box < dyn BufRead + Unpin + Send + ' static > {
271
272
match self {
272
273
DecodedRequest :: WithBody ( r) => r. into_body_reader ( ) ,
273
274
DecodedRequest :: WithoutBody ( _, s) => s,
You can’t perform that action at this time.
0 commit comments