0

I was trying to do this:

Telnet into a Web server and send a multiline request message. Include in the request message the If-modified-since: header line to force a response message with the 304 Not Modified status code.

so I did steps below

telnet example.com 80

and then

GET /index.html HTTP/1.1
Host: example.com

and two enter. and I got some information. I added

If-modified-since: Thu, 17 Oct 2019 06:18:26 GMT

but still no 304 not modified.

this is what I get after GEt and Host

and

HTTP/1.0 501 Not Implemented
Content-Type: text/html
Content-Length: 357
Connection: close
Date: Fri, 30 Apr 2021 16:10:33 GMT
Server: ECSF (dcb/7F80)
negar
  • 11
  • 2

1 Answers1

1

HTTP/1.1 needs the Host header. Your request should be:

GET /index.html HTTP/1.1
Host: hostname.tld

Edit

So if you are connecting to example.com:

GET /index.html HTTP/1.1
Host: example.com


halfer
  • 19,824
  • 17
  • 99
  • 186
Example person
  • 3,198
  • 3
  • 18
  • 45