From bbee19ced23fbe0757752b80a7a03258ffc6c9b6 Mon Sep 17 00:00:00 2001 From: Pavel Pautov <37922380+p-pautov@users.noreply.github.com> Date: Wed, 4 Apr 2018 19:08:20 -0700 Subject: [PATCH] Content-Length and Transfer-Encoding are mutually exclusive. --- libfreerdp/core/gateway/http.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 libfreerdp/core/gateway/http.c diff --git a/libfreerdp/core/gateway/http.c b/libfreerdp/core/gateway/http.c old mode 100644 new mode 100755 index a249a6d38..2a30b449d --- a/libfreerdp/core/gateway/http.c +++ b/libfreerdp/core/gateway/http.c @@ -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) {