cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Problem understanding Keep-Alive and Squid

From: Mohamed Lrhazi <lrhazi_at_gmail.com>
Date: Sun, 21 May 2006 17:41:48 -0400

Hello,

I need to send PURGE requests to Squid servers and would like it all
to happen pipelined using HTTP Keep-Alive...
When I try using GET method, keep alive seems to work fine:

Testing libcurl/7.15.3 OpenSSL/0.9.8b zlib/1.1.4
DEBUG: 0: About to connect() to proxy 10.0.4.2 port 80
DEBUG: 0: Trying 10.0.4.2...
DEBUG: 0: connected
DEBUG: 0: Connected to 10.0.4.2 (10.0.4.2) port 80
DEBUG: 2: GET http://yaqb.org/test-cache/test.html HTTP/1.1
DEBUG: 2: User-Agent: PycURL/7.15.3
DEBUG: 2: Host: yaqb.org
DEBUG: 2: Pragma: no-cache
DEBUG: 2: Accept: */*
DEBUG: 2: Proxy-Connection: Keep-Alive
DEBUG: 1: HTTP/1.0 200 OK
DEBUG: 1: Server: Zeus/4.3
DEBUG: 1: Date: Sun, 21 May 2006 21:32:26 GMT
DEBUG: 1: Content-Length: 29
DEBUG: 1: Accept-Ranges: bytes
DEBUG: 1: Content-Type: text/html
DEBUG: 1: Last-Modified: Sun, 21 May 2006 04:32:45 GMT
DEBUG: 1: X-Cache: MISS from yscache2.your-site.com
DEBUG: 0: HTTP/1.0 proxy connection set to keep alive!
DEBUG: 1: Proxy-Connection: keep-alive
DEBUG: 0: Connection #0 to host 10.0.4.2 left intact

When switch to method PURGE using: c.setopt(c.CUSTOMREQUEST,'PURGE')
I then get:

Testing libcurl/7.15.3 OpenSSL/0.9.8b zlib/1.1.4
DEBUG: 0: About to connect() to proxy 10.0.4.2 port 80
DEBUG: 0: Trying 10.0.4.2...
DEBUG: 0: connected
DEBUG: 0: Connected to 10.0.4.2 (10.0.4.2) port 80
DEBUG: 2: PURGE http://yaqb.org/test-cache/test.html HTTP/1.1
DEBUG: 2: User-Agent: PycURL/7.15.3
DEBUG: 2: Host: yaqb.org
DEBUG: 2: Pragma: no-cache
DEBUG: 2: Accept: */*
DEBUG: 2: Proxy-Connection: Keep-Alive
DEBUG: 1: HTTP/1.0 200 OK
DEBUG: 1: Server: squid/2.5.STABLE13
DEBUG: 1: Mime-Version: 1.0
DEBUG: 1: Date: Sun, 21 May 2006 21:32:57 GMT
DEBUG: 1: Content-Length: 0
DEBUG: 0: Closing connection #0

Is it cURL or Squid that causes Keep-Alive to not be used when I
swtich the HTTP method from GET to PURGE?

Thanks,
Mohamed~
Received on 2006-05-21

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET