Message86094
The zlib module doesn't support raw deflate format, so it doesn't
completely interoperate with php's "gzdeflate" function and fails to
decompress some strings that web browsers can decompress.
A workaround is to use a special zlib feature and pass the value -15 as
the "wbits" arg:
plaintext = zlib.deflate(compressed_text, wbits=-15)
I don't know if it's appropriate to mess with the code, but at minimum I
urge that the workaround be mentioned in the docs. We had a tremendous
distruption where I work because of a malicious raw-deflated PHP script
that we couldn't decompress with Python for analysis. We had to resort
to decompressing in a PHP container that (through my slipping up) it
proceeded to escape from.
Help us Python-Kenobi, save us from PHP ;-) |
|
Date |
User |
Action |
Args |
2009-04-17 22:10:22 | phr | set | recipients:
+ phr |
2009-04-17 22:10:21 | phr | set | messageid: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> |
2009-04-17 22:10:20 | phr | link | issue5784 messages |
2009-04-17 22:10:18 | phr | create | |
|