dimanche 25 août 2019

Extract gzip content from raw http response

I try to do http(not https scheme, i.e url is http://www.example.com) get simply by socket module, then I recv response which contains all tranferred data from server(header and body with gzip encoded).Then I try to extract gzipped body content. I guess this content should start at \x1f\x8b\x08 , but I don't know where it should end.Any help?

Below is my raw response

HTTP/1.1 200 OK\r\n
Header Part\r\n
\r\n
some_number_here\r\n
\x1f\x8b\x08 ......
......\r\n
0\r\n
\r\n




Aucun commentaire:

Enregistrer un commentaire