You are viewing a plain text version of this content. The canonical link for it is here.
Posted to portalapps-dev@portals.apache.org by wo...@apache.org on 2014/08/25 01:17:58 UTC
svn commit: r1620234 -
/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/rewriter/DefaultReverseProxyTextLineContentRewriter.java
Author: woonsan
Date: Sun Aug 24 23:17:58 2014
New Revision: 1620234
URL: http://svn.apache.org/r1620234
Log:
APA-60: adding more non-rewritable uris
Modified:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/rewriter/DefaultReverseProxyTextLineContentRewriter.java
Modified: portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/rewriter/DefaultReverseProxyTextLineContentRewriter.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/rewriter/DefaultReverseProxyTextLineContentRewriter.java?rev=1620234&r1=1620233&r2=1620234&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/rewriter/DefaultReverseProxyTextLineContentRewriter.java (original)
+++ portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/rewriter/DefaultReverseProxyTextLineContentRewriter.java Sun Aug 24 23:17:58 2014
@@ -175,9 +175,12 @@ public class DefaultReverseProxyTextLine
protected boolean isRewritableURI(String uri)
{
// mailto: URIs often contain invalid characters in web pages to avoid spams
- // and data: URIs do not need to be parsed at all.
+ // and #, javascript: and data: URIs do not need to be parsed at all.
// These should be avoided in URI rewriting.
- if (StringUtils.startsWith(uri, "mailto:") || StringUtils.startsWith(uri, "data:"))
+ if (StringUtils.startsWith(uri, "#")
+ || StringUtils.startsWith(uri, "javascript:")
+ || StringUtils.startsWith(uri, "mailto:")
+ || StringUtils.startsWith(uri, "data:"))
{
return false;
}