Package dk.netarkivet.viewerproxy
Class WebProxy.HttpRequest
- java.lang.Object
-
- dk.netarkivet.viewerproxy.WebProxy.HttpRequest
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HttpRequest(javax.servlet.http.HttpServletRequest htReq)
Constructs a new HttpRequest based on the given Jetty request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String[]>
getParameterMap()
Get parameters from this request.URI
getURI()
Get the URI from this request.static String
uriEncode(String s)
We here replace what should be standard API functionality with an apparent kludge.
-
-
-
Method Detail
-
getURI
public URI getURI()
Get the URI from this request. In contrast to javax.servlet.HttpServletResponse this includes the query string.
-
uriEncode
public static String uriEncode(String s)
We here replace what should be standard API functionality with an apparent kludge. We do this because the constructor java.net.URI(String s) violates its own documentation. It should encode all "other" characters in the query part of the URI. These "other" characters include curly brackets, but actually the escaping is never done. Hence we do it here.- Parameters:
s
- the String to be encoded- Returns:
- the encoded String
-
getParameterMap
public Map<String,String[]> getParameterMap()
Get parameters from this request. Note that this method is invalidated when the request is replied to.- Specified by:
getParameterMap
in interfaceRequest
- Returns:
- The parameters from this request.
-
-