cURL / Mailing Lists / curl-users / Single Mail

curl-users

Pragma: header

From: Dirk Haun <dirk_at_haun-online.de>
Date: Sat, 3 Dec 2005 12:06:28 +0100

Hi,

I ran into the following problem: On a website I'm administrating, we
are using an HTTP filter called Bad Behavior, <http://
error.wordpress.com/>. It basically does two things:

1) Block known spambots by their signature,
2) Block any non-conforming HTTP requests.

When I installed the new version (1.2.4) yesterday, it started blocking
requests sent by curl:

--- snip ---
IP Address: ...
Date: 2005-12-02 21:51:00
Reason: Header 'Pragma' without 'Cache-Control' prohibited for HTTP/1.1
requests

GET /index.php HTTP/1.1
Accept: */*
Host: www.geeklog.net
Pragma: no-cache
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
--- snip ---

(the IE user agent string is set in my .curlrc)

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.

The above request was sent using "curl -O <url>" with the current
version, 7.15.0.

bye, Dirk
Received on 2005-12-03