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 (JIRA)" <ji...@apache.org> on 2007/07/18 22:46:05 UTC

[jira] Resolved: (HTTPCORE-103) DefaultNHttpServerConnection.consumeInput() stops reading

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

Oleg Kalnichevski resolved HTTPCORE-103.
----------------------------------------

    Resolution: Fixed

Patch checked in. Many thanks, Steffen

Oleg

> 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: httpcore-greedy-message-parsing.patch, httpcore-greedy-message-parsing.patch, 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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org