Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread RTT

On 11-12-2012 17:30, Arno Garrels wrote:

- Original Message -
From: "RTT" 
To: "ICS support mailing" 
Sent: Tuesday, December 11, 2012 5:59 PM
Subject: Re: [twsocket] Did I find a bug in THttpCli?



The port after the redirect is the correct 8080. I
just don't understand why the document returned is not the same as when
tested in a browser. Is like if the called php script is tricking us.

I guess it's because of the Host header sent by THttpCli also
doesn't include the port number, firefox does send the 8080 port.



Then the StartRelocation method may need to recreate the FReqStream 
data. Probably better to handle the Host header separated from this stream.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread Arno Garrels

- Original Message - 
From: "Angus Robertson - Magenta Systems Ltd" 
To: 
Sent: Tuesday, December 11, 2012 6:33 PM
Subject: Re: [twsocket] Did I find a bug in THttpCli?


>> Before you try to fix/break something that works, I urge you to 
>> check with Wireshark that the redirection works as expected to port 
>> number 8080, the only problem I see so far is property Location
>> should likely include the port number in this test case.
> 
> The first thing I'll do is fix the logging so we can actually see what is
> happening

I do not see the logging is wrong, actually it's logged
what's being sent and the Location property as is (which is wrong).

So I see two problems now, missing port number in both Location
property and Host header line. Relocation itself (connecting
to the correct port) actually works. 

-- 
Arno



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread Angus Robertson - Magenta Systems Ltd
> Before you try to fix/break something that works, I urge you to 
> check with Wireshark that the redirection works as expected to port 
> number 8080, the only problem I see so far is property Location
> should likely include the port number in this test case.

The first thing I'll do is fix the logging so we can actually see what is
happening, it should not be necessary to use Wireshark to debug a program.


Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread Arno Garrels

- Original Message - 
From: "RTT" 
To: "ICS support mailing" 
Sent: Tuesday, December 11, 2012 5:59 PM
Subject: Re: [twsocket] Did I find a bug in THttpCli?


> The port after the redirect is the correct 8080. I 
> just don't understand why the document returned is not the same as when 
> tested in a browser. Is like if the called php script is tricking us.

I guess it's because of the Host header sent by THttpCli also
doesn't include the port number, firefox does send the 8080 port.

-- 
Arno
  
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread RTT

On 11-12-2012 16:38, Arno Garrels wrote:

- Original Message -
From: "Angus Robertson - Magenta Systems Ltd" 
To: 
Sent: Tuesday, December 11, 2012 5:25 PM
Subject: Re: [twsocket] Did I find a bug in THttpCli?



If you GET this URL:
http://www.htmlvalidator.com/test/cookies/test-redirect.php

Then you get "Server port is 80." with the ICS demo, but put the
same URL in a browser and you get "Server port is 8080."

I have reproduced this using the ICS browser demo, which is useful for
testing stuff such as this due to logging protocol and showing you the
web page at the same time.

I'll look at a fix, since I have relative relocation bug to fix as well.

Before you try to fix/break something that works, I urge you to check with
Wireshark that the redirection works as expected to port number 8080,
the only problem I see so far is property Location should likely include
the port number in this test case.

What's weird is that if I test this scenario locally, with a redirect to 
a different port (as in this supposedly problem), it work just fine.
And you are correct. The port after the redirect is the correct 8080. I 
just don't understand why the document returned is not the same as when 
tested in a browser. Is like if the called php script is tricking us.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread Arno Garrels

- Original Message - 
From: "Angus Robertson - Magenta Systems Ltd" 
To: 
Sent: Tuesday, December 11, 2012 5:25 PM
Subject: Re: [twsocket] Did I find a bug in THttpCli?


>> If you GET this URL:
>> http://www.htmlvalidator.com/test/cookies/test-redirect.php
>> 
>> Then you get "Server port is 80." with the ICS demo, but put the 
>> same URL in a browser and you get "Server port is 8080."
> 
> I have reproduced this using the ICS browser demo, which is useful for
> testing stuff such as this due to logging protocol and showing you the
> web page at the same time.  
> 
> I'll look at a fix, since I have relative relocation bug to fix as well. 

Before you try to fix/break something that works, I urge you to check with 
Wireshark that the redirection works as expected to port number 8080,
the only problem I see so far is property Location should likely include
the port number in this test case.

-- 
Arno
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread Angus Robertson - Magenta Systems Ltd
> If you GET this URL:
> http://www.htmlvalidator.com/test/cookies/test-redirect.php
> 
> Then you get "Server port is 80." with the ICS demo, but put the 
> same URL in a browser and you get "Server port is 8080."

I have reproduced this using the ICS browser demo, which is useful for
testing stuff such as this due to logging protocol and showing you the
web page at the same time.  

I'll look at a fix, since I have relative relocation bug to fix as well. 

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be