Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Need Help on Fiddler Host Remapping, HTTP Error 400 (Bad Request)

$
0
0
Hi, Ryan--

The issue you're having is that the Host Remapping tool doesn't change the HOST header sent to the server. The Fiddler Book has a long section on how you can retarget traffic by Rewrite, Reroute, or Redirect. The HOSTS tool uses the Reroute method. You want to instead use the Rewrite method, which updates the host header.

This is simply done with the script engine.

Rules > Customize Rules.

Scroll to OnBeforeRequest.

Inside it, add

   if (oSession.HostnameIs("test1.com") || oSession.HostnameIs("test2.com") ||
       oSession.HostnameIs("test3.com"))
   {
      oSession.host = "localhost:2491";
   }

   
This will cause the request's Host field to be updated and IIS Express will not know that your request was rewritten.

Regards,
Eric Lawrence
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>