Page MenuHomePhabricator

Set charset=utf-8 in Content-Type response header from sse.js client
Closed, ResolvedPublic8 Estimated Story Points

Description

The sse client that kafka-sse is using does not allow us to override the Content-Type header and set charset. This causes libraries like Python Requests to break, since they properly default to using ISO-8859-1 (Latin-1) instead of utf-8 when decoding the response body if no charset is provided.

We need to either upstream a patch to our sse client, or fork it and use our own.

Revisions and Commits

Event Timeline

Pull request created: https://github.com/einaros/sse.js/pull/22

We'll see if there is any response.

Ottomata changed the point value for this task from 5 to 8.

Change 330535 had a related patch set uploaded (by Ottomata):
Bump kafka-sse version to 0.0.6 to include charset / SSEResponse fix

https://gerrit.wikimedia.org/r/330535

Change 330535 merged by Ottomata:
Bump kafka-sse version to 0.0.6 to include charset / SSEResponse fix

https://gerrit.wikimedia.org/r/330535

Nuria moved this task from Done to In Progress on the Analytics-Kanban board.
Nuria subscribed.

We will be adding a bit more testing to this fix.

mforns added a revision: Restricted Differential Revision.Jan 19 2017, 7:56 PM

I don't know how to make the revision appear in this view...
Anyway, above is the link to the revision with the changes.