org.archive.wayback.liveweb
Class ARCUnwrappingProxy

java.lang.Object
  extended by org.archive.wayback.util.webapp.AbstractRequestHandler
      extended by org.archive.wayback.liveweb.ARCUnwrappingProxy
All Implemented Interfaces:
RequestHandler, org.springframework.beans.factory.BeanNameAware

public class ARCUnwrappingProxy
extends AbstractRequestHandler

ServletRequestContext which proxies to an ARCRecordingProxy, and unwraps the "application/x-arc-record" MIME response into the inner HTTP response, sending all HTTP headers AS-IS, and the HTTP Entity. Can be used to use an ARCRecordingProxy with a UserAgent expecting real HTTP responses, not "application/x-arc-record". A web browser for example.

Author:
brad

Constructor Summary
ARCUnwrappingProxy()
           
 
Method Summary
 boolean handleRequest(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
          Possibly handle an incoming HttpServletRequest, much like a normal HttpServlet, but includes a return value.
 void setProxyHostPort(String hostPort)
           
 
Methods inherited from class org.archive.wayback.util.webapp.AbstractRequestHandler
getBeanName, getMapParam, getMapParamOrEmpty, getRequiredMapParam, getServletContext, registerPortListener, setBeanName, setServletContext, translateRequestPath, translateRequestPathQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ARCUnwrappingProxy

public ARCUnwrappingProxy()
Method Detail

handleRequest

public boolean handleRequest(javax.servlet.http.HttpServletRequest httpRequest,
                             javax.servlet.http.HttpServletResponse httpResponse)
                      throws javax.servlet.ServletException,
                             IOException
Description copied from interface: RequestHandler
Possibly handle an incoming HttpServletRequest, much like a normal HttpServlet, but includes a return value.

Parameters:
httpRequest - the incoming HttpServletRequest
httpResponse - the HttpServletResponse to return data to the client.
Returns:
true if the RequestHandler returned a response to the client, false otherwise
Throws:
javax.servlet.ServletException - for usual reasons.
IOException - for usual reasons.

setProxyHostPort

public void setProxyHostPort(String hostPort)
Parameters:
hostPort - location of ARCRecordingProxy ServletRequestContext, ex: "localhost:3128"


Copyright © 2005-2011 Internet Archive. All Rights Reserved.