Using HttpTst sample program provided with ICS, I get only on OnRequestDone 
with StatusCode = 200.
Not using proxy
cmd> GET / HTTP/1.1
cmd> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
cmd> Connection: Keep-Alive
cmd> Accept-Language: en, fr
cmd> User-Agent: Mozilla/3.0 (compatible)
cmd> Host: help.lycos.com
cmd> 
text/html => document.htm
Location = http://help.lycos.com/network_1_help.asp
URL = http://help.lycos.com
Document = document.htm
hdr>HTTP/1.1 302 Object moved
hdr>Server: Microsoft-IIS/5.0
hdr>Date: Sun, 24 Jul 2005 08:57:30 GMT
hdr>P3P: CP="CAO DSP COR CURa ADMa DEVa CONo PSAa OUR IND DEM PRE PUR TAIa NAV 
UNI"
hdr>Connection: close
hdr>Location: network_1_help.asp
hdr>Content-Length: 121
hdr>Content-Type: text/html
hdr>Cache-control: private
Location changed to "http://help.lycos.com/network_1_help.asp";
cmd> GET /network_1_help.asp HTTP/1.1
cmd> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
cmd> Connection: Keep-Alive
cmd> Accept-Language: en, fr
cmd> User-Agent: Mozilla/3.0 (compatible)
cmd> Host: help.lycos.com
cmd> 
Cookie: "lubid=010000508BD39CB1060842E357FA0006835F00000000; expires=Mon, 
18-Jan-2038 05:00:00 GMT; domain=.lycos.com; path=/"
Cookie: "ASPSESSIONIDQSCRSSCC=BCEDCMIAIEKNELPFODIDOLIA; path=/"
text/html => network_1_help.asp
Location = http://help.lycos.com/network_1_help.asp
URL = http://help.lycos.com
Document = network_1_help.asp
RequestDone, no error. Status =200
StatusCode = 200
hdr>HTTP/1.1 200 OK
hdr>Server: Microsoft-IIS/5.0
hdr>Date: Sun, 24 Jul 2005 08:57:29 GMT
hdr>P3P: CP="CAO DSP COR CURa ADMa DEVa CONo PSAa OUR IND DEM PRE PUR TAIa NAV 
UNI" 
hdr>Connection: close
hdr>Content-Length: 19340
hdr>Content-Type: text/html
hdr>Set-Cookie: lubid=010000508BD39CB1060842E357FA0006835F00000000; 
expires=Mon, 18-Jan-2038 05:00:00 GMT; domain=.lycos.com; path=/
hdr>Set-Cookie: ASPSESSIONIDQSCRSSCC=BCEDCMIAIEKNELPFODIDOLIA; path=/
hdr>Cache-control: private

--
[EMAIL PROTECTED]
http://www.overbyte.be

----- Original Message ----- 
From: "Merijn Terheggen" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Saturday, July 23, 2005 9:12 PM
Subject: Re: [twsocket] HttpCli StatusCode = 0 causes problems


> Here you go:
> 
> 'http://help.lycos.com' redirects into
> 'http://help.lycos.com/network_1_help.asp'.
> 
> 'http://help.lycos.com/network_1_help.asp' redirects into
> 'http://help.lycos.com/network_1_help.asp', which is into itself.
> After the 2 LocationChange events, there will be 2 RequestDone events.
> The first one with a StatusCode = 0 and the second one with a
> StatusCode = 200.
> 
> --Merijn
> 
> 
> On 7/23/05, Francois PIETTE <[EMAIL PROTECTED]> wrote:
>> > Why is there a RequestDone event while the StatusCode is still zero
>> > anyway?
>> 
>> I would be interested in finding a reproductible case where it occurs.
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
>> 
>> 
>> ----- Original Message -----
>> From: "Merijn Terheggen" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" <twsocket@elists.org>
>> Sent: Saturday, July 23, 2005 6:04 PM
>> Subject: [twsocket] HttpCli StatusCode = 0 causes problems
>> 
>> 
>> >I noticed some behavior of HttpCli that caused me a LOT of headaches
>> > before I discovered what was going on and made a work-around.
>> >
>> > This mail is to ask you:
>> > - If the behavior that I noticed indeed happens the way I describe
>> > - If the behavior is consiously designed this way or needs to be changed
>> >
>> > On the RequestDone event, the StatusCode can be 0. I only notice this
>> > happen rarely in certain cases of a redirect (FollowRelocation set to
>> > 'true'). If I've seen things correct, there can be ANOTHER RequestDone
>> > event following in this case.
>> >
>> > Why is this a problem? The RequestDone event is typically used to
>> > process the HttpCli data. After processing, the client potentially
>> > could get deleted since it has no function anymore (as happens in my
>> > code at least). However, another RequestDone event following the first
>> > one when the client has been deleted already causes access violations
>> > etc.
>> >
>> > The only way to be sure the RequestDone event is the 'final' event
>> > seems to be a check on the StatusCode. In case the StatusCode = 0, I
>> > let the event handler return because another RequestDone event will
>> > follow.
>> >
>> > Why is there a RequestDone event while the StatusCode is still zero
>> > anyway?
>> >
>> > Thanks,
>> >
>> > --Merijn
>> > --
>> > To unsubscribe or change your settings for TWSocket mailing list
>> > please goto http://www.elists.org/mailman/listinfo/twsocket
>> > Visit our website at http://www.overbyte.be
>> >
>> 
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to