HTTP encode. Remove Transfer-Encoding header
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 16 May 2013 08:53:28 +0000 (10:53 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 16 May 2013 08:53:28 +0000 (10:53 +0200)
YAZ uses content_len and full response anyway, so a Transfer-Encoding
header will obstruct the response.

src/http.c

index d16db35..005a2e6 100644 (file)
@@ -578,7 +578,8 @@ int yaz_encode_http_response(ODR o, Z_HTTP_Response *hr)
     odr_write2(o, sbuf, strlen(sbuf));
     for (h = hr->headers; h; h = h->next)
     {
-        if (yaz_matchstr(h->name, "Content-Length"))
+        if (yaz_matchstr(h->name, "Content-Length")
+            && yaz_matchstr(h->name, "Transfer-Encoding"))
         {   /* skip Content-Length if given. content_len rules */
             odr_write2(o, h->name, strlen(h->name));
             odr_write2(o, ": ", 2);