hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erxiang Liu <erxi...@us.ibm.com>
Subject why https site returns 403 when using proxy server?
Date Tue, 02 Jan 2007 21:16:00 GMT

Hello, all:

I am also doing some proxy experiment using apache http client recently.
I added  httpClient.getHostConfiguration().setProxy("x.xx.xx.xxx",80);
//x.xx.xx.xxx is the IP address for the proxy server
in the code.

It works fine when I connect to a http site. eg.
URL url = new URL("http://www.eclipse.org/");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
int result = conn.getResponseCode();
the response code I got is 200.

but when I try to connect to a https site(eg.
the response code is 403. Does anyone has any idea why I got 403?

I set up the test proxy server after editing the httpd.conf file ;
<IfModule !mod_proxy.c>
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests On
ProxyVia On

I am using IBM http server 6.1, which is based on apache server.
Is there anything wrong with the proxy server setup or in the code or sth

thanks in advance!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message