这是一个有趣的案例,客户端收到“400 错误请求”错误,似乎无法查看使用 Apache/2.2.22 托管在 Ubuntu 12.04.3 LTS 上的 drupal 主页:
错误的请求 您的浏览器发送了此服务器无法理解的请求。请求标头字段的大小超出了服务器限制。
数据包嗅探输出:
...
T 2013/09/02 15:23:10.458167 ###.###.###.###:40027 -> ###.###.###.###:80 [A]
GET / HTTP/1.0.
If-None-Match: "1363160742-0", "1363165573-1", "1363175854-1", "1363175854-0", "1363179616-0", "1363181811-0", "1363239319-1", "1363255903-0", "1363259282-0", "1363263398-1", "1363274564-0", "1363329642-0", "1363332613-1", "1363333851-0", "1363599826-0", "1363678909-0", "1363684227-1", "1363699732-0", "1363755181-0", "1363765691-1", "1363767178-0", "1363780208-0", "1363787589-0", "1363795259-1", "1363852409-1", "1363863225-1", "1363928115-0", "1363951793-0", "1363951793-1", "1364133610-1", "1364187608-1", "1364187608-0", "1364203083-0", "1364208174-0", "1364214930-0", "1364219815-0", "1364274441-1", "1364280930-0", "1364280930-1", "1364286055-1", "1364298840-0", "1364298840-1", "1364360674-0", "1364364356-1", "1364381508-0", "1364385520-1", "1364460734-0", "1364882595-1", "1364903271-0", "1364967946-0", "1364967946-1", "1364981713-0", "1364985142-1", "1364992835-1", "1365061578-0", "1365065290-1", "1365076128-0", "1365141088-1", "1365167701-0", "1365171024-0", "1365402404-1", "1365402404-0", "1365411731-1", "1365416882-0", "1365476715-0", "1365487578-0", "1365488880-1", "1365503922-1", "1365514224-1", "1365579101-0", "1365580320-0", "1365582817-0", "1365584926-0", "1365589524-0", "1365608307-0", "1365649987-0", "1365682295-0", "1365685083-0", "1365770532-1", "1365770532-0", "1365844566-0", "1365996619-1", "1366093719-1", "1366093719-0", "1366115408-0", "1366180275-1", "1366186431-0", "1366196476-0", "13662669
...
在这个阶段,我不能 100% 确定它是否仅限于特定的客户端,但用户使用以下用户代理字符串报告了该错误:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/534.57.7 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.7
现在剩下的问题是该怎么办,是服务器问题还是客户端行为不当?
答案1
这将导致用户的代理服务器保存过多缓存页面变体(旧版本的 squid 会这样做,例如)。让他们升级或删除代理服务器,清除浏览器缓存,然后重试。
也可能是你的缓存反向代理(如果您正在运行)。