From be7a71f503f676b0e3dcce389bd6ee91903c4aa4 Mon Sep 17 00:00:00 2001 From: Minteck ⭐ Date: Sun, 7 Nov 2021 17:29:22 +0100 Subject: Update 'DEMO.md' --- DEMO.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/DEMO.md b/DEMO.md index 6e07f7f..ca11840 100644 --- a/DEMO.md +++ b/DEMO.md @@ -12,4 +12,32 @@ User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.9,fr;q=0.8 -``` \ No newline at end of file +``` + +## HTTP/1.1 Response + +An HTTP response looks like this: +```http +HTTP/1.1 200 OK +Server: nginx +Date: Sun, 07 Nov 2021 16:25:17 GMT +Content-Type: text/html; charset=utf-8 +Content-Length: 14 +Connection: keep-alive +X-Frame-Options: SAMEORIGIN +X-XSS-Protection: 1; mode=block +Cache-Control: private, no-cache, no-store, must-revalidate +X-Content-Type-Options: nosniff +Pragma: no-cache +Expires: Sat, 01 Jan 2000 00:00:00 GMT +Referrer-Policy: no-referrer-when-downgrade + +The content goes here. +``` + +* The empty line is important as it marks the end of the headers and the start of the actual content. + +The following headers are especially important: +* `Content-Type` marks the type of content and what the browser needs to do with it. +* `Server` is the name of the server software. We'll probably put `Bashweb/1.0 ` in here. +* `Content-Length` is not required but recommended, especially with file downloads. \ No newline at end of file -- cgit