hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Pingel (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HTTPCORE-103) DefaultNHttpServerConnection.consumeInput() stops reading
Date Wed, 18 Jul 2007 16:09:04 GMT

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


Mime
View raw message