Firefox – Firebug and cURL

curlfirefoxtls

I have been using Firebug and cURL for quite a while.

Firebug is amazing to capture HTTPS POST request as opposed to a network analyser as it is aware of SSL/TLS negotiation. And cURL is amazing to resend that POST request after modifying parameters.

When I use firebug, I "Copy as cURL" a (HTTPS) POST request, and replay it from a Terminal.
enter image description here

However when I replay this in Terminal, the response that I can see is encrypted.
enter image description here

Questions:

  • Can I decrypt that Terminal output ?
  • Can I inject that cURL POST in
    the browser (firefox) to see the WebServer response decrypted ?

Thank you

Best Answer

It's not encrypted, it's compressed. In your request, you send "Accept-Encoding: gzip, deflate" so the server is compressing the response for optimization.

You need to remove the -H "Accept-Encoding: gzip, deflate" and you should see the normal response.

OR

You can install gunzip if not already installed and pipe your curl command as curl [...] | gunzip -

Hope this help.

Related Question