From: <ikr...@us...> - 2012-02-21 01:39:23
|
Revision: 3617 http://archive-access.svn.sourceforge.net/archive-access/?rev=3617&view=rev Author: ikreymer Date: 2012-02-21 01:39:14 +0000 (Tue, 21 Feb 2012) Log Message: ----------- FIX: Make RobotExclusionFilter properties protected for subclasses overrides ADD: Missing ProxyInfo for ProxyAccessPoint support Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ProxyInfo.jsp Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2012-02-18 08:34:32 UTC (rev 3616) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2012-02-21 01:39:14 UTC (rev 3617) @@ -62,16 +62,16 @@ private final static Logger LOGGER = Logger.getLogger(RobotExclusionFilter.class.getName()); - private final static String HTTP_PREFIX = "http://"; - private final static String ROBOT_SUFFIX = "/robots.txt"; + protected final static String HTTP_PREFIX = "http://"; + protected final static String ROBOT_SUFFIX = "/robots.txt"; - private static String WWWN_REGEX = "^www[0-9]+\\."; - private final static Pattern WWWN_PATTERN = Pattern.compile(WWWN_REGEX); + protected static String WWWN_REGEX = "^www[0-9]+\\."; + protected final static Pattern WWWN_PATTERN = Pattern.compile(WWWN_REGEX); private LiveWebCache webCache = null; private HashMap<String,RobotRules> rulesCache = null; private long maxCacheMS = 0; private String userAgent = null; - private StringBuilder sb = null; + protected StringBuilder sb = null; private final static RobotRules emptyRules = new RobotRules(); private boolean notifiedSeen = false; private boolean notifiedPassed = false; Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ProxyInfo.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ProxyInfo.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ProxyInfo.jsp 2012-02-21 01:39:14 UTC (rev 3617) @@ -0,0 +1,49 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="java.util.ArrayList" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<%@ page import="org.archive.wayback.accesspoint.proxy.ProxyAccessPoint" %> +<%@ page import="org.archive.wayback.accesspoint.AccessPointConfigs" %> +<%@ page import="org.archive.wayback.accesspoint.AccessPointConfig" %> +<% +ProxyAccessPoint accessPoint = (ProxyAccessPoint)request.getAttribute("proxyAccessPoint"); +String contextRoot = accessPoint.getReplayPrefix(); +String referrer = request.getHeader("Referer"); +String logoPath = contextRoot + "images/logo_bw.gif"; +if (referrer == null) { + referrer = "Wayback"; +} +%> + +<p style="text-align: center"><img src="<%= logoPath %>"/><h2>Wayback Proxy Mode Configuration</h2><img src="<%= logoPath %>"/> +<h2>Go To: <a href="<%= contextRoot + ProxyAccessPoint.SWITCH_COLLECTION_PATH%>"><%= referrer %></a></h2> +</p> +<p>Your browser is running with Wayback Machine as proxy mode, but it doesn't know which archived collection to use</p> +<p>When prompted, the <i>Username</i> is the <i>Collection Id</i> or <i>Collection Name</i> for your collection</p> +<i>The password is ignored and may be left blank</i></p> +<p>The following collections are available:</p> + +<table> +<tr> +<td><i>Collection Id</i></td> +</tr> + +<% + +AccessPointConfigs accessPointConfigs = accessPoint.getAccessPointConfigs(); + +if (accessPointConfigs != null) { + for (AccessPointConfig theConfig : accessPointConfigs.getAccessPointConfigs().values()) { + %> + <tr> + <td> + <%= theConfig.getBeanName() %> + </td> + </tr> + <% + } +} + +%> + +</table> Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ProxyInfo.jsp ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |