curl-library
Re: SSL Server reciving Curl data
Date: Sun, 6 Apr 2003 09:41:40 +0200 (CEST)
On Fri, 4 Apr 2003, Fisk, Kevin wrote:
> I have OpenSSL server code to receive requests from the Curl binary. Prior
> to 7.10.2, the entire HTTP request was sent in one burst and I could rely
> on getting the entire request in the first block. I was having problems,
> and Daniel told me that after 7.10.2, the request headers were sent in one
> block and then the post data in another. I was told to look at the
> content-length to determine how much data I needed to process.
That would be a generally good approach to work with HTTP 1.1-compliant
posts, AFAIK.
(We'll work on getting the next release of libcurl use as few write()s as
possible so it might go back to the previous behavior for you then...)
> So, I changed my server. I receive the header in one block, as I expect,
> but then there is no data to be received (I do a 30 second timeout, so I
> allow plenty of time for it to come). The socket never sees any more data.
I find that very odd. In curl's test suite, we have our own HTTP server code
as well, and that works fine with all curl versions 7.10.2, 7.10.3 and
7.10.4.
It sounds as if you've made a mistake somewhere.
> Do I need to acknowledge receipt of the header before the post data is
> sent?
No. There is an "acknowledge" system in HTTP 1.1 called the Expect:
100-continue, but 1) libcurl only uses it by default for formposts and 2) it
times out if no 100 continue (or a failure code) is returned rather soon.
> Do I need to use SSL_renegotiate? The OpenSSL applicate S_SERVER receives
> all of the data from the Curl binary with no problem. I'm not clear what
> I'm doing wrong.
I don't know either.
> Is this question more appropriate for the OpenSSL list?
I think it is hard to say if you've done an OpenSSL error or some other plain
data/socket related error. I do however believe that libcurl does it right,
since posting (using SSL or not) works fine on a large amount of servers all
over.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/Received on 2003-04-06