Re: How to uncompress HTTP GZIP data



"Hans-Peter Diettrich" <DrDiettrich@xxxxxxxxxxx> wrote in message
news:40rifvF1c96b9U2@xxxxxxxxxxxxxxxxx
> badshah2000@xxxxxxxxxxx schrieb:
[...]
>> HOW COULD I UNCOMPRESS THE CAPTURED HTTP DATA?
>
> Most probably you have lost data, at least the header part, then
> it's impossible to recover anything :-(
>
> When the data start with a different compression signature, try to
> decompress accordingly.

Be careful with that. It is good to be liberal in what you accept, but
this opens the door to undefined behaviour and possible abuse.

The compression types are advertised in the response header. If the
server lies about that, that's an error and should be reported and
fixed, not worked around.

If it starts 'MZ', should you blindly execute it?

Groetjes,
Maarten Wiltink


.


Quantcast