summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs5
-rw-r--r--src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs b/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs
index b120344..f483ade 100644
--- a/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs
+++ b/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs
@@ -220,10 +220,9 @@ namespace DotNetOpenAuth.OAuth.ChannelElements {
protected override HttpResponseMessage PrepareDirectResponse(IProtocolMessage response) {
var messageAccessor = this.MessageDescriptions.GetAccessor(response);
var fields = messageAccessor.Serialize();
- string responseBody = MessagingUtilities.CreateQueryString(fields);
- HttpResponseMessage encodedResponse = new HttpResponseMessage {
- Content = new StringContent(responseBody),
+ var encodedResponse = new HttpResponseMessage {
+ Content = new FormUrlEncodedContent(fields),
};
ApplyMessageTemplate(response, encodedResponse);
diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
index c714e6f..fdf652c 100644
--- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
@@ -121,7 +121,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements {
var response = await this.channel.PrepareResponseAsync(message);
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
- Assert.AreEqual(Channel.HttpFormUrlEncodedContentType, response.Content.Headers.ContentType.MediaType);
+ Assert.AreEqual(Channel.HttpFormUrlEncodedContentType.MediaType, response.Content.Headers.ContentType.MediaType);
NameValueCollection body = HttpUtility.ParseQueryString(await response.Content.ReadAsStringAsync());
Assert.AreEqual("15", body["age"]);