1

RedBot 告诉我,我的一些资产中有几个严重错误:

  • 内容协商发生时响应状态不同。
  • If-None-Match 条件请求返回 404 状态。因此,RED 没有检查 Content-Negotiation 的其他方面。

我想对此进行调试,但我无法复制 RedBot 的错误。当我尝试时,我得到了这个:

# normal negotiated request
xxx@xxx:~$ curl -I -H 'Accept-Encoding:gzip' http://example.com/css/383010.css
HTTP/1.1 200 OK
Date: Wed, 09 Oct 2013 16:11:12 GMT
Vary: Accept-Encoding
Expires: Thu, 09 Oct 2014 16:11:16 GMT
Etag: "f41e1c3f"
Content-Encoding: gzip
Content-Type: text/css; charset=UTF-8

# RED says this has a 404?
xxx@xxx:~$ curl -I -H 'Accept-Encoding:' http://example.com/css/383010.css
HTTP/1.1 200 OK
Date: Wed, 09 Oct 2013 16:11:31 GMT
Vary: Accept-Encoding
Expires: Thu, 09 Oct 2014 16:11:31 GMT
Etag: "f41e1c3f"
Content-Type: text/css; charset=UTF-8

# RED also says this is a 404?
xxx@xxx:~$ curl -I -H 'If-None-Match: "f41e1c3f"' http://example.com/css/383010.css
HTTP/1.1 200 OK
Date: Wed, 09 Oct 2013 16:29:24 GMT
Server: Apache/2.2.22
Vary: Accept-Encoding
Expires: Thu, 09 Oct 2014 16:29:24 GMT 
Etag: "f41e1c3f"
Content-Type: text/css; charset=UTF-8

有人知道如何复制 RED 看到的错误吗?

4

0 回答 0