Issue 78 in urlrewritefilter: proxy to https target fails w/ org.apache.commons.httpclient.ProtocolException

38 views
Skip to first unread message

urlrewri...@googlecode.com

unread,
Aug 31, 2010, 3:49:34 PM8/31/10
to urlre...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 78 by sakowski: proxy to https target fails w/
org.apache.commons.httpclient.ProtocolException
http://code.google.com/p/urlrewritefilter/issues/detail?id=78

What steps will reproduce the problem?
1. Create a rule that proxyies to a https url like so:
<rule>
<from>^/foo/(.*)$</from>
<to type="proxy" last="true">https://zot.com/$1</to>
</rule>

2. Exercise the rule by going to /foo on the urlrewrite server.

What is the expected output? What do you see instead?

Expect to see the output of https://zot.com, instead get
org.apache.commons.httpclient.ProtocolException: The server zot.com failed
to respond with a valid HTTP response
at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1846)
at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at
org.tuckey.web.filters.urlrewrite.RequestProxy.execute(RequestProxy.java:124)
at
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:277)
at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
.
.
.


What version of the product are you using? On what operating system?
I initially found the issue on urlrewritefilter-3.2.0 but problem remained
after upgrading to 4.0.0 from svn trunk.

This was specifically showing up on a Centos 5.3 64-bit server running
atlassian jira version 3.12.2 with jakarta-commons-httpclient-3.0.1-3.jpp5
and java 1.6.0_03-b05.

Please provide any additional information below.
I traced this to a line in RequestProxy.java. Not having https support
makes it tough to solve cross-domain scripting issues in a https
environment. Patch is attached.

Attachments:
protocol.patch 652 bytes

urlrewri...@googlecode.com

unread,
Nov 5, 2010, 2:47:02 PM11/5/10
to urlre...@googlegroups.com

Comment #1 on issue 78 by pietro5266: proxy to https target fails w/
org.apache.commons.httpclient.ProtocolException
http://code.google.com/p/urlrewritefilter/issues/detail?id=78

Same problem here, exactly. Going to try patch. I believe this would be
an important fix.

urlrewri...@googlecode.com

unread,
Jun 24, 2012, 10:03:49 PM6/24/12
to urlre...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 78 by p...@tuckey.org: proxy to https target fails w/
org.apache.commons.httpclient.ProtocolException
http://code.google.com/p/urlrewritefilter/issues/detail?id=78

Fixed in SVN. Please verify this works ok. Will be released in 4.0.2.

Reply all
Reply to author
Forward
0 new messages