我应该找什么,当wget返回500,但相同的URL在我的网页浏览器中正常工作? 我没有看到任何似乎与错误有关的access_log条目。
在linux-gnu上由Wget 1.14创build的DEBUG输出。
<SSL negotiation info stripped out> ---request begin--- GET /survey/de/tools/clear-caches/password/<some-token> HTTP/1.1 User-Agent: Wget/1.14 (linux-gnu) Accept: */* Host: testing.thesurveylab.net Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... ---response begin--- HTTP/1.0 500 Internal Server Error Date: Wed, 12 Dec 2012 14:53:07 GMT Server: Apache/2.2.3 (CentOS) Set-Cookie: blueprint2-staging=8jnbmkqapl30hjkgo0u6956pd1; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Strict-Transport-Security: max-age=8640000;includeSubdomains X-UA-Compatible: IE=Edge,chrome=1 Content-Length: 5 Connection: close Content-Type: text/html; charset=UTF-8 ---response end--- 500 Internal Server Error Stored cookie testing.thesurveylab.net -1 (ANY) / <session> <insecure> [expiry none] blueprint2-staging 8jnbmkqapl30hjkgo0u6956pd1 Closed 3/SSL 0x0000000001f33430 2012-12-12 15:53:07 ERROR 500: Internal Server Error.
这可能有一个巨大的原因,但是每当我遇到同样的问题,无论是使用wget还是其他一些下载程序,通常是因为网站上有代码,用于以某种方式响应“正常”网页浏览器。 随之而来的是wget或者类似的,代码被破坏了,因为它没有代码,也没有适当的回退。 这样的网站通常也为非常旧的浏览器打破。 在这种情况下,你必须让下载器模仿一个普通的浏览器才能正常工作。
这个问题已经被问到并回答了这个线程。
It's a bug in the webpage. The HTTP status is indeed seemingly incorrectly set to HTTP 500. Firefox/Firebug also confirms this. Basically, you're facing a HTTP 500 error page with "normal" content. Report it to the site admin.
https://stackoverflow.com/questions/6083102/http-500-error-in-wget