fix parsing of protocol version
adapt header parsing
internally use BytesIO for HTTP Body