parautenbach / TeamCity-HipChat-Notifier

TeamCity HipChat Notifier for sending build server notifications to HipChat.
Other
59 stars 31 forks source link

Set room notification JSON POST body to UTF-8 #19

Closed rbergman closed 10 years ago

rbergman commented 10 years ago

Without this change, room notification POSTs being sent to HipChat's REST API containing non-ASCII characters will fail to work, as a decoding issue prevents the notifications from being accepted. The JSON specification indicates that the application/json media-type should always be encoded in Unicode, but the single-arg StringEntity() constructor assumes the text/plain media type, which defaults to encoding as ISO-8859-1, as indicated in the HTTP specification.

parautenbach commented 10 years ago

Thank you, Robert, I'll merge this and include this in the next release. (I haven't catered for Unicode anywhere so far, but should probably do so at some stage.)

rbergman commented 10 years ago

Thanks!

On Fri, May 16, 2014 at 10:29 AM, Pieter Rautenbach < notifications@github.com> wrote:

Merged #19https://github.com/parautenbach/TeamCity-HipChat-Notifier/pull/19 .

— Reply to this email directly or view it on GitHubhttps://github.com/parautenbach/TeamCity-HipChat-Notifier/pull/19#event-121984611 .