http_proxy: Ignore TE and CL in CONNECT 2xx responses
authorJay Satiro <raysatiro@yahoo.com>
Sat, 11 Mar 2017 23:21:31 +0000 (18:21 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 11 Mar 2017 23:22:42 +0000 (18:22 -0500)
commitec1d0ed1c14d1b2ed06d8914c19b3df2da575005
treeeb6ef16bc243593a4b6ea4e2f2c17afcb582c0b3
parente08c0cd3275727978b69a1087bcebe0e38a5c9c9
http_proxy: Ignore TE and CL in CONNECT 2xx responses

A client MUST ignore any Content-Length or Transfer-Encoding header
fields received in a successful response to CONNECT.
"Successful" described as: 2xx (Successful). RFC 7231 4.3.6

Prior to this change such a case would cause an error.

In some ways this bug appears to be a regression since c50b878. Prior to
that libcurl may have appeared to function correctly in such cases by
acting on those headers instead of causing an error. But that behavior
was also incorrect.

Bug: https://github.com/curl/curl/issues/1317
Reported-by: mkzero@users.noreply.github.com
lib/http_proxy.c
tests/data/Makefile.inc
tests/data/test1287 [new file with mode: 0644]