public RemoteHttpServletRequest(HttpServletRequest request){
  super(request);
  Cookie[] cookies=request.getCookies();
  if (cookies != null) {
    if (cookies.length > 0) {
      internalCookies=new RemoteCookie[cookies.length];
    }
    for (int c=0; c < cookies.length; c++) {
      internalCookies[c]=new RemoteCookie(cookies[c]);
    }
  }
  Enumeration hNames=getHeaderNames();
  while (hNames.hasMoreElements()) {
    String headerName=(String)hNames.nextElement();
    internalHeader.put(headerName,getHeader(headerName));
    internalHeaders.put(headerName,createSet(getHeaders(headerName)));
    headerNames.add(headerName);
  }
  method=getMethod();
  pathInfo=getPathInfo();
  pathTranslated=getPathTranslated();
  contextPath=getContextPath();
  queryString=getQueryString();
  remoteUser=getRemoteUser();
  userPrincipal=getUserPrincipal();
  requestedSessionId=getRequestedSessionId();
  requestURI=getRequestURI();
  requestURL=getRequestURL();
  servletPath=getServletPath();
  remoteSession=new RemoteSession(getSession());
}

public RemoteHttpServletRequest ( HttpServletRequest request ) { super ( request ) ; Cookie [ ] cookies = request . getCookies ( ) ; if ( cookies != null ) { if ( cookies . length > 0 ) { internalCookies = new RemoteCookie [ cookies . length ] ; } for ( int c = 0 ; c < cookies . length ; c ++ ) { internalCookies [ c ] = new RemoteCookie ( cookies [ c ] ) ; } } Enumeration hNames = getHeaderNames ( ) ; while ( hNames . hasMoreElements ( ) ) { String headerName = ( String ) hNames . nextElement ( ) ; internalHeader . put ( headerName , getHeader ( headerName ) ) ; internalHeaders . put ( headerName , createSet ( getHeaders ( headerName ) ) ) ; headerNames . add ( headerName ) ; } method = getMethod ( ) ; pathInfo = getPathInfo ( ) ; pathTranslated = getPathTranslated ( ) ; contextPath = getContextPath ( ) ; queryString = getQueryString ( ) ; remoteUser = getRemoteUser ( ) ; userPrincipal = getUserPrincipal ( ) ; requestedSessionId = getRequestedSessionId ( ) ; requestURI = getRequestURI ( ) ; requestURL = getRequestURL ( ) ; servletPath = getServletPath ( ) ; remoteSession = new RemoteSession ( getSession ( ) ) ; }
creates a serializable request around the normal request .
