org.apache.http.impl.client.cache
Class RequestProtocolCompliance
java.lang.Object
org.apache.http.impl.client.cache.RequestProtocolCompliance
@Immutable
public class RequestProtocolCompliance
- extends Object
- Since:
- 4.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestProtocolCompliance
public RequestProtocolCompliance()
requestIsFatallyNonCompliant
public List<RequestProtocolError> requestIsFatallyNonCompliant(HttpRequest request)
- Test to see if the
HttpRequest
is HTTP1.1 compliant or not
and if not, we can not continue.
- Parameters:
request
- the HttpRequest Object
- Returns:
- list of
RequestProtocolError
makeRequestCompliant
public HttpRequest makeRequestCompliant(HttpRequest request)
throws ProtocolException
- If the
HttpRequest
is non-compliant but 'fixable' we go ahead and
fix the request here. Returning the updated one.
- Parameters:
request
- the request to check for compliance
- Returns:
- the updated request
- Throws:
ProtocolException
- when we have trouble making the request compliant
requestMinorVersionIsTooHighMajorVersionsMatch
protected boolean requestMinorVersionIsTooHighMajorVersionsMatch(HttpRequest request)
requestVersionIsTooLow
protected boolean requestVersionIsTooLow(HttpRequest request)
getErrorForRequest
public HttpResponse getErrorForRequest(RequestProtocolError errorCheck)
- Extract error information about the
HttpRequest
telling the 'caller'
that a problem occured.
- Parameters:
errorCheck
- What type of error should I get
- Returns:
- The
HttpResponse
that is the error generated
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.