1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-02 13:29:24 +00: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
## [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
### Fixed

View file

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