NetTalk Central

Author Topic: p_web.Requesthost value inconsistent with MSIE 11  (Read 5281 times)

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
p_web.Requesthost value inconsistent with MSIE 11
« on: July 15, 2015, 08:25:00 AM »
Hi Bruce,
p_web.Requesthost returns the correct site name only on the first request from MSIE 11 client.  The value is then truncated for sequential requests. Not sure if this is the case for all version of MSIE. No issues with Firefox or Chrome.  Attached is the WEB1 Example where I store the p_web.Requesthost value in a session variable within the process link embed. The session variable  is shown on the page header which would be the initial value because the page header does not change. In the mail box form I show the current value. With Firefox the values are the same, with MSIE 11 the values are different.  I also output the p_web.Requesthost value to debug in the process link embed which clearly shows that the value changes after the first request by MSIE. The example app was compiled in C10, NT 8.55.
I use p_web.Requesthost value to determine the sub host value (e.g. test.localhost). Please fix.
Thanks,
Rob Kolanko


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: p_web.Requesthost value inconsistent with MSIE 11
« Reply #1 on: July 16, 2015, 11:22:06 PM »
Hi Rob,

I'm not sure I'm understanding the problem correctly.
On my machine I've tried with FF and IE11.
In debugview I see

 Request Host:127.0.0.1:88

with every request.

Are you seeing something different?

cheers
Bruce



Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: p_web.Requesthost value inconsistent with MSIE 11
« Reply #2 on: July 17, 2015, 04:13:32 AM »
127.0.0.1:88 appears to work fine. Try using http://localhost:88/
You will see the first request as Request Host:localhost:88 and then all the rest are Request Host:8/

Rob

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: p_web.Requesthost value inconsistent with MSIE 11
« Reply #3 on: July 27, 2015, 11:14:40 AM »
Bump!
Clarify IP Addresses work (e.g. 127.0.0.1), however host names have the issue. If you use http://localhost:88, you will see in debug that the first request to the server is "Request Host:localhost:88" and then all the rest of the requests are "Request Host:8/". This only occurs with MSIE.
Thanks,
Rob

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: p_web.Requesthost value inconsistent with MSIE 11
« Reply #4 on: July 28, 2015, 03:08:46 AM »
Hi Rob,
Thanks for the bump, I missed your earlier reply.

The issue actually is very specific _only_ to the Localhost domain.
IP Addresses, and any other domain would not exhibit this problem.
I've fixed it for 8.57

cheers
Bruce

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: p_web.Requesthost value inconsistent with MSIE 11
« Reply #5 on: July 28, 2015, 06:12:01 AM »
Hi Bruce,
Thanks for the fix. However I have had problems with other domains besides localhost. Hopefully the fix will work here as well.
Rob

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: p_web.Requesthost value inconsistent with MSIE 11
« Reply #6 on: July 28, 2015, 07:25:35 AM »
Hi Rob;

The Host: header was (incorrectly) being found in the Referer line when the Referer header contained
Referer: http://localhost:88

IE can put the Referer before the host, that's why it was only happening there. (FF and Chrome put Host first.)

If you are having a problem with other domains, I suspect it is a different problem.

but I've refactored _GetHeaderfield to use Stringtheory now, so it makes the code a lot simpler, and a lot less prone to a bug.

Cheers
Bruce