Re: HTTP request doesn't time out when Web server not responding

Timothee Besset <[email protected]>
Newsgroups gmane.comp.lib.libwww
Message-ID <[email protected]>
You are using sockets on win32? Maybe you should try WWW_WIN_ASYNC? (I
dunno why the timeout would not work though, just a note)

TTimo

On Mon, 30 Dec 2002 12:45:21 +0100
"Finn Ellebaek Nielsen" <[email protected]> wrote:

> 
> Dear all.
> 
> Windows 2000 Professional SP2
> LibWWW 5.4.0
> 
> I have difficulties getting the HTTP requests to time out when the Web
> server is not responding. For instance, the showtext example sets up a
> timeout of 15 seconds, but it just continues to wait forever. My program
> (with a timeout of 30 seconds) produces the following trace when the Web
> server on localhost is not started:
> 
> Timer....... registering 004076A0 as timer set cbf
> Timer....... registering 00407710 as timer delete cbf
> Event....... registering 00406AC0
> Event....... registering 00406DD0
> Transport... Adding `tcp'
> Transport... Adding `buffered_tcp'
> Transport... Adding `local'
> Protocol.... Adding `ftp'
> Protocol.... Adding `nntp'
> Protocol.... Adding `news'
> Protocol.... Adding `gopher'
> Protocol.... Adding `http'
> Protocol.... Adding `file'
> Protocol.... Adding `cache'
> Protocol.... Adding `telnet'
> Protocol.... Adding `tn3270'
> Protocol.... Adding `rlogin'
> Net Before.. Add 0043BE60 with order 49150 tmplate `http://*' context
> 00000000
> Net Before.. Add 0043CA40 with order 49150 tmplate `http://*' context
> 00000000
> Net Before.. Add 0043B770 with order 49150 tmplate `<null>' context 00000000
> Net Before.. Add 0043B600 with order 49150 tmplate `<null>' context 00000000
> Net After... Add 0043BEF0 with order 32767 tmplate `http://*' code -401
> context 00000000
> Net After... Add 0043BEF0 with order 32767 tmplate `http://*' code -418
> context 00000000
> Net After... Add 0043CCD0 with order 32767 tmplate `http://*' code 1 context
> 00000000
> Net After... Add 0043BB20 with order 32767 tmplate `http://*' code 301
> context 00000000
> Net After... Add 0043BB20 with order 32767 tmplate `http://*' code 302
> context 00000000
> Net After... Add 0043BB20 with order 32767 tmplate `http://*' code 303
> context 00000000
> Net After... Add 0043BB20 with order 32767 tmplate `http://*' code 307
> context 00000000
> Net After... Add 0043BF50 with order 32767 tmplate `http://*' code 1 context
> 00000000
> Net After... Add 0043BD20 with order 32767 tmplate `http://*' code 305
> context 00000000
> Net After... Add 0043B910 with order 49150 tmplate `<null>' code 1 context
> 00000000
> Conversions. Adding 00407A80 with quality 1.00
> Conversions. Adding 004397C0 with quality 1.00
> Conversions. Adding 004399F0 with quality 1.00
> Conversions. Adding 004398D0 with quality 1.00
> Conversions. Adding 00439930 with quality 1.00
> Conversions. Adding 00439990 with quality 1.00
> Conversions. Adding 00439A50 with quality 1.00
> Conversions. Adding 00439D70 with quality 1.00
> Conversions. Adding 004382C0 with quality 1.00
> Conversions. Adding 00437A80 with quality 1.00
> Conversions. Adding 00435EB0 with quality 1.00
> Conversions. Adding 00434060 with quality 1.00
> Conversions. Adding 00434140 with quality 1.00
> Conversions. Adding 00432FC0 with quality 1.00
> Conversions. Adding 004318F0 with quality 1.00
> Conversions. Adding 00431C00 with quality 1.00
> Conversions. Adding 0042CEB0 with quality 1.00
> Conversions. Adding 00407B10 with quality 0.30
> Codings..... Adding chunked with quality 1.00
> Net After... Add 00401221 with order 65535 tmplate `<null>' code 1 context
> 00000000
> ChunkStream. Chunk 008A9D38 created with max size 0
> HTAccess.... Accessing document http://localhost/
> Net Before.. calling 0043B770 (request 008A2930, context 00000000)
> Net Before.. calling 0043BE60 (request 008A2930, context 00000000)
> URL Tree.... did NOT find `w3c-AA'
> Credentials. verified
> Net Before.. calling 0043CA40 (request 008A2930, context 00000000)
> URL Tree.... did NOT find `w3c-pep'
> Net Before.. calling 0043B600 (request 008A2930, context 00000000)
> Net Object.. 008AA148 created with hash 0
> Net Object.. starting request 008A2930 (retry=1) with net object 008AA148
> HTTP........ Looking for `http://localhost/'
> HTHost parse Looking up `localhost' on port 80
> Event....... Created event 008AAF08 with context 008AADC8, priority 20, and
> timeout 30000
> Event....... Created event 008AAF60 with context 008AADC8, priority 20, and
> timeout 30000
> Event....... Created event 008AAFB8 with context 008AADC8, priority 20, and
> timeout 30000
> Event....... Created event 008AB010 with context 008AADC8, priority 20, and
> timeout 30000
> Event....... Created event 008AB068 with context 008AADC8, priority 20, and
> timeout 30000
> Event....... Created event 008AB0C0 with context 008AADC8, priority 20, and
> timeout 30000
> Host info... added `localhost' with host 008AADC8 to list 008AABE0
> Host connect Grabbing lock on Host 008AADC8 with 008AA148
> Host info... Added Net 008AA148 (request 008A2930) to pipe on Host 008AADC8,
> 1 requests made, 1 requests in pipe, 0 pend
> ing
> HTHost...... No ActivateRequest callback handler registered
> HTHost 008AADC8 going to state TCP_CHANNEL.
> HTHost 008AADC8 going to state TCP_DNS.
> DNS Add..... `localhost' with 1 home(s) to 008AB2F0
> ParseInet... as port 80 on 127.0.0.1 with 1 homes
> HTHost 008AADC8 going to state TCP_NEED_SOCKET.
> Socket...... Created 560
> Net Manager. Increasing active sockets to 1, 0 persistent sockets
> Socket...... Turned off Nagle's algorithm
> Socket...... Blocking socket
> Channel..... Hash value is 24
> Channel..... Added 008AB688 to list 008AB640
> Reader...... Created reader stream 00DF0068
> Socket...... TCP send buffer size is 8192 for socket 560
> HTHost 008AADC8 going to state TCP_NEED_CONNECT.
> HTDoConnect. WOULD BLOCK `localhost'
> Host Event.. WRITE passed to `http://localhost/'
> HTDoConnect. WOULD BLOCK `localhost'
> Host Event.. WRITE passed to `http://localhost/'
> HTDoConnect. WOULD BLOCK `localhost'
> Host Event.. WRITE passed to `http://localhost/'
> HTDoConnect. WOULD BLOCK `localhost'
> 
> The last two lines are produced about once a second and the program just
> keeps on running.
> 
> What is wrong?
> 
> Happy New Year.
> 
> Best regards,
> 
> Finn Ellebaek
> 
> ---------------------------------------------------------------------------
>  Finn Ellebaek Nielsen                           ChangeGroup ApS
>  Product Manager, Principal Consultant, Partner  Kronprinsessegade 54, 4.
>  E-mail: [email protected]    DK-1306  Koebenhavn K
>  Mobile: +45 20 32 49 25                         Denmark
>  Phone:  +45 33 32 77 78                         http://www.changegroup.dk
> ---------------------------------------------------------------------------
>                       "Where do you want to GPF today?"
> 
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.