I'm trying to use Fiddler to modify response headers. I am following instructions from http://docs.telerik.com/fiddler/KnowledgeBase/FiddlerScript/ModifyRequestOrResponse, and the results look good in the Fiddler inspector. However, when I look at what response is received in a browser debugger, it looks like it is getting the unmodified headers.
In OnBeforeResponse I have the following javascript:
oSession.oResponse["testHeader1"] = "test header 1 value";
oSession.oResponse.headers.Add("testHeader2", "test header 2 value");
oSession.oResponse["Content-Type"] = "modified content type";
It is adding new headers in two different ways and modifying an existing header. In the attached screenshot you can see that in the Fiddler inspector the headers are modified as expected, but in the Chrome debugger the headers do not match (the headers that were supposed to be added are not there, and the modified header has it's original value). I have also tried the same test with the Postman chrome add-on, and with Firefox, and they all show the same behaviour.
The Fiddler version is v4.6.20171.7553
I would welcome advice if I am making a silly mistake, but from my testing is appears to be an issue with Fiddler. If you need any more information please let me know.
Thanks,
Alan
In OnBeforeResponse I have the following javascript:
oSession.oResponse["testHeader1"] = "test header 1 value";
oSession.oResponse.headers.Add("testHeader2", "test header 2 value");
oSession.oResponse["Content-Type"] = "modified content type";
It is adding new headers in two different ways and modifying an existing header. In the attached screenshot you can see that in the Fiddler inspector the headers are modified as expected, but in the Chrome debugger the headers do not match (the headers that were supposed to be added are not there, and the modified header has it's original value). I have also tried the same test with the Postman chrome add-on, and with Firefox, and they all show the same behaviour.
The Fiddler version is v4.6.20171.7553
I would welcome advice if I am making a silly mistake, but from my testing is appears to be an issue with Fiddler. If you need any more information please let me know.
Thanks,
Alan