initial http parsing

This commit is contained in:
2024-11-11 00:50:39 +01:00
parent 7db494eaaf
commit e5e40c795c
17 changed files with 176 additions and 32 deletions

View File

@@ -9,3 +9,18 @@ Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
```
The first line is a *request line*. It has:
- Method (GET, POST, HEAD, ...)
- Location (the request resource, file)
- HTTP version
# HTTP Response
```bash
HTTP/1.1 200 OK\r\n
Content-Type: text/html\r\n
Content-Length: 88\r\n
Connection: Closed\r\n
\r\n
<HTML>
```