cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

[ curl-Bugs-674095 ] http request hangs on win32 under certain circumstances

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 24 Jan 2003 08:04:31 -0800

Bugs item #674095, was opened at 2003-01-24 08:04
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=674095&group_id=976

Category: libcurl
Group: hang
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: http request hangs on win32 under certain circumstances

Initial Comment:
OK, here is a quite peculiar problem. We use libcurl to
perform background downloads in our win32 app. The
application creates a thread in which curl
(easy-interface) is run.

Now we found on peculiar seup where a simple http get
request will hang. This is tested and reproducible
under WindowsXP

The situation and flow of events on our test laptop is
this:
- the PC was at home and got a DHCP setup from the
cable modem provide
- the DHCP setup however is flawed as it has an
infinite lease time
- when connecting the PC in the office, Windows thinks
that we are connected and has a valid lease and does
NOT refresh the DHCP setup from the firewall box
- network connections do not work (i.e. MSN does not
connect)
- to fix this, the usual course of action is to disable
the network interface and the reenable it
- now network connections do work (i.e. MSN connects)
- the app with the pending curl request in the thread
hangs however
- a timeout of 1 hour (or shorter) was set but doesn't
get triggered

As far as I can tell, possible causes of this could be:
- timeout does not work
- timeout does not work because of our threading
- windows API is f***ed and hangs (I guess MSN has the
homeboy advantage)

I am not sure where it hangs inside curl - haven't
debugged this far yet. As far as solutions go, maybe it
would be possible to add an optional TCP "quickcheck"
on the connection before any gethostbyname/connect call
- a check that does not hang but verifies that a
condition exists which allows for the call to proceed.
In fact such a IsConnected() call would be a nice
addition to libcurl. (The win32 API IsConnected() does
for example not work well.)

Please CC any comments and ideas also to
aschiffler_at_appwares.com.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=674095&group_id=976

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-01-24

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET