Hi! (Haven't posted here for ages..)
I've been working on a basic HTTP proxy thingy for the sake of experimenting with Python (Python 3, to be precise), and I've ran into this road block...
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 291: invalid start byte
Sometimes the remote server returns some bytes that can't be decoded with UTF-8, nor ISO-8859-1. Now it's got me stumped, how on the Earth do I know the encoding of the HTTP response when I can't read the Content-type header since I can't decode the HTTP headers!
(These un decode able bytes seem to appear in the content body)
Any help would be awesome.