FileDocCategorySizeDatePackage
ResponseServer.javaAPI DocAndroid 1.5 API2546Wed May 06 22:41:10 BST 2009org.apache.http.protocol

ResponseServer

public class ResponseServer extends Object implements HttpResponseInterceptor
A response interceptor that adds a Server header. For use on the server side.
author
Oleg Kalnichevski
version
$Revision: 576073 $
since
4.0

Fields Summary
Constructors Summary
public ResponseServer()

        super();
    
Methods Summary
public voidprocess(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)

        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);
            }
        }