cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Pragma: header

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 3 Dec 2005 13:39:49 +0100 (CET)

On Sat, 3 Dec 2005, Dirk Haun wrote:

> The author of Bad Behavior points out that RFC2616 requires that a Pragma:
> header to be accompanied by a Cache-Control: header. From what I see, it
> only says "SHOULD" (in section 14.32), but that is still a strong
> recommendation and something to be considered, IMHO.

Thanks for putting the light on this RFC compliance deviation.

Before we venture down the road and argue about that curl should or should not
send, let me bounce back another RFC2616 (section 14.32) quote:

    HTTP/1.1 caches SHOULD treat "Pragma: no-cache" as if the client had
    sent "Cache-Control: no-cache".

(That makes a SHOULD for the client that curl doesn't adhere to, and another
SHOULD for the cache that Bad Behavior doesn't adhere to...)

Further, you can disable that pragma header or add a Cache-Control: header at
will.

Also, curl has sent this header since day 1 and this is the first time someone
says it is non-conforming. I would rather claim that the server/cache is wrong
in this aspect. But I guess that's the point of Bad Behavior, being very
strict in how it interpret the request. Too strict I'd say.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-12-03