开发者

HTTP response differences between browser's view source and netcat's output

开发者 https://www.devze.com 2023-01-03 04:43 出处:网络
I\'m looking at a website using Internet Explorer and Firefox. In each browser I select view source and see the website\'s URL in the links. These links were concatenated together using HttpContext.Cu

I'm looking at a website using Internet Explorer and Firefox. In each browser I select view source and see the website's URL in the links. These links were concatenated together using HttpContext.Current.Request.Url.Host in the code behind. However, when I use netcat or Burp Suite v1.3.03, looking at the same links I see the servername instead of the website's URL.

My question is - Why does view source in the browser d开发者_如何学运维isplay different links in the page source than what netcat or Burp Suite outputs? Is the browser rewriting stuff?

My thought to correct is to have a web.config setting which is used to create the links.

Next question - Does anyone know of a configuration change to make to IIS to return the URL instead of the server name or a .NET function that I should be calling instead to get the URL that the website is running as.


Make sure that you are sending a "Host" header in your request - this is required as of HTTP/1.1 for all requests (it's what makes multi-homed/virtual websites possible).

0

精彩评论

暂无评论...
验证码 换一张
取 消