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

Steffen Pingel updated HTTPCORE-103:
------------------------------------

    Attachment:     (was: httpcore-greedy-message-parsing.patch)

> DefaultNHttpServerConnection.consumeInput() stops reading
> ---------------------------------------------------------
>
>                 Key: HTTPCORE-103
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-103
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha5
>            Reporter: Steffen Pingel
>             Fix For: 4.0-beta1
>
>         Attachments: TestBaseIOReactorSSL.java
>
>
> If the underlying channel has more data buffered than can be read into inbuf 
> DefaultNHttpServerConnection.consumeInput() will return and relies on the 
> selector to timeout to read the remaining part of the request. I suggest to 
> make the parsing code more greedy:
>                 int bytesRead;
>                 while ((bytesRead = 
> this.requestParser.fillBuffer(this.session.channel())) > 0 && this.request == 
> null) {
>                     if (bytesRead > 0) {
>                         
> this.inTransportMetrics.incrementBytesTransferred(bytesRead);
>                     }
>                     this.request = (HttpRequest) this.requestParser.parse();
>                 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to