[squid-users] why-squid-reuse-headers-from-parent-but-not-the-html-body-when-not-200-ok

Amos Jeffries squid3 at treenet.co.nz
Fri Feb 3 17:40:24 UTC 2023


On 4/02/2023 4:08 am, Tom JABBER wrote:
> Hi,
>
> I'm looking for some help regarding some awkward behaviors I see on 
> squid proxies when they are chained (one proxy with one parent proxy):
>
> As said in subject, if parent proxy returns a non 200 OK code along 
> with some HTML body, "child" proxy reuses parent headers, which is 
> already a matter of discussion, and among other headers, a 
> content-length > 0 while not forwarding the HTML received from parent.
>
> cf. 
> https://superuser.com/questions/1765082/why-squid-reuse-headers-from-parent-but-not-the-html-body-when-not-200-ok
>
> Would there be anyone here willing to help ?
>

Because you are using curl, and the method is CONNECT.

curl does the same thing when receiving errors directly from web servers:

## curl -v -x 93.184.216.34:80 https://example.com/
*   Trying 93.184.216.34:80...
* Connected to 93.184.216.34 (93.184.216.34) port 80 (#0)
* allocate connect buffer
* Establish HTTP proxy tunnel to example.com:443
 > CONNECT example.com:443 HTTP/1.1
 > Host: example.com:443
 > User-Agent: curl/7.87.0
 > Proxy-Connection: Keep-Alive
 >
< HTTP/1.1 400 Bad Request
< Content-Type: text/html
< Content-Length: 349
< Connection: close
< Date: Fri, 03 Feb 2023 17:25:19 GMT
< Server: ECSF (oxr/8326)
<
* CONNECT tunnel failed, response 400
* Closing connection 0
curl: (56) CONNECT tunnel failed, response 400



Cheers
Amos



More information about the squid-users mailing list