26

I use Fiddler to debug my application. Whenever the response is compressed by server, instead of decompressed response, Fiddler shows unreadable binary data:

/* Response to my request (POST) */
HTTP/1.1 200 OK
Server: xyz.com
Date: Tue, 07 Jun 2011 22:22:21 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.3.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip

14
����������������
0

How can I get the response decompressed?

Xaqron
  • 29,931
  • 42
  • 140
  • 205

3 Answers3

44

I use fiddler version 2.3.4.4 and just noticed that in the Inspectors tab ("Raw" sub-tab), above the response section (in case of gzip-ed response), appears "Response is encoded and may need to be decoded before inspection. Click here to transform." If you click on that, the response becomes readable. The settings are pretty much the default, I just installed Fiddler and did not change anything.

Priednis
  • 754
  • 1
  • 8
  • 19
  • 4
    Well I'll be damned, I never actually read that little yellow message; like it was hidden by a [Somebody Else's Problem](https://en.wikipedia.org/wiki/Somebody_Else%27s_Problem) cloaking device. – Sam Porch May 14 '15 at 23:46
28

If you don't want to have to click per response as in the accepted answer, using the menu, click Rules -> Remove All Encodings.

David Peden
  • 17,596
  • 6
  • 52
  • 72
7

From the fiddler faq

Q: I like to navigate around a site then do a "search" for a text on all the logged request/responses. I was curious if Fiddler automatically decompressed gzipped responses during search?

A: Fiddler does not decompress during searches by default, since it would need to keep both the compressed and decompressed body in memory (for data integrity reasons).

In current versions of Fiddler, you can tick the "Decode Compressed Content" checkbox on the Find dialog.

Here is a link to the site

http://www.fiddler2.com/fiddler/help/faq.asp

Community
  • 1
  • 1
Brian Dishaw
  • 5,767
  • 34
  • 49
  • I want to see response text inside Fiddler but it is compressed. I don't need search it, just view it. This is necessary while debugging AJAX components. – Xaqron Jun 07 '11 at 23:05
  • It was the only hit I found on their site. Maybe digging into it more might yield some favorable results. : / – Brian Dishaw Jun 07 '11 at 23:10
  • I think this post might help. http://stackoverflow.com/questions/243959/how-can-i-get-asp-net-ajax-to-send-its-json-repsonse-with-gzip-compression – Brian Dishaw Jun 07 '11 at 23:24
  • I coded my Fiddler plugin and it works fine, but zip library cannot decompress some websites. It says: wrong first magic byte... – Xaqron Jun 09 '11 at 02:32
  • That's really frustrating, I'm sorry to hear that. When you get the plugin working with those websites that are throwing errors can you share your solution? – Brian Dishaw Jun 09 '11 at 02:34
  • 1
    Of course. But StackOverFlow has not such an option. I guess the problem is with HTTP headers. Some websites claim they are using Gzip while they are using other algorithms. I have used `ICSharpCode.SharpZipLib`. – Xaqron Jun 09 '11 at 02:39
  • I ended up using `Charles web debugger` which has a 30 days free trial with more options than `Fiddler`. It is Java based. You can find it here: http://www.charlesproxy.com – Xaqron Jun 09 '11 at 02:42
  • If you still need the code I can upload somewhere and put the link here. Maybe you fix it and share again with others. Anyway `Charles` solved my case and I practiced coding `Fiddler` plugins! – Xaqron Jun 09 '11 at 02:47