How can I convert my byte stream (socket.recv()) to string or maybe how should I decode?
I want to build a connection to a server but when I try to decode my recv() bytestream then I got an UnicodeDecodeError which I can solve with add ignore to decode but then I got with utf-8 a string which I can't read (maybe utf-8 is the false codec, but how should I know which I have to use?)
This is what I get from the recv()
b'HTTP/1.1 200 OK\r\nDate: Tue, 14 May 2019 17:28:11 GMT\r\nServer: Apache/2.2.22 (Debian)\r\nAccept-Encoding\r\nContent-Encoding: gzip\r\nContent-Length: 5934\r\nKeep-Alive: timeout=2, max=5\r\nConnection: Keep-Alive\r\nContent-Type: text/html;charset=utf-8\r\n\r\n\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03\xed]\
..
.a little bit more bytes
...
#3\x81\x15ntT (at the end)