From 19317eb63692c8039849a70e71e7619d71679502 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 16 May 2013 10:13:50 +0200 Subject: [PATCH] http_client: remove Transfer-Encoding from resp MK-445 The Transfer-Encoding should not be relay'ed back to frontend_net etc.. This will cause a bad response. --- src/filter_http_client.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/filter_http_client.cpp b/src/filter_http_client.cpp index 7703a97..74a1aa8 100644 --- a/src/filter_http_client.cpp +++ b/src/filter_http_client.cpp @@ -92,6 +92,14 @@ void yf::HTTPClient::Rep::proxy(mp::Package &package) if (http_response) { res_gdu = o.create_HTTP_Response(package.session(), hreq, 200); + Z_HTTP_Header **hp = &http_response->headers; + while (*hp) + { + if (!yaz_matchstr((*hp)->name, "Transfer-Encoding")) + *hp = (*hp)->next; + else + hp = &(*hp)->next; + } res_gdu->u.HTTP_Response = http_response; } else -- 1.7.10.4