Suppress the UTF8 BOM. Fixes issue #982 #983

Merged
merged 1 commit into from Nov 26, 2012

Conversation

Projects
None yet
2 participants
Contributor

kppullin commented Nov 19, 2012

By default, a StreamWriter opened with Encoding.UTF8 includes the UTF 8 byte-order-mark, which causes issues with consumers that don't expect it (Java & Node.js apps being a couple examples).

The proposal here is to not include the UTF8 BOM with the response, in order to make life easier on consumers (like hubot-jabbr), which fail upon reading the BOM. This also saves an amazing 3 bytes!

Another minor benefit is that this brings consistency to PersistentConnection, ForeverTransport, and LongPollingTransport. PersistentConnection doesn't send the BOM, while the other two do.

davidfowl added a commit that referenced this pull request Nov 26, 2012

Merge pull request #983 from kppullin/utf8bom
Suppress the UTF8 BOM. Fixes issue #982

@davidfowl davidfowl merged commit 85aeea3 into SignalR:dev Nov 26, 2012

davidfowl added a commit that referenced this pull request Nov 29, 2012

Merge pull request #983 from kppullin/utf8bom
Suppress the UTF8 BOM. Fixes issue #982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment