Question

'm trying to use the If-Modified-Since command in Telnet. I want to get a 304 Not modified statut code. I tried this but it don't work, I get a 400 bad request error

telnet lemonde.fr 80

GET /index.html HTTP/1.1
User-Agent: Mozilla/5.0
From: yahoo.com 
Accept: text/html,text/plain,application/*
Host: www.lemonde.fr
If-Modified-Since: Wed, 19 Oct 2015 10:50:00 GMT
<linefeed>

I got as a result

HTTP/1.0 400 Bad request Cache-Control: no-cache Connection: close Content-Type: text/html

No correct solution

OTHER TIPS

You need to define the HTTP port. So try:

telnet lemonde.fr 80

The default telnet port is 23. So you won't be able to communicate with the HTTP server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top