Fiddler doesn't decompress gzip responses

2020-08-09 05:42发布

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?

3条回答
冷血范
2楼-- · 2020-08-09 06:19

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

查看更多
太酷不给撩
3楼-- · 2020-08-09 06:20

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

查看更多
手持菜刀,她持情操
4楼-- · 2020-08-09 06:29

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.

查看更多
登录 后发表回答