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

Force character encoding for event stream to utf-8 #94

Merged
merged 1 commit into from
Feb 1, 2013

Conversation

mpeltonen
Copy link

Hi,

This change fixed an "EventSource's response has a charset ("iso-8859-1") that is not UTF-8. Aborting the connection." error in Dashboard for me.

Br,
-Mikko

EventSource requires that text/event-stream response must be encoded
using UTF-8, so set it here. This way we can use another default for the
servlet container if required.
@benjchristensen
Copy link
Contributor

Thank you Mikko for submitting this fix.

Testing looks good:


$ curl -v http://localhost:8989/hystrix-examples-webapp/hystrix.stream
* About to connect() to localhost port 8989 (#0)
*   Trying ::1...
* connected
* Connected to localhost (::1) port 8989 (#0)
> GET /hystrix-examples-webapp/hystrix.stream HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:8989
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/event-stream;charset=UTF-8
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Transfer-Encoding: chunked
< Server: Jetty(6.1.25)
< 
ping: 

I launched hystrix-examples-webapp and hystrix-dashboard using your branch and everything looks good so I'll merge this and release soon.

I appreciate you sending a pull request.

benjchristensen added a commit that referenced this pull request Feb 1, 2013
Force character encoding for event stream to utf-8
@benjchristensen benjchristensen merged commit 5c173a8 into Netflix:master Feb 1, 2013
@benjchristensen
Copy link
Contributor

1.2.5 was just released and includes this change.

https://github.com/Netflix/Hystrix/blob/master/CHANGES.md

Thank you again @mpeltonen

@mpeltonen
Copy link
Author

Thanks for the quick release and great framework!

@benjchristensen
Copy link
Contributor

You're welcome and thank you, I hope it serves you well.

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.

2 participants