1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

Refactoring of server output to not exclude HTTP_10 (#552)

This commit is contained in:
Douman 2018-10-19 07:52:10 +03:00 committed by GitHub
parent f383f618b5
commit 960274ada8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -1,5 +1,11 @@
# Changes # Changes
## [0.7.14] - 2018-10-x
### Fixed
* HttpServer now treats streaming bodies the same for HTTP/1.x protocols. #549
## [0.7.13] - 2018-10-14 ## [0.7.13] - 2018-10-14
### Fixed ### Fixed

View File

@ -300,10 +300,10 @@ impl Output {
Some(true) => { Some(true) => {
// Enable transfer encoding // Enable transfer encoding
info.length = ResponseLength::Chunked; info.length = ResponseLength::Chunked;
if version == Version::HTTP_11 { if version == Version::HTTP_2 {
TransferEncoding::chunked(buf)
} else {
TransferEncoding::eof(buf) TransferEncoding::eof(buf)
} else {
TransferEncoding::chunked(buf)
} }
} }
Some(false) => TransferEncoding::eof(buf), Some(false) => TransferEncoding::eof(buf),
@ -337,10 +337,10 @@ impl Output {
} else { } else {
// Enable transfer encoding // Enable transfer encoding
info.length = ResponseLength::Chunked; info.length = ResponseLength::Chunked;
if version == Version::HTTP_11 { if version == Version::HTTP_2 {
TransferEncoding::chunked(buf)
} else {
TransferEncoding::eof(buf) TransferEncoding::eof(buf)
} else {
TransferEncoding::chunked(buf)
} }
} }
} }