mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 01:51:23 +02:00
Refactoring of server output to not exclude HTTP_10 (#552)
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user