Page MenuHomePhabricator

Set charset=utf-8 in Content-Type response header from sse.js client
Closed, ResolvedPublic8 Estimate 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.

Details

Related Gerrit Patches:

Revisions and Commits

Event Timeline

Ottomata created this task.Dec 30 2016, 4:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 30 2016, 4:37 PM

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

We'll see if there is any response.

Ottomata edited projects, added Analytics-Kanban; removed Analytics.Jan 4 2017, 8:12 PM
Ottomata changed the point value for this task from 5 to 8.
Ottomata moved this task from Next Up to In Progress on the Analytics-Kanban board.Jan 4 2017, 8:23 PM
Ottomata moved this task from In Progress to In Code Review on the Analytics-Kanban board.

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

Ottomata moved this task from In Code Review to Done on the Analytics-Kanban board.Jan 4 2017, 9:54 PM
Nuria reassigned this task from Ottomata to mforns.Jan 5 2017, 4:43 PM
Nuria moved this task from Done to In Progress on the Analytics-Kanban board.
Nuria added a subscriber: Nuria.

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

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

Nuria closed this task as Resolved.Jan 24 2017, 9:58 PM