org.apache.http.protocol
public class: ResponseServer [javadoc |
source]
java.lang.Object
org.apache.http.protocol.ResponseServer
All Implemented Interfaces:
HttpResponseInterceptor
ResponseServer is responsible for adding
Server
header. This
interceptor is recommended for server side protocol processors.
- version:
$
- Revision: 744532 $
- since:
4.0
-
Method from org.apache.http.protocol.ResponseServer Summary: |
---|
process |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.http.protocol.ResponseServer Detail: |
public void process(HttpResponse response,
HttpContext context) throws HttpException, IOException {
if (response == null) {
throw new IllegalArgumentException("HTTP request may not be null");
}
if (!response.containsHeader(HTTP.SERVER_HEADER)) {
String s = (String) response.getParams().getParameter(
CoreProtocolPNames.ORIGIN_SERVER);
if (s != null) {
response.addHeader(HTTP.SERVER_HEADER, s);
}
}
}
|