You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Resolved) (JIRA)" <ji...@apache.org> on 2012/01/22 19:28:39 UTC

[jira] [Resolved] (HTTPCORE-291) Out-of-order responses to pipelined requests

     [ https://issues.apache.org/jira/browse/HTTPCORE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-291.
----------------------------------------

    Resolution: Fixed

I fixed the most immediate problem, which is out of sequence responses to pipelined requests. 

http://svn.apache.org/viewvc?view=revision&revision=1234543

I also started to put together a suite of test case that defines the expected behavior with regards to handling of pipelined requests

http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestPipelining.java?view=markup&pathrev=1234543

Please feel free to add more test cases defining your expectations of correct handling of pipelined requests.

I am also in the process of evaluating of the possibility of improving request pipelining handling in HttpAsyncService and making it work correctly together with Cancellable callback. One thing I am not sure about is whether it should warrant a delay of 4.2 BETA1 release or it could wait until 4.2 BETA2. Please let me know your preference.

Oleg
                
> Out-of-order responses to pipelined requests
> --------------------------------------------
>
>                 Key: HTTPCORE-291
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-291
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>            Reporter: Geir Harald Hansen
>         Attachments: Test.java, testrun.txt
>
>
> I am having a problem with the latest HttpCore NIO from the Subversion repository (revision 1234228). I have not tested this on earlier versions.
> I am observing two problems, but they stem from the same underlying issue - that after a response is delayed, processing of subsequent pipelined requests on the same socket continues immediately.
> Problem 1: If the response to your first request is delayed, but not the second, they are delivered out of order.
> Problem 2: If a request has a body (entity) then right after processing that request and delaying its response, there is a response on the wire ("400 Bad Request") and the connection is terminated. When this happens none of the delayed responses are cancelled, that is Cancellable#cancel() is never called.
> I will attach example source code, and an example of running telnet against the program, to show what is happening. There is first a request that is delayed and never gets a response. The second request gets a response immediately, out of order. The third request (a POST with body) also has its response delayed. But then there is a 400 bad request response and the connection is severed. The two delayed responses are not cancelled.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org