当在公共网(如:ADSL)环境运行以下命令没有任何问题
curl
http://IP/food -H
http://www.xxx.com但如果在局域网内经过 proxy就报错(proxy server和 port都已正确设定)。用的proxy服务器有两种:Cisco ironport 和 Linux squid. 两种 proxy都不可以通过
我猜想 proxy server 可能对http request的 header作了些修改。不知对不对,也不知该如何解决。请大牛指点
补充:忘记将错误信息贴上,由于手机版知乎不能修改,只好等到家有电脑了才补上
curl局域网内运行完整信息:
* Rebuilt URL to: *.*.*.* (destination IP)
* Hostname was NOT found in DNS cache
* Trying x.x.x.x (proxy_server ip) ...
* Connected to x.x.x.x (proxy server ip) port 8080 (#0)
> GET http://*.*.*.*/ HTTP/1.1
> User-Agent: curl/7.35.0
> Accept: */*
> Proxy-Connection: Keep-Alive
> Host:
http://www.xxx.com>
< HTTP/1.1 403 Forbidden
< Date: Sun, 23 Nov 2014 04:07:58 GMT
* Server Apache is not blacklisted
< Server: Apache
< Vary: Accept-Encoding
< Keep-Alive: timeout=2, max=196
< Content-Type: text/html; charset=iso-8859-1
< Content-Length: 202
< Via: 1.1 proxy_ip:80 (Cisco-IronPort-WSA/7.5.2-303)
< Connection: keep-alive
< Proxy-Connection: keep-alive
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.</p>
</body></html>
* Connection #0 to host proxy_server left intact
当在公共网(如:ADSL)环境运行以下命令没有任何问题
curl http://IP/food -H http://www.xxx.com
但如果在局域网内经过 proxy就报错(proxy server和 port都已正确设定)。用的proxy服务器有两种:Cisco ironport 和 Linux squid. 两种 proxy都不可以通过
我猜想 proxy server 可能对http request的 header作了些修改。不知对不对,也不知该如何解决。请大牛指点
补充:忘记将错误信息贴上,由于手机版知乎不能修改,只好等到家有电脑了才补上
curl局域网内运行完整信息:
* Rebuilt URL to: *.*.*.* (destination IP)
* Hostname was NOT found in DNS cache
* Trying x.x.x.x (proxy_server ip) ...
* Connected to x.x.x.x (proxy server ip) port 8080 (#0)
> GET http://*.*.*.*/ HTTP/1.1
> User-Agent: curl/7.35.0
> Accept: */*
> Proxy-Connection: Keep-Alive
> Host: http://www.xxx.com
>
… 显示全部