Skip to content
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

Don't pass on the Transfer-Encoding header when streaming #671

Merged
merged 1 commit into from
Mar 25, 2015

Conversation

hanskr
Copy link

@hanskr hanskr commented Feb 11, 2015

When running the hystrix-dashboard on Tomcat with apache in front using AJP/mod_JK, we could not get the streams (from either hystrix directly, or through Turbine) working. In the Chrome JS-console there were errors mentioning the chunked response from proxy.stream was in error.

curling a bit showed this:

curl -iv --raw http://dev.dashboard.finn.no/hystrix-dashboard/proxy.stream?origin=dev-api1.finntech.no/iad/hystrix.stream

  • additional stuff not fine transfer.c:1037: 0 0
  • HTTP 1.1 or later with persistent connection, pipelining supported
    < HTTP/1.1 200 OK
    HTTP/1.1 200 OK
    < Date: Wed, 11 Feb 2015 13:57:03 GMT
    Date: Wed, 11 Feb 2015 13:57:03 GMT
    < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    < Pragma: no-cache
    Pragma: no-cache
    < Keep-Alive: timeout=1, max=100
    Keep-Alive: timeout=1, max=100
    < Connection: Keep-Alive
    Connection: Keep-Alive
    < Transfer-Encoding: chunked
    Transfer-Encoding: chunked
    < Content-Type: text/event-stream;charset=UTF-8
    Content-Type: text/event-stream;charset=UTF-8

<
ping:

  • Problem (2) in the Chunked-Encoded data
  • Closing connection #0

So the Transfer-Encoding: chunked header is set, but the data is not actually chunked (Missing a byte-count before the "ping: "-data)

The only related post I could find on google is from 2010 and is related to AJP/mod_JK:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50275 which describes our situation pretty much spot on.

In short: It doesn't seem like the AJP connector wants to get the Transfer-Encoding header from the backend.

The supplied change solved our problems.

@cloudbees-pull-request-builder

NetflixOSS » Hystrix » Hystrix-pull-requests #37 FAILURE
Looks like there's a problem with this pull request

@mattrjacobs
Copy link
Contributor

Thanks for the contribution, @hanskr ! This looks like a good change. I'm going to a bundle a set of dashboard fixes together after I get 1.4.0 out the door and will evaluate this.

mattrjacobs added a commit that referenced this pull request Mar 25, 2015
Don't pass on the Transfer-Encoding header when streaming
@mattrjacobs mattrjacobs merged commit 712fef3 into Netflix:master Mar 25, 2015
@mattrjacobs
Copy link
Contributor

Thanks for the patience on this, @hanskr . I'm getting to work on a variety of dashboard fixes now and will include this fix in that release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants