cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: server works with curl 7.9.8, but not 7.10.4 and above

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 27 May 2003 10:06:08 +0200 (CEST)

On Tue, 27 May 2003, Rudy Koento wrote:

> I've trouble connecting to a SMC wireless AP (SMC2655W) using curl 7.10.4
> (and .5 and cvs version).
> It works before with curl 7.9.8.

I have a fairly good idea of what's causing your problem. And it isn't really
connecting that is the problem, right?

> I run the command:
> $ ./curl -d "passwd=default" 192.168.2.50/cgi-bin/login_post -v

[cut out curl traces]

> From the log, seems that "passwd=default" is passed after the "HTTP/1.0 200
> OK"? This is not the case when I use curl 7.9.8. The "passwd=..." is
> before "HTTP/1.0 ...."

Starting recently, curl does send POST requests in two write()s, while it
previously only used one single write(). The server should not reply anything
until it has received the full POST request, which it hasn't until the 14
bytes after the header have been received.

While this should not matter, your server here is probably badly written to
assume that all data will come at once.

This change was made for several reasons (including allow callbacks to
provide post data and easier transfer-encoding: chunked treatment for posted
data), but I think we can make a fix that for non-chunked posts with static
post data can go back to one single write().

I'll be back soon with a suggested patch to try.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-27