Forum Moderators: phranque

Message Too Old, No Replies

Issue Apache+https+gzip+multipart+php

Issue Apache https gzip multipart php

         

braun_lukas

11:02 am on Feb 19, 2015 (gmt 0)

10+ Year Member



Hi everyone,


i'm having some problems with the combination of multipart, gzip and https on apache.

I'm using a interface called ALPINEBITS

The specifications of this interface says the following:
The POST request may be compressed using the gzip algorithm, in which case the HTTP request
header Content­Encoding must be present and have "gzip" as value. A POST request compressed
with gzip must be compressed by the client in its entirety (i.e. the whole message must be
compressed, not the single parts of the multipart/form­data content). It is a client responsibility to
check whether the server supports content compression, this is done by checking the value of the
HTTP response header X­AlpineBits­Server­Accept­Encoding which is set to "gzip" by servers who
support this feature. The so called "Housekeeping" actions must not be compressed.


My Problem is the following:

When the zipped request arrives to APACHE we can use inputfilter deflate to unzip data, but this works only in a HTTP connection: under HTTPS, PHP receives empty data after deflate; then we can remove the inputfilter DEFLATE, the gzipped request arrives to PHP but it is useless because the stream with raw data from the request body is not available with enctype="multipart/form-data" and PHP can't unzip it.

Is there a solution to my Problem?

braun_lukas

11:22 am on Feb 19, 2015 (gmt 0)

10+ Year Member



Server version: Apache/2.2.22 (Debian)
PHP 5.4.4

braun_lukas

3:29 pm on Feb 19, 2015 (gmt 0)

10+ Year Member



Found this solution, but i don't think its the best idea, since we run other services on our server

Apache as SSL Proxy (mod_ssl) -> passes the connection/data ->
2nd Apache with input filter (mod_deflate) -> passes the connection/data -> PHP

what do you think?

isn't there any better solution?