Hi,

I am not sure that it is possible to send HTTP1.0 using CXF. The reason I say 
this is because CXF uses HttpUrlConnection under the covers, and this construct 
is an HTTP1.1 client. I am not sure if the version can change. 

The fact that the connection closed after one request I think is irrelevant, if 
HTTP1.1 was send




________________________________
From: Henk Flipman <[email protected]>
To: [email protected]
Sent: Thu, August 26, 2010 6:47:43 PM
Subject: Re: CXF HTTP 1.0 vs HTTP 1.1

With:

        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
        httpClientPolicy.setAllowChunking(false);
        httpClientPolicy.setConnection(ConnectionType.CLOSE);
        HTTPConduit http = (HTTPConduit) client.getConduit();
        http.setClient(httpClientPolicy);

it still sends 'HTTP/1.1' over the wire. But the behavior is like HTTP 1.0 
(i.e. 
the connection gets closed after 1 request). So that solved the problem for me.

Thanks.

Henk

On Aug 26, 2010, at 8:22 AM, skeno wrote:

> 
> I wonder if it is possible to make CXF send messages using HTTP 1.0 instead
> of HTTP 1.1 .
> 
> I've read here http://osdir.com/ml/users-cxf-apache/2010-01/msg00260.html
> that it can be achieved by disabling chunking and setting connection to
> close type (which should be default see
> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html).
> I am using CXF as web service client.
> 
> But even settings those two things i still see (in wireshark log) that CXF
> uses HTTP 1.1 as transfer protocol:
> 
> ---
> CONNECT some.server:16443 HTTP/1.1
> User-Agent: Java/1.6.0_21
> Host: some.server:16443
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> ---
> 
> Does it matters?
> 
> Can it be changed some how to:
> 
> ---
> CONNECT some.server:16443 HTTP/1.0
> User-Agent: Java/1.6.0_21
> Host: some.server:16443
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> ---
> ?
> 
> 
> 
> 
> -- 
> View this message in context: 
>http://cxf.547215.n5.nabble.com/CXF-HTTP-1-0-vs-HTTP-1-1-tp2720190p2720190.html
> Sent from the cxf-user mailing list archive at Nabble.com.


      

Reply via email to