This is a migrated thread and some comments may be shown as answers.

Scratchpad using wrong host

4 Answers 151 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Honey
Top achievements
Rank 1
Honey asked on 19 Mar 2015, 08:24 AM
Not sure whether this is a bug or I'm doing something wrong:

In composer's scratchpad, I have successfully issued a couple of requests to the same host (lets call it host1) with different paths and queries. Now I copy/paste one of those requests and edit it to point to host2 and also slightly change the path. I select this request in scratchpad and click "execute". The request is issued with the right path etc. but still using host1 instead of host2.

Even updating and restarting Fiddler couldn't change this behavior. It's still using host1.

Now what do i do?

Thanks!

4 Answers, 1 is accepted

Sort by
0
Accepted
Eric Lawrence
Telerik team
answered on 19 Mar 2015, 03:15 PM
Since you haven't provided any of the scratchpad text in question, I can only try to guess what might have been done incorrectly.

My guess is that you updated only the URL but didn't properly change the HOST header on the request.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Honey
Top achievements
Rank 1
answered on 20 Mar 2015, 08:14 AM
Argh, you're right! I only changed the topmost request line to host2, containing the GET URI part. The Host header still contained host1.

However, the HTTP RFC states that the Host header must be ignored when an absolute URI is requested (http://tools.ietf.org/html/rfc2616#section-5.2). So, is this still a Fiddler issue? I imagine Fiddler acting as a proxy, forwarding the request to the wrong host. Don't know how it actually works.

Here's an outline of how my request looked like:

GET http://host2:8090/some/path/ HTTP/1.1
Authorization: ...
Accept-Encoding: gzip
Accept: ...
User-Agent: ...
Host: host1:1080
Connection: Keep-Alive
Pragma: no-cache
0
Eric Lawrence
Telerik team
answered on 20 Mar 2015, 04:51 PM
For security reasons, Fiddler forbids the Host header and URL Host to differ.

In the default (traffic capture) case, any mismatch results in Fiddler showing a warning before overwriting the Host header with the Host specified by the URL.

In the special case of the Composer, no warning is shown and the value in the Host header is used. At some point, things will probably be changed to make the Composer behave more like the traffic capture codepath.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Honey
Top achievements
Rank 1
answered on 23 Mar 2015, 10:05 AM
I see.
Thank you for solving my problem and for explaining the rationale behind it.
Also, thank you for Fiddler, which is a great tool that solves 95% of my networking debugging issues where Wireshark was major overkill.
Tags
Fiddler Classic
Asked by
Honey
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Honey
Top achievements
Rank 1
Share this question
or