cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to fully customize the HTTP request

From: Alexander Lazic <al-curllibrary_at_none.at>
Date: Sun, 21 May 2006 20:21:55 +0200

On Son 21.05.2006 13:30, Mohamed Lrhazi wrote:
>
>You're right maybe Squid does not support keep-alive for Proxying or
>maybe for PURGE method....

Hm keep-alive i think he can, but i'am not sure.

>I tried and it clearly opens a tcp connection per url:
>
>netstat -an|grep '\.80'; python purge-curl.py; netstat -an|grep '\.80'
>Testing libcurl/7.15.3 OpenSSL/0.9.8b zlib/1.1.4
>HTTP_CONNECTCODE: 0
>RESPONSE_CODE: 200
>HTTP_CONNECTCODE: 0
>RESPONSE_CODE: 404
>HTTP_CONNECTCODE: 0
>RESPONSE_CODE: 404

[snipp]

I think there is a problem i the logic, because when you purge a url in
squid he can't have it in the cache and therefore you get 404.

What i have mean im my example was:

for i in url1 url2 url4; ... fi

Sorry for the bad explanation.

>When I send normal GET request, the same script above, with PROXY
>option, reports one and only one tcp:80 connection.

Well this could be the keep-alive feature in squid ;-)

>So, how do I go about getting a CURLOPT_CUSTOMPATH? where can I ask?

Sorry but i don't really understand what do you want with this option.

>are you a cURL devolopper? I have not programmed in C for many years,
>so I feel I should not be messing with the code...

Sorr no, i'am a big fan an a user nothing more ;-)

regards

Alex

>On 5/21/06, Alexander Lazic <al-curllibrary_at_none.at> wrote:
>>On Son 21.05.2006 11:45, Mohamed Lrhazi wrote:
>> >
>> >Actually I cannot use the CURLOPT_PROXY workaround because It does not
>> >seem to use KEEP-ALIVE... and I need KEEP-ALIVE because I have too much
>> >PURGE requests to send....
>>
>>Does squid support keep-alive for the purge method?!
>>
>>I'am not very familiar with the python interface but how about this in
>>pseudo-code:
>>
>>setopt(...)
>>setopt(...)
>>setopt(...)
>>
>>for i in urls;
>>
>>setopt(URL,$i);
>>execute();
>>
>>fi
>>
>>In c/perl i would go this way.
Received on 2006-05-21