mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 18:09:22 +02:00
HttpServer not sending streamed request body on HTTP/2 requests #544
This commit is contained in:
@ -299,12 +299,11 @@ impl Output {
|
||||
match resp.chunked() {
|
||||
Some(true) => {
|
||||
// Enable transfer encoding
|
||||
if version == Version::HTTP_2 {
|
||||
info.length = ResponseLength::None;
|
||||
TransferEncoding::eof(buf)
|
||||
} else {
|
||||
info.length = ResponseLength::Chunked;
|
||||
info.length = ResponseLength::Chunked;
|
||||
if version == Version::HTTP_11 {
|
||||
TransferEncoding::chunked(buf)
|
||||
} else {
|
||||
TransferEncoding::eof(buf)
|
||||
}
|
||||
}
|
||||
Some(false) => TransferEncoding::eof(buf),
|
||||
@ -337,15 +336,11 @@ impl Output {
|
||||
}
|
||||
} else {
|
||||
// Enable transfer encoding
|
||||
match version {
|
||||
Version::HTTP_11 => {
|
||||
info.length = ResponseLength::Chunked;
|
||||
TransferEncoding::chunked(buf)
|
||||
}
|
||||
_ => {
|
||||
info.length = ResponseLength::None;
|
||||
TransferEncoding::eof(buf)
|
||||
}
|
||||
info.length = ResponseLength::Chunked;
|
||||
if version == Version::HTTP_11 {
|
||||
TransferEncoding::chunked(buf)
|
||||
} else {
|
||||
TransferEncoding::eof(buf)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user