mirror of
https://github.com/curl/curl.git
synced 2026-08-26 20:23:32 +03:00
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
This commit is contained in:
parent
0cbdcd07a8
commit
6b6a3bcb61
6 changed files with 150 additions and 107 deletions
|
|
@ -5300,10 +5300,8 @@ static CURLcode do_init(struct connectdata *conn)
|
|||
static void do_complete(struct connectdata *conn)
|
||||
{
|
||||
conn->data->req.chunk=FALSE;
|
||||
conn->data->req.trailerhdrpresent=FALSE;
|
||||
|
||||
conn->data->req.maxfd = (conn->sockfd>conn->writesockfd?
|
||||
conn->sockfd:conn->writesockfd)+1;
|
||||
conn->sockfd:conn->writesockfd)+1;
|
||||
}
|
||||
|
||||
CURLcode Curl_do(struct connectdata **connp, bool *done)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue