cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl, squid proxy, failing multipart post

From: <man_at_tfhs.net>
Date: Thu, 5 May 2005 18:38:43 -0000

On Thu, May 5, 2005, Daniel Stenberg <daniel-curl_at_haxx.se> said:

> On Thu, 5 May 2005 man_at_tfhs.net wrote:
>
>> if i do not have that header enabled in libcurl, then proxyauth on
>> multi-part post does not seem to work. headers are sent without auth, squid
>> responds with a 407 (and libcurl prints that out when verbosity is turned
>> up) but libcurl then sends the post body anyway, and then hangs, waiting for
>> timeout.
>
> This sounds like a bug. Do you know when/why it hangs? Any way I can repeat
> this scenario?

i am getting a tcp dump now, i will send it to you directly rather than to
the list. basically, 14 packets come in, then no more, and after the
timeout, libcurl returns. it likely could have returned sooner on seeing
the FIN's from the squid box

the config is pretty simple.

1. http server and libcurl client on same machine (ip ...7) fc2 linux box
2. squid on rh9 linux machine (ip ...9)

libcurl pseudocode:

headers = curl_slist_append(headers, "Expect:");
curl_formadd(...);
curl_easy_setopt(mycurl, CURLOPT_HTTPHEADER, headers)
curl_easy_setopt(mycurl, CURLOPT_URL...
curl_easy_setopt(mycurl, CURLOPT_HTTPPOST...
curl_easy_setopt(mycurl, CURLOPT_PROXY...
curl_easy_setopt(mycurl, CURLOPT_PROXYUSERPWD...
curl_easy_setopt(mycurl, CURLOPT_PROXYAUTH,
   CURLAUTH_BASIC|CURLAUTH_DIGEST|CURLAUTH_NTLM)
curl_easy_perform(mycurl);

squid is the stock compile that comes with rh9, but i added PAM to its
config. i can detail that if you need.

allan
Received on 2005-05-05