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

Before I answer more, probably for nothing, please answer the questions I 
asked in my previous mail:

>> 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 ?

This is really important you answer the questions.
Giving details on what you see in your program is not relevant until I 
understand what you want to do. You have to explain at a much higher level 
than giving details about status code.
State variable is just for information. You_must_ use the events. You can't 
poll the state and do whatever you want. Operations has to be done from the 
events or _after_ OnRequestDone event. Abort can be called at anytime, 
outside of any event and the result is unpredictable except the fact that 
the current operation will be aborted or course.

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


----- Original Message ----- 
From: "Ronny" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Sunday, February 26, 2006 12:24 AM
Subject: Re: [twsocket] HttpCli problem


> 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 

-- 
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