Hello Ronny,

> Should httpcli.State = httpReady when OnRequestDone is called?   If so, this
> is not the case with 302.

No becase OnRequestDone is called in different states. You have to put
there a case statement. And when state is httpREady then you do next
grab.

But you where talking of Aboft metht in another mail. I think
OnReqeustdone is also called when you call Abort if state is not yet
httpReady.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, February 25, 2006, 17:46, Ronny wrote:

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


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


>> Why use a loop ?
>> Why don't you want to use OnRequestDone event ?
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
>>
>> ----- Original Message ----- 
>> From: "Ronny" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" <twsocket@elists.org>
>> Sent: Saturday, February 25, 2006 4:57 PM
>> Subject: Re: [twsocket] HttpCli problem
>>
>>
>>>I did find a work-around, but it is not pretty:
>>>
>>> while httpcli.State <> httpready do
>>>  begin
>>>  a:=a+1;
>>>  log.Lines.add('Waiting '+inttostr(a));
>>>  application.ProcessMessages;
>>>  end;
>>>
>>> This is only needed after a 302.  The counter ranges from 400-1000 before
>>> the state turns to httpready.  And I am not sure that they are real 302s.
>>> The same pages give a statuscode of 302 consistently when downloaded in
>>> the
>>> same order, but may give a 200 if downloaded in a different order.  Could
>>> a
>>> bug in my program make httpcli give a fake 302 statuscode?
>>> (The above code gives an infinite loop if application.processmessages is
>>> removed)
>>>
>>>
>>> ----- Original Message ----- 
>>> From: "Ronny" <[EMAIL PROTECTED]>
>>> To: "ICS support mailing" <twsocket@elists.org>
>>> Sent: Saturday, February 25, 2006 10:08 AM
>>> Subject: Re: [twsocket] HttpCli problem
>>>
>>>
>>>> The problem is that the STATE is not ready after the abort, so when I
>>>> use
>>>> httpcli to grab another file after a 302, I would get an error. (http
>>>> component busy, I think).
>>>> After an abort in such a case, is there anything that I have to do to
>>>> make
>>>> sure that the component is ready for the next use?
>>>> (This only happens after a 302, anything else (200, 404, etc) works
>>>> well.)
>>>> -Ronny
>>>>
>>>> ----- Original Message ----- 
>>>> From: "Francois PIETTE" <[EMAIL PROTECTED]>
>>>> To: "ICS support mailing" <twsocket@elists.org>
>>>> Sent: Saturday, February 25, 2006 3:59 AM
>>>> Subject: Re: [twsocket] HttpCli problem
>>>>
>>>>
>>>>>> After httpcli.abort is called, the statuscode is normally 404 if the
>>>>>> statuscode before the call is 200.  The statuscode is 0 if the 
>>>>>> original
>>>>>> statuscode is 302.  This is causing me problems (i.e. httpcli state is
>>>>>> not
>>>>>> ready after an abort is called if the statuscode was 302).  See
>>>>>> example:
>>>>>>
>>>>>>  log.Lines.Add(inttostr(httpcli.StatusCode);
>>>>>>  httpcli.abort;
>>>>>>  log.Lines.Add(inttostr(httpcli.StatusCode);
>>>>>>
>>>>>> D7, ICS V6 beta V1.91
>>>>>
>>>>> StatusCode value is valid only when or after OnRequestDone has been
>>>>> triggered.
>>>>> Anyway, if you abort, you obviously know what you are doing. No need to
>>>>> rely
>>>>> on StatusCode.
>>>>>
>>>>> --
>>>>> [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
>>
>> -- 
>> 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