How to GZIP Decompress Http Requests?

1,759 views
Skip to first unread message

stktung

unread,
Jan 20, 2010, 3:39:36 PM1/20/10
to Fiddler
Hi,

I use a tool to GZIP compress my data in the http requests.

Is there a way for Fiddler to decompress this data when it captures
these request?

-Steve

EricLaw

unread,
Jan 20, 2010, 4:29:32 PM1/20/10
to Fiddler
How does the "tool" work?

If the tool properly sets the Content-Encoding header to "gzip" then
simply click the "Remove all encodings" option on the Rules menu, or
right-click a session and choose "Decode Selected Sessions".

If the tool *doesn't* properly set the Content-Encoding header, then
you will have to write some script that will manually decode the
request...

public static ContextAction("DecodeCompressed")
function DecodeCompressedRequestBody(oSessions: Session[]){
for (var x = 0; x < oSessions.Length; x++){
oSessions[x].requestBodyBytes =
Utilities.GzipExpand(oSessions[x].requestBodyBytes);
oSessions[x].oRequest["Content-Length"] =
oSessions[x].requestBodyBytes.LongLength.ToString();

Reply all
Reply to author
Forward
0 new messages