FiddlerCore API - Session - utilDecodeResponse() is not decoding brotli-encoded content

121 views
Skip to first unread message

Ian Claridge

unread,
Jan 7, 2019, 12:50:21 PM1/7/19
to Fiddler
Hi.

I have a C# application that uses FiddlerCore. When handling web (https) responses that have br (brotli) encoded content, calling utilDecodeResponse() on my session object does not decode the response using brotli.exe!

I have followed these steps according to this page (https://textslashplain.com/2018/02/12/fiddlercore-and-brotli-compression) to make sure brotli is set up correctly:
  • Put brotli.exe into a Tools subfolder of my application.
  • Ensured that the Environment.SpecialFolder.MyDocuments folder exists: in my case "D:\Users\iancl\Documents\FiddlerCore".
I can see that encoding is taking place because *.br files are being generated in my user documents folder (above) for recorded responses.

However, when it comes to the decoding of responses, as stated, the response body contents remain encoded (and unreadable) after each call to utilDecodeResponse().

I am using the latest version of FiddlerCore (community edition - downloaded from https://www.telerik.com/purchase/fiddlercore).

Any help appreciated!

Thanks,

Ian C.

Ian Claridge

unread,
Jan 8, 2019, 6:10:24 AM1/8/19
to Fiddler
Update:

I forgot to mention that the version of brotli.exe I am using is one that I built (32-bit version) from the latest source code : v1.0.7.

I followed these steps to use CMake (32-bit) to build the brotli runtimes on Windows: Building with CMake on Windows. Using my built version of brotli.exe results in the behavior described in my original post.

However, when I use the brotli.exe runtime that ships with the latest version of Fiddler, the behavior is no longer exhibited and the decompression works as expected.

So I guess my question needs refining: why does my built version of brotli.exe not work as expected with FiddlerCore, whereas the shipped version of brotli.exe that comes with Fiddler does work?

EricLaw

unread,
Jan 8, 2019, 7:34:44 AM1/8/19
to Fiddler
I'm not entirely sure, but my guess would be that either the command line arguments passed to my/Telerik's Brotli are slightly different, or it returns a different ExitCode on success.

(Note: There is no "Community" version of FiddlerCore-- there's a version for student/professor use only).

Ian Claridge

unread,
Jan 9, 2019, 9:09:43 AM1/9/19
to Fiddler
Thanks for the response, Eric.

Yes, I suspect you are correct about the command line arguments or return codes possibly being different. I have been unable to determine the difference, so I'm sticking with the version of brotli.exe that ships with the Fiddler application.

And noted....yes, I incorrectly called the personal/educational version of FiddlerCore the community edition! :)
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages