Linux curl成功,但wget对自定义端口上的请求给出502错误 $curlhttp://localhost:7810/test 你好,世界! $ $ $wgethttp://localhost:7810/test --2011-09-27 07:04:06-- http://localhost:7810/test 解决 连接到已连接的。 代理请求已发送,正在等待响应。。。502坏网关 2011-09-27 07:04:06错误502:坏网关。 $

Linux curl成功,但wget对自定义端口上的请求给出502错误 $curlhttp://localhost:7810/test 你好,世界! $ $ $wgethttp://localhost:7810/test --2011-09-27 07:04:06-- http://localhost:7810/test 解决 连接到已连接的。 代理请求已发送,正在等待响应。。。502坏网关 2011-09-27 07:04:06错误502:坏网关。 $,linux,curl,wget,Linux,Curl,Wget,似乎wget正在查看端口80,尽管我指定了7810。如何解决此问题?您有一个配置文件,可能是~/.wgetrc,其中指定了代理 $ curl http://localhost:7810/test hello world! $ $ $ wget http://localhost:7810/test --2011-09-27 07:04:06-- http://localhost:7810/test Resolving <snipped> Connecting to <sni

似乎wget正在查看端口
80
,尽管我指定了
7810
。如何解决此问题?

您有一个配置文件,可能是
~/.wgetrc
,其中指定了代理

$ curl http://localhost:7810/test
hello world!
$ 
$ 
$ wget http://localhost:7810/test
--2011-09-27 07:04:06--  http://localhost:7810/test
Resolving <snipped>
Connecting to <snipped> connected.
Proxy request sent, awaiting response... 502 Bad Gateway
2011-09-27 07:04:06 ERROR 502: Bad Gateway.

$