cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Another wierd curl (6.5.2) problem

From: Daniel Stenberg <daniel.stenberg_at_netinsight.se>
Date: Wed, 26 Apr 2000 08:28:45 +0200

Spambait wrote:

> This command, on my Linux 2.2.14 system, will wait forever for data from the
> remote side:
>
> curl -A 'Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)' -o test.html
> http://www.terraserver.com/bad.html

That host seems to run a IIS 4.0 server.

> Attempting to send the same exact HTTP command with 'nc' results in the correct
> (Error) response.

I don't know what nc is or what it does, but you say the *exact* same HTTP
command is sent?

> My quick stab at the problem is noting that under 'curl', and not under nc,
> the request is sent in two packets:
> (1)
> GET ...
>
> (2)
>
>
> While this is probably an issue with the server, curl's strength has been it's
> ability to interface with these irksome beasts.

If this is the only difference in how the commands are sent, then yes that
would look like the triggering factor that causes this effect to happen.

However, I just can't understand how IIS can dependend on this. In the entire
internet, there are 20% windows machines running web servers. I bet the
majority of those are running IIS. How come nobody else got this problem ever
before? Also, it is a pretty serious implementation flaw in my opinion.

It really isn't that simple to make curl send the command(s) in a different
way. Curl has the ability to send a lot of different things as you know, and a
lot of those things would "get in" between the "GET" and the final "\r\n"
sequence.

Let's try a silly workaround first, what if you add some non-important headers,
like

 curl -H "X-hey: boo" ...

Does it still do the same?

--
 Daniel Stenberg, Software Developer
 Daniel.Stenberg_at_haxx.nu, +46-705-443177, www.contactor.se/~dast
 Swedish geeks unite: http://www.haxx.nu/home/
Received on 2000-04-26