This is a migrated thread and some comments may be shown as answers.

Help to decompress POST request

6 Answers 481 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Command
Top achievements
Rank 1
Command asked on 04 Aug 2014, 10:08 AM
Hello,

Is there any way to decompress post data in Fiddler, sent from application? Post request to server contain headers like this:
Content-type: application/x-compressed-json
Content-length: 3xx

Sent JSON data is unreadable. Any ideas are welcome! 

6 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 04 Aug 2014, 03:24 PM
Hello, "Command"--

Fiddler can perform any transformation you like, but in order to do this, you would have to know what exactly "x-compressed-json" is-- this is not a standard data format.

If you share a SAZ file (click Help > Send Feedback in Fiddler) containing such traffic, I can probably help.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Command
Top achievements
Rank 1
answered on 06 Aug 2014, 09:22 AM
[quote]Eric Lawrence said:
...but in order to do this, you would have to know what exactly "x-compressed-json" is-- this is not a standard data format.
[/quote]

Tnx for the reply

This is actually GZIP encoded data stream. If I save POST data only in file and then use GZIP decompressor, I can see all data in readable JSON format. But this is not a solution, because program send this every 150 seconds
0
Eric Lawrence
Telerik team
answered on 06 Aug 2014, 01:12 PM
Click Rules > Customize Rules.

Just inside the Handlers class, add the following:

public static ToolsAction("decompressJSON")
function dodecomp(oS: Session[])
{
   for (var i: int=0; i<oS.Length; i++)
   {
     if (oS[i].oRequest.headers.ExistsAndContains("Content-Type", "application/x-compressed-json"))
     {
       oS[i].utilSetRequestBody(Utilities.GzipExpand(oS[i].requestBodyBytes));
       oS[i].oRequest["Content-Type"] = "application/json";
     }
   }
}

Save the file. You can now right-click sessions in the Web Sessions list and choose decompressJSON.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Arthur
Top achievements
Rank 1
answered on 17 Apr 2021, 05:50 AM
Hello friend, I need your help, how can I decode this gzip in the header?
0
Rosen Vladimirov
Telerik team
answered on 21 Apr 2021, 05:51 AM

Hi Arthur,

Your request body seems like octet-stream (as described in the Content-Type header), which is usually used for binary data. So it is not actually possible to decode this content as its intention is to be binary data. You can try enabling the Decode option (check attached image), which will help you when the content is encoded with gzip for example. But for octet-stream, it is not possible to decode it.

Hope this helps.

Regards,
Rosen Vladimirov
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

0
Arthur
Top achievements
Rank 1
answered on 21 Apr 2021, 07:17 PM
Thank you friend
Tags
Fiddler Classic
Asked by
Command
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Command
Top achievements
Rank 1
Arthur
Top achievements
Rank 1
Rosen Vladimirov
Telerik team
Share this question
or