summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-10-20 21:54:10 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-10-20 21:54:10 -0700
commit3c8178c31df9c5762796bd27a33d7aca4d234569 (patch)
tree61a6bee0b37bcb3ddbc5a3b3f311ca5f1d95048a /src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
parent2a57d2bea6fea2c9302e9b64a6385140e7b3fc78 (diff)
downloadDotNetOpenAuth-3c8178c31df9c5762796bd27a33d7aca4d234569.zip
DotNetOpenAuth-3c8178c31df9c5762796bd27a33d7aca4d234569.tar.gz
DotNetOpenAuth-3c8178c31df9c5762796bd27a33d7aca4d234569.tar.bz2
Added a response stream to 301 redirect messages so that filters like WebSense will let them through.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs')
-rw-r--r--src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
index 5d31d40..acb200f 100644
--- a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
@@ -77,6 +77,8 @@ namespace DotNetOpenAuth.Test.Messaging {
OutgoingWebResponse response = this.Channel.PrepareResponse(message);
Assert.AreEqual(HttpStatusCode.Redirect, response.Status);
+ Assert.AreEqual("text/html; charset=utf-8", response.Headers[HttpResponseHeader.ContentType]);
+ Assert.IsTrue(response.Body != null && response.Body.Length > 0); // a non-empty body helps get passed filters like WebSense
StringAssert.StartsWith("http://provider/path", response.Headers[HttpResponseHeader.Location]);
foreach (var pair in expected) {
string key = MessagingUtilities.EscapeUriDataStringRfc3986(pair.Key);