代理访问外网:https://api.weixin.qq.com/ 返回403--新手问题

xiaocheng_163com 2016-10-28 01:41:41
13:14:08.029 [http-8080-10] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter http.authentication.preemptive = true
13:14:08.029 [http-8080-10] DEBUG o.a.c.h.params.DefaultHttpParams - Set parameter http.protocol.content-charset = UTF-8
13:14:08.029 [http-8080-10] DEBUG o.a.c.httpclient.HttpMethodDirector - Preemptively sending default basic credentials
13:14:08.029 [http-8080-10] DEBUG o.a.c.httpclient.HttpMethodDirector - Authenticating with BASIC <any realm>@api.weixin.qq.com:443
13:14:08.030 [http-8080-10] WARN o.a.c.httpclient.HttpMethodDirector - Required credentials not available for BASIC <any realm>@api.weixin.qq.com:443
13:14:08.030 [http-8080-10] WARN o.a.c.httpclient.HttpMethodDirector - Preemptive authentication requested but no default credentials available
13:14:08.030 [http-8080-10] DEBUG o.a.c.httpclient.HttpConnection - Open connection to 10.106.13.9:8085
13:14:08.031 [http-8080-10] DEBUG o.a.c.httpclient.HttpMethodDirector - Preemptively sending default basic credentials
13:14:08.031 [http-8080-10] DEBUG o.a.c.httpclient.HttpMethodDirector - Authenticating with BASIC <any realm>@10.106.13.9:8085
13:14:08.031 [http-8080-10] DEBUG o.a.c.h.params.HttpMethodParams - Credential charset not configured, using HTTP element charset
13:14:08.031 [http-8080-10] DEBUG httpclient.wire.header - >> "CONNECT api.weixin.qq.com:443 HTTP/1.1"
13:14:08.031 [http-8080-10] DEBUG o.a.c.httpclient.HttpMethodBase - Adding Host request header
13:14:08.031 [http-8080-10] DEBUG httpclient.wire.header - >> "Proxy-Authorization: Basic eGlhbmwtYXBwLWpxc2RBcHA6MTIzNDU2[\r][\n]"
13:14:08.032 [http-8080-10] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
13:14:08.032 [http-8080-10] DEBUG httpclient.wire.header - >> "Host: api.weixin.qq.com[\r][\n]"
13:14:08.032 [http-8080-10] DEBUG httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]"
13:14:08.032 [http-8080-10] DEBUG httpclient.wire.header - >> "[\r][\n]"
13:14:08.033 [http-8080-10] DEBUG httpclient.wire.header - << "HTTP/1.1 403 Forbidden[\r][\n]"
13:14:08.033 [http-8080-10] DEBUG httpclient.wire.header - << "HTTP/1.1 403 Forbidden[\r][\n]"
13:14:08.033 [http-8080-10] DEBUG httpclient.wire.header - << "Server: Sun-Java-System-Web-Proxy-Server/4.0[\r][\n]"
13:14:08.033 [http-8080-10] DEBUG httpclient.wire.header - << "Date: Fri, 28 Oct 2016 05:17:56 GMT[\r][\n]"
13:14:08.033 [http-8080-10] DEBUG httpclient.wire.header - << "Content-length: 1052[\r][\n]"
13:14:08.033 [http-8080-10] DEBUG httpclient.wire.header - << "Content-type: text/html[\r][\n]"
13:14:08.033 [http-8080-10] DEBUG httpclient.wire.header - << "[\r][\n]"
13:14:08.034 [http-8080-10] DEBUG o.a.commons.httpclient.ConnectMethod - CONNECT status code 403
13:14:08.034 [http-8080-10] DEBUG o.a.c.httpclient.HttpMethodDirector - CONNECT failed, fake the response for the original method
13:14:08.034 [http-8080-10] DEBUG o.a.c.httpclient.HttpMethodBase - Buffering response body
java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:162)
at java.io.BufferedInputStream.read(BufferedInputStream.java:325)
at org.apache.commons.httpclient.WireLogInputStream.read(WireLogInputStream.java:69)
at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
...全文
2211 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
当作看不见 2016-10-28
  • 打赏
  • 举报
回复
服务器已经理解请求,但是拒绝执行它。与401响应不同的是,身份验证并不能提供任何帮助,而且这个请求也不应该被重复提交。如果这不是一个 HEAD 请求,而且服务器希望能够讲清楚为何请求不能被执行,那么就应该在实体内描述拒绝的原因。当然服务器也可以返回一个404响应,假如它不希望让客户端获得任何信息。

5,657

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧