cURL / Mailing Lists / curl-library / Single Mail

curl-library

Pragma: no-cache

From: Alexander Agranovsky <alex_at_voxeo.com>
Date: Tue, 11 Nov 2008 18:27:53 -0500

I've noticed, that when the request is sent through a proxy, "Pragma:
no-cache" header is appended even when application did not request it.

I've tracked it to the following code in http.c:

   http->p_pragma =
     (!checkheaders(data, "Pragma:") &&
      (conn->bits.httpproxy && !conn->bits.tunnel_proxy) )?
     "Pragma: no-cache\r\n":NULL;

Isn't there bug in it? E.g. I'd see how we want to turn caching off
when tunneling through a proxy, but if the tunneling is off, and proxy
is used -- why set "Pragma: no-cache" by default?

Or did I miss something? Is there any way to not introduce this header
without tunneling?

Thanks,
Alex Agranovsky
Received on 2008-11-12