神秘...伪造的 Referrer 生成 500 而不是 404 错误
我希望有人能提供一些线索。我已经开始收到 来自不存在的页面的常规 500 错误。不提供 整个错误页面,以下是要点:
[Django] ERROR (EXTERNAL IP): Internal Server Error: /sample/
path/calendar.pl
IOError: request data read error
'HTTP_REFERER': 'http://mydomain.org/calendar.pl',
'PATH_INFO': u'/sample/path/calendar.pl',
如果我访问页面 http://mydomain.org /calendar.pl,我得到 404 错误,但引用同一页面的错误消息会生成 内部服务器(500)错误。
问题: 我应该担心吗? 为什么我收到 500 错误而不是 404 错误? 对于故障排除有什么建议吗?
这几天来一直让我抓狂。任何帮助都非常 赞赏。
谢谢
I hope someone can provide some clues.I have begun receiving
regular 500 errors from a page that does not exist. Without providing
the entire error page, here are the essentials:
[Django] ERROR (EXTERNAL IP): Internal Server Error: /sample/
path/calendar.pl
IOError: request data read error
'HTTP_REFERER': 'http://mydomain.org/calendar.pl',
'PATH_INFO': u'/sample/path/calendar.pl',
If I visit the page http://mydomain.org/calendar.pl, I get a 404
error, but the error message referencing the same page generates an
internal server (500) error.
QUESTIONS:
Should I be concerned?
Why do I get a 500 error instead of 404 error?
Any suggestions for troubleshooting?
This has been driving me nuts for a few days. Any help is very
appreciated.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否正在尝试更改
request
的属性之一,该属性是只读的(或者至少是 应被视为只读")。您是否尝试更改request.META['HTTP_REFERER']
?Are you trying to change one of the attributes of
request
, which are read-only (or at least, should be considered to be read-only"). Are you trying to changerequest.META['HTTP_REFERER']
?这是仍然是一个未解决的错误,可能会在 v. 1.6 中得到解决。
不过,与此同时,您可以使用这个settings.py 文件中的解决方法。
This is still an open bug which might be resolved in v. 1.6.
In the meantime, though, you can use this workaround in your settings.py file.