-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flush every chunk only for chunked responses #245
Conversation
The handling of a play result in the default request handler is moved to pushPlayResultToServletOS. This handling stayed the same. This change should not have any impact on the existing servlet wrapper for servlet < 3.1. For servlet 3.1, pushPlayResultToServletOS is overwritten to provide a non-blocking asynchron handling based on the new WriteListener.
Good work ! |
@@ -223,7 +229,7 @@ class Play2Servlet31RequestHandler(servletRequest: HttpServletRequest) | |||
|
|||
setHeaders(headers, httpResponse) | |||
|
|||
val chunked = headers.exists { case (key, value) => key == HeaderNames.TRANSFER_ENCODING && value == HttpProtocol.CHUNKED } | |||
chunked = headers.exists { case (key, value) => key == HeaderNames.TRANSFER_ENCODING && value == HttpProtocol.CHUNKED } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key.equalsIgnoreCase(...)
would be technically correct here. Though we don't do it in Play... we probably should. I think this is going to be fixed by a PR in the works that converts the headers map to be case insensitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, added a commit for this.
reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 ("Field names are case-insensitive")
@dlecan can you merge this pull or do you need more info/time? |
flush every chunk only for chunked responses
let the servlet container buffer the response.
Based on feedback from @jroper:
yanns@b580b8c#commitcomment-6312809
yanns@b580b8c#commitcomment-6312832