-
Notifications
You must be signed in to change notification settings - Fork 177
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
JSON is sent with Byte-order-mark (BOM) illegally #400
Labels
Comments
geoperez
added a commit
that referenced
this issue
Oct 25, 2019
@rocketraman I did the change to remove the BOM in the serializer callback only. Can you check my commit? |
My output:
|
@geoperez LGTM |
OK, I'll release a new nuget over the weekend. |
You can check the new nuget version 3.1.2. |
rdeago
added
area:serialization
Issue with data serialization / deserialization.
bug
v3.x
labels
Nov 26, 2019
@rocketraman can you confirm that this issue is solved? |
Sorry for the late reply. Yes, I can confirm this is fixed now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The JSON serializer currently sends JSON with a BOM.
BOM is illegal in JSON: https://stackoverflow.com/questions/4990095/json-specification-and-usage-of-bom-charset-encoding
.NET StreamWriter adds it by default, can be configured off: https://stackoverflow.com/questions/5266069/streamwriter-and-utf-8-byte-order-marks
Looks like this code needs to change:
embedio/src/EmbedIO/HttpContextExtensions-ResponseStream.cs
Line 63 in 0093d4e
To Reproduce
Steps to reproduce the behavior:
The initial two bytes are the illegal BOM.
Expected behavior
Do not send the BOM for JSON as per the RFCs.
The text was updated successfully, but these errors were encountered: