title: curl command a gzipped POST body to an apache server
body: <p>With mod_deflate properly activated on my apache 2.2 server, I am trying to send a gzipped body via curl command line.</p>
  
  <p>All tutorials I have seen say to add -H'Content-Encoding: gzip' and gzip my body file, however this fails:</p>
  
  <pre><code>echo '{ "mydummy" : "json" }' &gt; body
  gzip body
  curl -v -i http://localhost/mymodule -H'Content-Encoding: gzip' --data-binary @body.gz 
  </code></pre>
  
  <p>My apache module receives 0 bytes</p>
  
  <p>And in my apache error.log if LogLevel is set to debug I get:<br>
  <code>[Thu Jun 01 14:29:03 2017] [debug] mod_deflate.c(900): [client 127.0.0.1] Failed to inflate input: cannot handle deflate flags</code></p>