org.jasig.portal.serialize
Class ProxyWriter
java.lang.Object
org.jasig.portal.serialize.ProxyWriter
public class ProxyWriter
- extends Object
Appends PROXY_REWRITE_PREFIX string in front of all the references to images
that are on a remote location that start with http://. This allows the
browser to load the resources without triggering a warning about mixed
content. For example instead of http://www.abc.com/image.gif the URI will be
rewritten to https://[portaladdress]/PROXY_REWRITE_PREFIX/www.abc.com/image.gif
This class also does the proxy rewrite in the following exceptional situations:
1. If the return code pointing to the image is 3XX (the image reference,
references is a mapping to a different location) In this case the final
destination address in which the image or the resource is located is e and
then the rewrite points to this location.
2. If the content of a channel is an include javascript file the file is
rewritten to a location on a local virtual host and at the same time the
image or other resources references are rewritten.
HttpURLConnection.HTTP_MOVED_PERM
- Since:
- uPortal 2.2
- Version:
- $Revision: 19776 $
- Author:
- Kazem Naderi
|
Field Summary |
protected boolean |
_proxying
True if allow rewriting certain elements for proxying. |
|
Method Summary |
protected static String |
considerProxyRewrite(String name,
String localName,
String url)
Examines whether or not the proxying should be done and if so handles different situations by delegating
the rewrite to other methods n the class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_proxying
protected boolean _proxying
- True if allow rewriting certain elements for proxying.
ProxyWriter
public ProxyWriter()
considerProxyRewrite
protected static String considerProxyRewrite(String name,
String localName,
String url)
- Examines whether or not the proxying should be done and if so handles different situations by delegating
the rewrite to other methods n the class.
- Parameters:
name - localName - url -
- Returns:
- value
Copyright © 2010 Jasig. All Rights Reserved.