Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1153 from Invizory/json-utf8
Browse files Browse the repository at this point in the history
Fix JSON response default charset parameter value
  • Loading branch information
thecodejunkie committed Jul 15, 2013
2 parents e96bc7e + ee8a970 commit 2a2e3c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Nancy.Tests.Functional/Tests/JsonpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void Ensure_that_Jsonp_hook_does_not_affect_a_normal_json_response()

Assert.Equal(HttpStatusCode.OK, result.StatusCode);
Assert.Equal("true", result.Body.AsString());
Assert.Equal("application/json; charset=utf8", result.Context.Response.ContentType);
Assert.Equal("application/json; charset=utf-8", result.Context.Response.ContentType);
}

[Fact]
Expand All @@ -71,7 +71,7 @@ public void Ensure_that_Jsonp_hook_should_pad_a_json_response_when_callback_is_p

Assert.Equal(HttpStatusCode.OK, result.StatusCode);
Assert.Equal("myCallback(true);", result.Body.AsString());
Assert.Equal("application/javascript; charset=utf8", result.Context.Response.ContentType);
Assert.Equal("application/javascript; charset=utf-8", result.Context.Response.ContentType);
}
}
}
2 changes: 1 addition & 1 deletion src/Nancy.Tests/Unit/JsonFormatterExtensionsFixtures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public JsonFormatterExtensionsFixtures()
[Fact]
public void Should_return_a_response_with_the_standard_json_content_type()
{
response.ContentType.ShouldEqual("application/json; charset=utf8");
response.ContentType.ShouldEqual("application/json; charset=utf-8");
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/Nancy/Json/JsonSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static JsonSettings()
{
MaxJsonLength = 102400;
MaxRecursions = 100;
DefaultCharset = "utf8";
DefaultCharset = "utf-8";
Converters = new List<JavaScriptConverter>
{
new TimeSpanConverter(),
Expand Down

0 comments on commit 2a2e3c4

Please sign in to comment.