public class AddHeadersToResponseCommand extends AbstractProxyCommand
Command
responsible for copying all the original HTTP response headers
except of HTTP Cookie related headers
from the remote content to the internally created HttpResponse
instance.
Note: All the HTTP Cookie related headers are cared by AddCookiesToResponseCommand
.
Also, the following HTTP headers are excluded during the copy:
Content-Length
Content-Encoding
Meanwhile, the following HTTP header(s) are rewritten:
Host
Constructor and Description |
---|
AddHeadersToResponseCommand() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
executeInternal(ProxyContext context)
Execute a unit of processing work to be performed.
|
String |
getHostHeaderValue()
Returns the custom specific "Host" HTTP header value.
|
void |
setHostHeaderValue(String hostHeaderValue)
Sets the custom specific "Host" HTTP header value.
|
destroy, execute, initialize
protected boolean executeInternal(ProxyContext context) throws ReverseProxyException, IOException
Execute a unit of processing work to be performed. This
AbstractProxyCommand
may either complete the required processing
and return true
, or delegate remaining processing
to the next AbstractProxyCommand
in a ProxyProcessingChain
containing this
AbstractProxyCommand
by returning false
.
executeInternal
in class AbstractProxyCommand
ReverseProxyException
IOException
public String getHostHeaderValue()
ServletRequest.getServerName()
and ServletRequest.getServerPort()
.public void setHostHeaderValue(String hostHeaderValue)
hostHeaderValue
- Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.