Change response header

2,170 views
Skip to first unread message

endy_tj

unread,
Jun 21, 2009, 6:55:40 AM6/21/09
to Fiddler
Is it possible to change response header using fiddler?

I tried using utilReplaceInResponse, but I don't think it accepts
regular expression.

For example, changing
Cache-Control: no-cache, must-revalidate, no-store
or
Cache-Control: no-cache
or
Cache-Control: no-store
into
Cache-Control: public

--
Endy

EricLaw

unread,
Jun 21, 2009, 4:36:01 PM6/21/09
to Fiddler
If you want to change a response header, change the response
header. ;-)

oSession.oResponse["HeaderName"] = "value";

...will do the trick. Call that inside OnBeforeResponse.

endy_tj

unread,
Jun 22, 2009, 11:49:44 PM6/22/09
to Fiddler
Thanks! I didn't know oResponse can be used like a dictionary.

EricLaw

unread,
Jun 23, 2009, 11:53:22 AM6/23/09
to Fiddler
Indeed, the default indexer for oRequest and oResponse indexes into
their respective HTTP header collections. The default indexer for the
Session object indexes into its oFlags dictionary.
> > > Endy- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages