cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: hanging URL

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 20 Sep 2000 23:09:37 +0200 (MET DST)

On Wed, 20 Sep 2000, Priebe, Jason wrote:

> The only obvious difference I can see so far is that the first two tools
> sent hex 0x0D 0x0A 0x0D 0x0A to end their requests, and the second two
> only sent 0x0D 0x0A.
>
> This is strange, since I definitely hit "return" twice within my telnet
> session. And I would think that curl would send the CR-LF combination
> twice.

Try this:

Curl normally sends its entire request in two write()s. The first write() is
everything except the last CR-LF. Then it sends the final CR-LF separately.
The reason for this, is that this way enables curl to fill in custom headers,
cookies and whatever in between the write()s.

So what you see is the first package. The second package should come later.
However, if there's a TCP problem somewhere along the "road", it wouldn't
surprise me if you can get this to work by sending everything in one single
shot. (You only need to modify the curl source code slightly to test this
theory -- of course you'll disable a few features but this is for testing.)

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2000-09-20