Package com.google.gerrit.util.http
Class RequestUtil
java.lang.Object
com.google.gerrit.util.http.RequestUtil
Utilities for manipulating HTTP request objects.
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanacceptsGzipEncoding(javax.servlet.http.HttpServletRequest request) static StringgetEncodedPathInfo(javax.servlet.http.HttpServletRequest req) Returns the same value asHttpServletRequest.getPathInfo(), but without decoding URL-encoded characters.static ThrowablegetErrorTraceAttribute(javax.servlet.http.HttpServletRequest req) static StringgetRestPathWithoutIds(javax.servlet.http.HttpServletRequest req) Trims leading '/' and 'a/'.static voidsetErrorTraceAttribute(javax.servlet.http.HttpServletRequest req, Throwable t) 
- 
Method Details- 
setErrorTraceAttribute
- 
getErrorTraceAttribute
- 
getEncodedPathInfoReturns the same value asHttpServletRequest.getPathInfo(), but without decoding URL-encoded characters.
- 
getRestPathWithoutIdsTrims leading '/' and 'a/'. Removes the context path, but keeps the servlet path. Removes all IDs from the rest of the URI.The returned string is a good fit for cases where one wants the full context of the request without any identifiable data. For example: Logging or quota checks. Examples: - /a/accounts/self/detail => /accounts/detail
- /changes/123/revisions/current/detail => /changes/revisions/detail
- /changes/ => /changes
 
- 
acceptsGzipEncodingpublic static boolean acceptsGzipEncoding(javax.servlet.http.HttpServletRequest request) 
 
-