aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-08-25 13:42:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-08-25 13:42:14 +0200
commit6b6a3bcb61f2d8f4e80a1e2a5bc62e78904256ed (patch)
tree210ebaa16337c5758c0162fc56381a55abe58e27 /lib/http.c
parent0cbdcd07a8b176376cf8b57ba89b8717cdd40d5b (diff)
http: handle trailer headers in all chunked responses
HTTP allows that a server sends trailing headers after all the chunks have been sent WITHOUT signalling their presence in the first response headers. The "Trailer:" header is only a SHOULD there and as we need to handle the situation even without that header I made libcurl ignore Trailer: completely. Test case 1116 was added to verify this and to make sure we handle more than one trailer header properly. Reported by: Patrick McManus Bug: http://curl.haxx.se/bug/view.cgi?id=3052450
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/http.c b/lib/http.c
index 2d0e78af3..3d6f977ea 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -3647,20 +3647,6 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
/* init our chunky engine */
Curl_httpchunk_init(conn);
}
-
- else if(checkprefix("Trailer:", k->p) ||
- checkprefix("Trailers:", k->p)) {
- /*
- * This test helps Curl_httpchunk_read() to determine to look
- * for well formed trailers after the zero chunksize record. In
- * this case a CRLF is required after the zero chunksize record
- * when no trailers are sent, or after the last trailer record.
- *
- * It seems both Trailer: and Trailers: occur in the wild.
- */
- k->trailerhdrpresent = TRUE;
- }
-
else if(checkprefix("Content-Encoding:", k->p) &&
data->set.str[STRING_ENCODING]) {
/*