Content-Encoding: gzip and Content-Type: application/x-protobuf

Got it running on mono now.

Changes to http://www.runningcode.net/2015/01/30/request-compression/:

The http module has to be registered here as well:

  <!-- Required for MONO -->
  <system.web>
    <httpHandlers>
      <add path="*" type="ServiceStack.HttpHandlerFactory, ServiceStack" verb="*" />
    </httpHandlers>

    <httpModules>
      <add name="GZipRequestDecompressingModule" type="YourNamespaceHttpModules.GZipRequestDecompressingModule, YourAssembly" />
     </httpModules>
 </system.web>

And, additionally, I had to remove the line request.Headers.Remove("Content-Encoding");, because "HTTP Error 500: System.NotSupportedException - Collection is read-only."

1 Like