[
http://jira.jboss.com/jira/browse/JBREM-27?page=comments#action_12340008 ]
susanin commented on JBREM-27:
------------------------------
Hi Tom,
we have a setup, where a remoting client tries to access some EJB3 beans deployed JBoss.
Since client is behind a firewall, we decided to use RMI-over-HTTP to access the server
and we do it via an http proxy. So, we set system
properties http.proxyHost and httpProxy.port like follows:
http.proxyHost =www-proxy.domain.com
http.proxyPort = 8080
and the real http address we want to access is:
http://x.y.z.w:8888/SharedStateManager (real IP address is now shown here)
We have discovered that proxy support works incorrectly in current implementation of
remoting. Under ethereal, we have observed the following:
POST
http://www-proxy.domain.com:8080http://x.y.z.w:8888/SharedStateManager HTTP/1.1
Content-Type: application/octet-stream
User-Agent: Java/1.5.0
Host: www-proxy.domain.com:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive
Content-Length: 1169
The problem is the first line. It is totally wrong. This is not the format expected by
HTTP proxies.
And this line is create by the new URL(...) call in the class HTTPClientInvoker arount his
code:
// now determin if going to use proxy or not
if (proxyHost != null && proxyOn)
{
// is ok if port is -1 since URL constructor will use default port for protocol
externalURL = new URL("http", proxyHost, proxyPort, url); //
<---------------- This is WRONG!!!
httpURLConn = (HttpURLConnection) externalURL.openConnection();
// since know it is a proxy being used, see if have proxy auth
String proxyAuth = getProxyAuth(metadata);
if (proxyAuth != null)
{
httpURLConn.setRequestProperty("Proxy-Authorization", proxyAuth);
}
}
The bug is still present in the latest CVS version:
http://fisheye.jboss.org/viewrep/JBoss/JBossRemoting/src/main/org/jboss/r...
I don't know exactly, how to fix it, but may be something like following idea can
help?
1) Remember current global proxy related properties
2) Change global proxy related properties (e.g. http.proxyHost, etc) to the required
values
3) Let the HttpURLConnection create a connection/url using this properties
4) Restore global properties afterwards.
Hope, you will fix this bug easily and pretty soon.
Best Regards,
Ivan
Support for HTTP/HTTPS proxy
----------------------------
Key: JBREM-27
URL:
http://jira.jboss.com/jira/browse/JBREM-27
Project: JBoss Remoting
Issue Type: Feature Request
Components: transport
Reporter: Thomas Diesler
Assigned To: Tom Elrod
Priority: Optional
Fix For: 1.2.0 final
This request showed up on the web services forum. Proxies are currently suported in
axis-ws4ee.jar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira