500 在 javascript、wget 上。但可以在浏览器中使用

发布于 2024-12-19 10:40:49 字数 779 浏览 3 评论 0原文

我有一个在本地主机上运行的 Django 服务器。当我在浏览器上输入如下所示的 get 请求时:

http://localhost:9000/article/asdasd 

我会显示正确的页面。但是当我在 wget 或 javascript 中尝试它时,我收到 500 内部服务器错误。有一次我看到连接被拒绝。

非常感谢任何关于我应该从哪里开始解决这个问题的提示。

更多信息(如果有帮助):

当我使用 wget http://localhost:9000/... 我得到以下连接拒绝错误。

Resolving localhost... ::1, 127.0.0.1, fe80::1
Connecting to localhost|::1|:9000... failed: Connection refused.
Connecting to localhost|127.0.0.1|:9000... connected.
HTTP request sent, awaiting response... 500 INTERNAL SERVER ERROR
2011-12-04 00:02:37 ERROR 500: INTERNAL SERVER ERROR.

但是,当仅使用 wget http://127.0.0.1/ 时...我只是单独收到内部服务器错误。

I have a Django server running on localhost. When I type a get request on the browser like this:

http://localhost:9000/article/asdasd 

I get the proper page displayed. But when I try it in wget or from javascript I get a 500 Internal Server Error. At one point I saw Connection refused.

Any hints regarding where I should start looking to fix this is much appreciated.

More info if it helps:

When I use wget http://localhost:9000/... I get the following Connection refused error.

Resolving localhost... ::1, 127.0.0.1, fe80::1
Connecting to localhost|::1|:9000... failed: Connection refused.
Connecting to localhost|127.0.0.1|:9000... connected.
HTTP request sent, awaiting response... 500 INTERNAL SERVER ERROR
2011-12-04 00:02:37 ERROR 500: INTERNAL SERVER ERROR.

But when using just wget http://127.0.0.1/... I just get the internal server error alone.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北凤男飞 2024-12-26 10:40:49

您的开发服务器中是否存在多个请求?我发现 django 中的服务器只能用于一个请求。其他的会导致服务器内部问题。

Is there multiple request in your develop server? I find that the server in django would only available for only one request. Others would cause internal problem of the server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文