Jeff-Lewis / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Mangled output - HTTP encoding applied twice #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify version: 2.1
PHP version: 5.2.5

I wanted to install Minify on my account of a shared server.
I tried uploading to:
/www (which seems to be my DOCUMENT_ROOT)
and /www/my_domain

Both resulted in displaying content as attached, when I pointed the browser
to the minify directory (which redirected to builder/).

Did you run the unit tests? Did any FAIL?
Yes:
!FAIL: ImportProcessor (1 of 35 tests run so far have failed)
(output from this test also attached)

How to solve the problem?

Original issue reported on code.google.com by galadia on 6 Oct 2008 at 12:08

Attachments:

GoogleCodeExporter commented 9 years ago
Can you try adding this to config.php?

ini_set('zlib.output_compression', '0');

I'm guessing that the content is being HTTP encoded (deflate/gzip) twice; once 
by 
Minify and once by this directive. If this fixes it I need to add that to 
Minify 
somewhere.

Original comment by mrclay....@gmail.com on 6 Oct 2008 at 3:32

GoogleCodeExporter commented 9 years ago
This directive didn't help, but thanks for the clue - Apache was indeed 
configured to
compress it twice :)

Original comment by galadia on 6 Oct 2008 at 8:21

GoogleCodeExporter commented 9 years ago
Was this Apache setting something that could be detected in $_SERVER or $_ENV? 
I 
guess a unit test could make an external HTTP call to detect this.

Original comment by mrclay....@gmail.com on 6 Oct 2008 at 11:27

GoogleCodeExporter commented 9 years ago
I really don't know. That was a setting in a custom-made admin panel.

Original comment by galadia on 6 Oct 2008 at 11:31

GoogleCodeExporter commented 9 years ago
R252 now can warn of double-encoding in the builder app and gives a warning 
about 
this along with the status of PHP's "zlib.output_compression" option and if it 
could 
be successfully disabled. I think this is about the best I can do here as some 
auto-
encoding is undetectable in PHP.

Original comment by mrclay....@gmail.com on 7 Oct 2008 at 3:12

GoogleCodeExporter commented 9 years ago

Original comment by mrclay....@gmail.com on 7 Oct 2008 at 3:36