[ 
http://issues.apache.org/jira/browse/AXIS2-824?page=comments#action_12416869 ] 

Oleg Kalnichevski commented on AXIS2-824:
-----------------------------------------

Chuck,

Let me try to convince you that this code makes more harm than good. Consider 
this:

An HTTP/1.0 client sends the following request to the server

POST /whatever HTTP/1.0
Content-Length: 1234
...

If the SimpleHttpServer blindly follows the default axis2 configuration it 
responds with something like 

HTTP/1.1 200 OK
Transfer-Encoding: chunked
...

and completely messes up the client, most likely causing it to block waiting 
for connection close until timeout.

This is a very real and material problem that caused me a lot of grief. I ran 
into this problem while trying to benchmark the SHS with Apache benchmark (ab), 
which still uses 1.0 version of the HTTP protocol. 

Setting HTTP version makes perfect sense on the client side. On the server 
side, however, it is imperative to use the protocol version both the client and 
the server understand. So, request properties must take precedence over the 
configuration settings.

As far as chunking is concerned it is simply pointless to use chunk coding if 
the content length is known. 

Oleg

> HTTPWorker be should not be unecessarily modifying transport settings such as 
> HTTP version and content chunking
> ---------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS2-824
>          URL: http://issues.apache.org/jira/browse/AXIS2-824
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Improvement

>   Components: transports
>     Versions: 1.0
>     Reporter: Oleg Kalnichevski
>  Attachments: simplehttpserver-cleanup.patch
>
> Presently HTTPWorker class unnecessarily meddles with HTTP transport 
> parameters such content chunking and HTTP protocol version. In most cases 
> HttpCore is much better equipped to pick up optimal transport settings 
> depending on properties of the incoming request. HttpCore automatically 
> downgrades the protocol version to HTTP/1.0 if the client does not support 
> HTTP/1.1. Likewise it automatically applies the chunk coding if the content 
> length is unknown.
> I understand this one may be a little controversial, nonetheless I would like 
> to put forth this patch for your consideration
> Oleg

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to