Content-Length and Transfer-Encoding are mutually exclusive.

This commit is contained in:
Pavel Pautov 2018-04-04 19:08:20 -07:00
parent ec42228b2a
commit bbee19ced2

9
libfreerdp/core/gateway/http.c Normal file → Executable file
View File

@ -342,9 +342,6 @@ wStream* http_request_write(HttpContext* context, HttpRequest* request)
lines[count++] = http_encode_body_line("User-Agent", context->UserAgent);
lines[count++] = http_encode_body_line("Host", context->Host);
if (!context->RdgAuthScheme)
lines[count++] = http_encode_content_length_line(request->ContentLength);
if (context->RdgConnectionId)
lines[count++] = http_encode_body_line("RDG-Connection-Id", context->RdgConnectionId);
@ -352,7 +349,13 @@ wStream* http_request_write(HttpContext* context, HttpRequest* request)
lines[count++] = http_encode_body_line("RDG-Auth-Scheme", context->RdgAuthScheme);
if (request->TransferEncoding)
{
lines[count++] = http_encode_body_line("Transfer-Encoding", request->TransferEncoding);
}
else
{
lines[count++] = http_encode_content_length_line(request->ContentLength);
}
if (request->Authorization)
{