Re: libcurl, squid proxy, failing multipart post
Date: Mon, 2 May 2005 18:04:40 -0000
yes, i have just compiled 7.13.2 into /usr/local, and linked my app
against it. Multi-part post now works thru default squid proxy, thanks! I
have yet to test proxyauth stuff, however.
i was using the version that came with FC2 before, So now i think i will
try to make an rpm of 7.13.2 that will drop-in replace the old one, since
the rpms listed on the downloads page require too many dependency upgrades
i notice that the 7.11.1 was libcurl.so.2, and 7.13.2 is libcurl.so.3.
will it be ok to symlink the .2 to the new libcurl, or should i attempt to
maintain the old lib for compatability?
On Mon, May 2, 2005, Ralph Mitchell <ralphmitchell_at_gmail.com> said:
> First off, would it be possible for you to update to the latest
> version, which is 7.13.2?? The one you're using dates back to March
> 2004. Source is here:
> The ChangeLog (linked in the Related box, top right of the above page)
> shows a lot of changes. You may be tripping a bug that's already been
> Ralph Mitchell
> On 5/2/05, man_at_tfhs.net <man_at_tfhs.net> wrote:
>> first, thanks for libcurl. i had been beating my head against libwww for a
>> couple weeks, when i found libcurl. much easier to use, and it actually
>> seems to work :)
>> now, my problem:
>> C app that multipart posts a memory buffer as if it were a file upload,
>> along with a couple short (<20 chars) textual variables. i have installed
>> a call-back for libcurl to write to, and i can post and receive the
>> response into memory just fine. all is well, until i try to pass thru a
>> squid proxy.
>> the setup: the posting app (using libcurl 7.11.1) and the http server
>> (apache 2.0.x/modperl 1.99.x) are both on my desktop machine. the squid
>> proxy is another machine on the same subnet. if i use mozilla from the
>> app/server machine to post the same data to the same url as my app, it
>> works. if i use libcurl in my app, it times out.
>> i take tcpdump on the proxy, for all packets from the app/server machine.
>> what i see is:
>> ******* working mozilla **************
>> mozilla sends http headers and post contents to proxy in 4 sequential
>> packets. (squid ACK after each). the http headers are split across the
>> first two packets. it does not use the Expect: header. it is an http 1.1
>> then, squid opens a connection back to port 80, and sends the request in
>> three packets quickly, the 3 ACKs appear to come back from apache after
>> the last. the headers are all in the first packet, the post body is in
>> two, larger segments, but is otherwise the same. it is an http 1.0 post.
>> apache returns 200 to squid, the connection is torn down. this is http 1.1
>> squid returns 200 to the app, the connection is torn down. this is http
>> ********** non-working my app **************
>> app sends http headers in a single packet, gets an ACK. the post body is
>> never sent. I do not use the Expect: header.
>> squid opens a connection to post 80, sends the headers, gets an ack.
>> then we wait. app times out, and tears down connection to squid.
>> squid tears down connection to httpd. httpd returns 200 OK during the
>> teardown, and squid sends RST.
>> ok, so i am sure this is something i am doing, but it looks like even
>> though i have Expect: turned off, libcurl is still waiting instead of
>> sending the post body. i have searched around quite a bit, but did not see
>> any answers.
>> things to try? suggestions?
>> thanks for any help you can give.
--Received on 2005-05-02