I am writing a proxy server (college assignment). I've searched for example source code and it seems there are two extremes: byte stream user and character stream user.
From what I know, HTTP messages use ASCII encoding for only the request line (request), the status line (response) and the field names and allow any octet in the field values and request body.
So, what is the right way?
Byte streams are the correct way. Imagine forwarding a zip file download and parsing the content with a character stream...