我有一台有互联网连接的服务器(1)和一台没有(2)的服务器。 在(1)我有配置的Squid服务器:
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl portal1 src 192.168.153.40/32
acl mediation1 src 172.21.78.138/32
acl mediation2 src 172.21.78.139/32
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow mediation1
http_access allow mediation2
http_access allow portal1
http_access allow localhost
http_access deny all
http_port 3128 transparent
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname "webcol-ctip01"
cache deny all
request_body_max_size 10 MB
client_request_buffer_max_size 20 MB
request_header_max_size 10 MB
开(2)我有复杂的应用程序需要通过POST将一些数据发送到外部主机。我能够连接到代理:
# export http_proxy=http://192.168.153.40:3128
# wget -O - http://google.com
--2013-02-15 21:20:55-- http://google.com/
Connecting to 192.168.153.40:3128... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://www.google.com/ [following]
--2013-02-15 21:20:55-- http://www.google.com/
Connecting to 192.168.153.40:3128... connected.
Proxy request sent, awaiting response... 302 Moved Temporarily
Location: http://www.google.ru/ [following]
--2013-02-15 21:20:55-- http://www.google.ru/
Connecting to 192.168.153.40:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “STDOUT”
...etc...
但是我在应用程序中发送的特定请求给了我错误。这是curl的再现错误:
curl -k --request POST --header“Content-type:text / xml”--data @req.xml http://some-domain.webex.com/WBXServ...iew/XMLService
Invalid Request error was encountered while trying to process the request:
POST /WBXService/preview/XMLService HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Host: some-domain.webex.com
Accept: */*
Proxy-Connection: Keep-Alive
Content-Type: text/xml
Content-Length: 1510
Expect: 100-continue
Some possible problems are:
Missing or unknown request method.
Missing URL.
Missing HTTP Identifier (HTTP/1.0).
Request is too large.
Content-Length missing for POST or PUT requests.
Illegal character in hostname; underscores are not allowed.
HTTP/1.1 "Expect:" feature is being asked from an HTTP/1.0 software.
Your cache administrator is root.
同时在访问日志中:
1360949609.433 0 172.21.78.138 NONE/417 4317 POST http://some-domain.webex.com/WBXServ...iew/XMLService - NONE/- text/html
OS CentOS 6.3 x64&鱿鱼3.1.10
我在这里缺少什么?