That's because the call to StrToInt generates an exception (at least on my system). As Francois mentioned earlier, you are assuming in the DataAvailable that you have the entire response, which you don't. On my system the event is triggered 4 times with various portions of the message. The first time it actually does contain the header, with a 403 error code and it indicates the data portion will be 1224 bytes. The following 3 messages contain a total of 1224 bytes. Because you try to extract the response code from each packet, strtoint ends up choking on invalid data. Comment out the call to GetHTTPReponseStatusCode and you'll see the entire message appear correctly in the memo box, no duplicates (at least here is it correct).

Sean
----- Original Message ----- From: "Jack" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Thursday, June 02, 2005 10:42 AM
Subject: Re[4]: [twsocket] Receive result of the first ReceiveStr()calltwice-not resolved


Hello Francois,

I've uploaded the project here:
http://chatsvr.no-ip.org/download/ProxyTester.zip

It was created with Delphi 2005. I could build it with D5
after deleting the Variant unit from uses clause.

If you build it as is, you'll see this (long) line twice:

6/2/2005 10:39:36 AM <html><body><font size="5" color="#FF0000"><br><b>Access denied due to Proxy+'s Security settings!</b></font><hr>
<b>Description:</b> REJECTED - by default (no rule allowed the access)
<br><b>Request details:</b> HTTPS; 65.110.147.196:4351 -> 192.168.2.36:4480 <hr><font size="2"><font color="#FF0000">Proxy</font><font color="#0000FF">+</font> 3.00 (Build #246), Date: Thu, 02 Jun 2005 10:40:24 GMT</font>

If you comment out the StrToInt() line in the source code,
it'll appear only once.

--
Best regards,
Jack



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