Fiddler: how to disable Header Host rewriting

When using Fiddler, a warning dialog box appears.

Fiddler has detected a protocol violation in session #14.

The Request Host header did not match the URL host component.

URL Host:   proxy.music.pp.com
Header Host:    119.147.22.41

And this shows that Fiddler changed the HTTP Header host to "proxy.music.pp.com", is there a way to disable Fiddler by changing it?

+5
source share
3 answers

From my book :

Host Header Exchange

Fiddler , URL Host, Host X-Original-Host, Host , URL-. script, FiddlerScript BeforeRequest, , Host.

if (oSession.BitFlags & SessionFlags.ProtocolViolationInRequest) 
{
  var sOverride = oSession["X-Original-Host"];
  if (!String.IsNullOrEmpty(sOverride)) 
  {
    oSession["X-overrideHost"] = sOverride;
    oSession["ui-backcolor"] = "yellow";

    // Be sure to bypass the gateway, otherwise overrideHost doesn't work
    oSession.bypassGateway = true;
  }
}
+7

.

" " : OnBeforeRequest(oSession: Session)

:

if (oSession.HostnameIs("proxy.music.pp.com")) { oSession.host = "119.147.22.41"; }
+1

, " URL" - , HTTP- Host.

Looking closer, it seems that this violation occurs for the initial proxy “setup” request, which looks like this:

 CONNECT targaryen:45633 HTTP/1.1
 Host: targaryen

That's where the error makes sense to me.

0
source

All Articles