当前位置: 动力学知识库 > 问答 > 编程问答 >

iis - localhost.:8088 - Purpose of the "dot colon" notation

问题描述:

I recall the syntax of a hack when routing a request to local IIS but I cannot recall what it does. It popped up randomly in the browser during a debug session this morning and when I recognized it, I went looking for documentation on the technique to refresh my memory and came up blank.

So, if you were to enter

http://localhost:8080 and

http://localhost.:8080

into two separate browsers, what difference would you expect "the dot" to make?

网友答案:

I found the explanation (and when I recalled that Fiddler involved, I also recalled what the hack did)

Fiddler and IE7

It isn't related to IIS; It's a workaround for Internet Explorer to force the browser to not bypass a proxy. Since Fiddler is implemented as a proxy, http://localhost:8080 will completely bypass it but http://localhost.:8080 will not bypass the proxy, allowing monitoring tools to capture traffic.

Internet Explorer (7 and 8, I think) is written to bypass proxy servers for resolving "localhost" resources. Appending a trailing dot to "localhost" provides a valid DNS name that does not match the rules that "Old IE" uses for this bypass logic. Internally, the trailing dot gets trimmed from name resolution and you force IE to not execute its internal logic that bypasses the proxy server.

From what I understand, this was changed in IE9.

分享给朋友:
您可能感兴趣的文章:
随机阅读: