public class HeaderManager extends Object
Constructor and Description |
---|
HeaderManager(UrlRewriter urlRewriter)
Builds a Header manager.
|
Modifier and Type | Method and Description |
---|---|
void |
copyHeaders(DriverRequest originalRequest,
org.apache.http.HttpRequest httpRequest)
Copy header from originalRequest to httpRequest.
|
org.apache.http.client.methods.CloseableHttpResponse |
copyHeaders(OutgoingRequest outgoingRequest,
org.apache.http.HttpEntityEnclosingRequest incomingRequest,
org.apache.http.HttpResponse httpClientResponse)
Copies end-to-end headers from a response received from the server to the response to be sent to the client.
|
protected boolean |
isForwardedRequestHeader(String headerName) |
protected boolean |
isForwardedResponseHeader(String headerName) |
public HeaderManager(UrlRewriter urlRewriter)
urlRewriter
- The UrlRewriter
to be used to rewrite headers like "Location"protected boolean isForwardedRequestHeader(String headerName)
protected boolean isForwardedResponseHeader(String headerName)
public void copyHeaders(DriverRequest originalRequest, org.apache.http.HttpRequest httpRequest)
Referer is rewritten. X-Forwarded-* headers are updated.
originalRequest
- source requesthttpRequest
- destination requestpublic org.apache.http.client.methods.CloseableHttpResponse copyHeaders(OutgoingRequest outgoingRequest, org.apache.http.HttpEntityEnclosingRequest incomingRequest, org.apache.http.HttpResponse httpClientResponse)
outgoingRequest
- the request sentincomingRequest
- the original request received from the clienthttpClientResponse
- the response received from the provider applicationCopyright © 2008–2018. All rights reserved.