Re: [twsocket] HttpCli and the 404 status code

2005-04-20 Thread Maurizio Lotauro
Scrive Francois Piette [EMAIL PROTECTED]:

  Probably a solution could be to expose the FRequestDoneError field.
  The status code should be meaningful only if FRequestDoneError=0.
 
 You mean reporting 10060 (and others) to the error field ?

If you mean FRequestDoneError yes.

 Yes, probably good. But statuscode must still return 404 otherwise probably a
 lot of existing
 application code would be broken !

Yes of course. I think that have a new information (and exsposing 
FRequestDoneError probably could be sufficient, I haven't checked the source 
code deeply) to tell the programmer if the error is returned by the server or 
from a different source (wsocket?).
Then the programmer, if he/r want, can check the RequestDoneError and if it is 
0 can examine the StatusCode. I think that it is not necessary to change what 
accually is assigned to the StatusCode, so nothing will be break.

If you will implement this, you should check that the RequestDoneError will 
always contain a value different from 0 in the situations mentioned above.


Bye, Maurizio.


This mail has been sent using Alpikom webmail system
http://www.alpikom.it


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


Re: [twsocket] HttpCli and the 404 status code

2005-04-20 Thread Maurizio Lotauro
Scrive Francois PIETTE [EMAIL PROTECTED]:

   Probably a solution could be to expose the FRequestDoneError field.
   The status code should be meaningful only if FRequestDoneError=0.
 
 I verifyed and actually the OnRequestDone error reflect the winsock error !

Who use sync operation will get an EHttpException, but the ErrorCode contain 
the StatusCode and the winsock error is unavailable.


Bye, Maurizio.


This mail has been sent using Alpikom webmail system
http://www.alpikom.it


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


Re: [twsocket] HttpCli and the 404 status code

2005-04-18 Thread Marcello Vezzelli
Maurizio Lotauro wrote:
I noticed that the HttpCli component return the 404 status code not
only when the server return this code but even under different
situations. For example when it is unable to resolve the hostname or
when wsocket raise an error (please correct me if I'm wrong).
I noticed this too.
In a program I implemented a very simply retry mechanism. The retry
will be executed only if the status code returned is not a permanent
error (I identified the 408, 503 and 504). The 404 is a permanent one
but it is returned even when the socket return 10060 (Connection
timed out).
404 in this case is wrong and doesn't reflect the real situation.
I would add a property RetryCount to decide how many times a request 
should be retried in case of non permanent error.

Probably a solution could be to expose the FRequestDoneError field.
The status code should be meaningful only if FRequestDoneError=0.
What do you think?
I assumed status code=0 as a socket error, and I modified the source for 
this behaviour.
Exposing FRequestDoneError is probably better.

--
Marcello Vezzelli
CTO
Software Development Department
E-Works s.r.l.
tel. +39 059 2929081
fax +39 059 2925035
Direzionale 70 - Via Giardini 456/c
41100 Modena - Italy
--
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