

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Server
incomplete
2: Content Length
incomplete
3: Response
incomplete
4: Other Common Headers
incomplete
5: Handler
incomplete
6: Code Review
incomplete
7: Refactor
incomplete
This lesson's interactive features are locked, please to keep using them
Take another look at the hard coded HTTP response we sent back:
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 13
Hello World!
The body includes the trailing newline after Hello World!, so it's 13 bytes.
It includes the content length which the RFC says to include. From RFC9112 6.2:
For messages that do include content, the Content-Length field value provides the framing information necessary for determining where the data (and message) ends.
curl -v localhost:42069
Read the error message that is printed out carefully, and answer the question. Curl is mad because it's forced to use the connection close to determine when the response ends because we didn't tell it how long the response is.
In the next lesson, we'll solve this problem.