Debug localhost and 127.0.0.1 with fiddler

Source: Internet
Author: User

From: http://www.cnblogs.com/fengmk2/archive/2009/02/02/1131389.html

 

 

Today, I saw the Lulu flash memory asking about the cookie and then raised more questions. I suddenly thought that when I used Fiddler to debug whether gzip compression was used last night, I found that localhost under IE7 could not be captured. Then, I searched "Fiddler localhost" and found the cause.

The following references to: http://www.fiddlertool.com/Fiddler/help/knownissues.asp

I don't see IE7 or. NET traffic sent LocalhostOr 127.0.0.1.

IE7 and the. NET Framework are hardcoded not to send requests for localhost through proxies. fiddler runs as a proxy. The workaround is to use your machine name as the hostname instead of localhost or 127.0.0.1.

So, for instance, rather than hitting http ://Localhost: 8081/mytestpage. aspx, instead visit http ://Machinename: 8081/mytestpage. aspx. Alternatively, you can use http ://Localhost.: 8081/mytestpage. aspx (note the trailing dot afterLocalhost). Alternatively, you can customize your rules file like so:

static function OnBeforeRequest(oSession:Fiddler.Session){  if (oSession.host.ToUpper() == "MYAPP") { oSession.host = "127.0.0.1:8081"; }}

... And then navigate to http://www.fiddlertool.com/Fiddler/help/knownissues.asp, which will act as an alias for 127.0.0.1: 8081.

I preferLocalhost.Method.

If you use iis7, you can also customize it by yourself.

<system.net>  <defaultProxy>    <proxy  proxyaddress="http://127.0.0.1:8888" />  </defaultProxy></system.net>

In this way, the data is accessed through the proxy, so that the fiddler can capture the data.

 

Finally, I also think of a fiddler plug-in introduced by DF, which helps us to view the JavaScript code plug-in that has been removed --Fiddler2-JavaScript beautifier plugin(The JavaScript code beautification plug-in of Fiddler 2).

 

Well, sometimes you need a fuse to remember something.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.