我正在尝试使用 telnet 强制响应 304 not modified 状态代码。我没有看到我的命令有问题,但我仍然有 200 OK 状态。
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>
HTTP/1.1 200 OK
Server: Apache
Last-Modified: Wed, 30 Oct 2013 00:32:31 GMT
Vary: Accept-Encoding
X-Server: noisy
Cache-Control: max-age=60
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 30 Oct 2013 00:36:11 GMT
X-Varnish: 391424540 391424396
Age: 13
Via: 1.1 varnish
X-Varnish-Cache: HIT
X-Varnish-Server: noisy.lemonde.fr