http: https://cs162.org/static/hw/hw-http-rs/docs/background/

MIME type: https://docs.w3cub.com/http/basics_of_http/mime_types/complete_list_of_mime_types.html

HTTP response

only head need to be CRLF, the content need to be LF only!!!

HTTP/1.0 200 OK\\r\\n
Content-Type: text/html\\r\\n
Content-Length: 84\\r\\n
\\r\\n
<html>\\n
<body>\\n
<h1>Hello World</h1>\\n
<p>\\n
Let's see if this works\\n
</p>\\n
</body>\\n
</html>\\n

Socket

https://github.com/Berkeley-CS162/student111/blob/master/hw-http-rs/src/http.rs

listening

connecting