curl-library
Re: Curl hangs if protocol does not match port
Date: Fri, 27 Aug 2004 09:22:45 -0700
On Fri, Aug 27, 2004 at 05:41:50PM +0300, Andrei Tarassov wrote:
> Hi!
>
> I have encountered a very strange problem with curl_easy_perform()
> hanging when you specify an incorrect protocol in an URL.
> I took https.c from curl documentation and simply changed URLs.
>
> I noticed that the following URLs would hang:
> https://www.hotmail.com:80/
> https://www.altiris.com:80/
>
> I thought that the problem occurred only with IIS/5.0 servers, but for
> example, https://www.athens2004.com:80 returns an error immediately.
>
> What makes the problem even more strange is that it seems not to be
> curl-specific. For example, my Mozilla Firefox and IE were also hanging
> on the addresses above, while returning an error on other URLs.
>
> Has anyone encountered the same problem, knows the reason of it and how
> it could be worked around?
Those URLs are requesting SSL connections to non-SSL ports, which initiates
an SSL/TLS handshaking sequence on a port on which the server is expecting
a plain-text HTTP request. What such a server does when presented with such
a handshaking sequence is probably implementation-defined; some servers
might return an HTTP error code which SSL interprets as garbage and causes
it to close the connection, while other servers might wait indefinitely for
a valid HTTP request, causing an apparent hang.
In any case, you can't depend on any particular behaviour when you're trying
to do something nonsensical like this.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2004-08-27