You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Steffen Pingel (JIRA)" <ji...@apache.org> on 2007/07/17 22:56:04 UTC

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

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

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

    Attachment: TestBaseIOReactorSSL.java

Test case that demonstrates that parsing the request takes longer than 500 ms due to data being buffered in the underlying SSLIOSession.

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