From: Adam Dickmeiss Date: Thu, 16 May 2013 08:13:50 +0000 (+0200) Subject: http_client: remove Transfer-Encoding from resp MK-445 X-Git-Tag: v1.3.56~6 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=19317eb63692c8039849a70e71e7619d71679502;p=metaproxy-moved-to-github.git 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. --- 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