Thank you for the feedback, Francois and Wilfried.  I have not been clear in 
my explination.  Let me start again with more detail:

State: httpReady
I call  httpcli.GetASync.
State: httpDnsLookup

( on HeaderEnd)
State: httpWaitingHeader   StatusCode: 302
I call httpcli.About
State: httpReady

(OnRequestDone)
State: httpDNSLookup

Nothing is done between OnHeaderEnd and OnRequestDone, so I assume that 
httpcli is looking for the redirect. (This only happens with a 302 
StatusCode, with a 200 Statuscode, OnRequestDone state is httpReady).

If this is a 'Feature' and not a bug, then can I Abort again in the 
OnRequestDone?  Or what do you recommend?  I do not think that the second 
DNSLookup will provide me with any useful information, even if it is a 
redirect, I wouldn't know how to use it, so I might as well cancel it and 
try to get the next file.


----- Original Message ----- 
From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Saturday, February 25, 2006 1:12 PM
Subject: Re: [twsocket] HttpCli problem


>>> Why use a loop ?
>>> Why don't you want to use OnRequestDone event ?
>
>> That is the problem. This routine is called from OnRequestDone.  That is
>> why
>> I think that there is a bug.  OnRequestDone gets called twice for 302s,
>> but
>> I have already taken that into account.
>> Should httpcli.State = httpReady when OnRequestDone is called?   If so,
>> this
>> is not the case with 302.
>
> There is no reason to call Abort from OnRequestDone which is the time when
> the request is... done !
> Why do you think you need to call Abort from OnRequestDone ?
> I you really have a good reason (I like to hear it), then PostMessage a
> custom message and then exit. Then from the corresponding event handler,
> call Abort.
>
> --
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> [EMAIL PROTECTED]
> 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