hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Manning <Robert.Mann...@collabraspace.com>
Subject Re: Only speaking HTTP 1.1
Date Wed, 16 Nov 2005 15:53:09 GMT
Oleg Kalnichevski wrote:

>On Wed, Nov 16, 2005 at 10:22:02AM -0500, Rob Manning wrote:
>  
>
>>I'd like to be able to tell HttpClient to only speak HTTP/1.1 with the 
>>server and
>>throw an Exception if the server doesn't support this.  I see in the 
>>preferences
>>api document 
>>(http://jakarta.apache.org/commons/httpclient/preference-api.html)
>>where I can set the default protocol to use via the HTTP method parameter
>>called "http.protocol.version".  However, I suspect this will only 
>>"prefer" HTTP/1.1
>>and not "prevent" speaking HTTP/1.0.  Anyone have any ideas about how I
>>would achieve this?
>>
>>    
>>
>
>Rob,
>
>Just override the HttpMethodBase#readStatusLine(HttpState,
>HttpConnection) method and throw an exception if the effective protocol
>version is set to HttpVersion.HTTP_1_0
>
>http://jakarta.apache.org/commons/httpclient/xref/org/apache/commons/httpclient/HttpMethodBase.html#1821
>
>Hope this helps
>  
>
Oleg,

Thanks as always for a quick response.  I expect that will work just fine.

Rob


CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message