[
https://issues.apache.org/jira/browse/STORM-486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14121944#comment-14121944
]
ASF GitHub Bot commented on STORM-486:
--------------------------------------
GitHub user d2r opened a pull request:
https://github.com/apache/incubator-storm/pull/249
[STORM-486] avoid adding multiple jetty handlers
Big thanks to @knusbaum for tracking this down and providing the initial
code.
This works by coping a private helper function from ring, so that we do not
double-set handlers.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/d2r/incubator-storm STORM-486
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-storm/pull/249.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #249
----
commit f8cb7b594aaad68e9298914610f200e970f4eb11
Author: Derek Dagit <[email protected]>
Date: 2014-09-04T20:29:31Z
avoid adding multiple jetty handlers
----
> Call ring.adapter.jetty/run-jetty adds a second handler to server
> -----------------------------------------------------------------
>
> Key: STORM-486
> URL: https://issues.apache.org/jira/browse/STORM-486
> Project: Apache Storm (Incubating)
> Issue Type: Bug
> Reporter: Derek Dagit
> Assignee: Derek Dagit
> Labels: security
>
> We use a "configurator" to configure jetty servers with one or more filters
> based on storm configuration and based on which daemon is being configured.
> One use case is that the logviewer must both compress responses and
> authenticate incoming requests via a custom filter.
> [Code|https://github.com/apache/incubator-storm/blob/b19fdbb7444e9d3ea38ede9d186055319df4751d/storm-core/src/clj/backtype/storm/ui/helpers.clj#L168-L181]
> When more than one filter is used, the configurator adds the configured
> handler once, but then ring.adapter.jetty/run-jetty adds another handler.
> Having two handlers causes trouble with the server. One handler constructs
> the response, and when the second handler tries to do the same, it finds the
> output stream is closed.
> Most of the time this results in extra log messages and incorrect page loads,
> but with HTTP DRPC calls, it can potentially cause the wrong result to be
> returned.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)