summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging
diff options
context:
space:
mode:
authorMatt Hawley <matt@eworldui.net>2012-08-10 15:00:55 -0700
committerMatt Hawley <matt@eworldui.net>2012-08-10 15:04:35 -0700
commit4f5db260de8f8bad2cbae970cd79f11611520007 (patch)
treeab97d36ae27da559f3cbef5d121dbc92adbdd050 /src/DotNetOpenAuth.Core/Messaging
parenta759ad7ac6d3c15a680b9b7180a35a8375faa8ce (diff)
downloadDotNetOpenAuth-4f5db260de8f8bad2cbae970cd79f11611520007.zip
DotNetOpenAuth-4f5db260de8f8bad2cbae970cd79f11611520007.tar.gz
DotNetOpenAuth-4f5db260de8f8bad2cbae970cd79f11611520007.tar.bz2
Fixing one more place it was missed, also changing to OPTIONS
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/Channel.cs6
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/HttpDeliveryMethods.cs6
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs8
3 files changed, 11 insertions, 9 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/Channel.cs b/src/DotNetOpenAuth.Core/Messaging/Channel.cs
index 672a942..f8ac6a1 100644
--- a/src/DotNetOpenAuth.Core/Messaging/Channel.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/Channel.cs
@@ -650,10 +650,12 @@ namespace DotNetOpenAuth.Messaging {
protected static bool HttpMethodHasEntity(string httpMethod) {
if (string.Equals(httpMethod, "GET", StringComparison.Ordinal) ||
string.Equals(httpMethod, "HEAD", StringComparison.Ordinal) ||
- string.Equals(httpMethod, "DELETE", StringComparison.Ordinal)) {
+ string.Equals(httpMethod, "DELETE", StringComparison.Ordinal) ||
+ string.Equals(httpMethod, "OPTIONS", StringComparison.Ordinal)) {
return false;
} else if (string.Equals(httpMethod, "POST", StringComparison.Ordinal) ||
- string.Equals(httpMethod, "PUT", StringComparison.Ordinal)) {
+ string.Equals(httpMethod, "PUT", StringComparison.Ordinal) ||
+ string.Equals(httpMethod, "PATCH", StringComparison.Ordinal)) {
return true;
} else {
throw ErrorUtilities.ThrowArgumentNamed("httpMethod", MessagingStrings.UnsupportedHttpVerb, httpMethod);
diff --git a/src/DotNetOpenAuth.Core/Messaging/HttpDeliveryMethods.cs b/src/DotNetOpenAuth.Core/Messaging/HttpDeliveryMethods.cs
index 5b99b4b..dbd3855 100644
--- a/src/DotNetOpenAuth.Core/Messaging/HttpDeliveryMethods.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/HttpDeliveryMethods.cs
@@ -58,11 +58,11 @@ namespace DotNetOpenAuth.Messaging {
/// <summary>
/// Added to the URLs in the query part (as defined by [RFC3986] (Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax,” .) section 3).
/// </summary>
- OptionRequest = 0x80,
+ OptionsRequest = 0x80,
/// <summary>
/// The flags that control HTTP verbs.
- /// </summary>
- HttpVerbMask = PostRequest | GetRequest | PutRequest | DeleteRequest | HeadRequest | PatchRequest | OptionRequest,
+ /// </summary>
+ HttpVerbMask = PostRequest | GetRequest | PutRequest | DeleteRequest | HeadRequest | PatchRequest | OptionsRequest,
}
}
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
index e213f01..2d049c1 100644
--- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
@@ -1445,8 +1445,8 @@ namespace DotNetOpenAuth.Messaging {
return HttpDeliveryMethods.HeadRequest;
} else if (httpVerb == "PATCH") {
return HttpDeliveryMethods.PatchRequest;
- } else if (httpVerb == "OPTION") {
- return HttpDeliveryMethods.OptionRequest;
+ } else if (httpVerb == "OPTIONS") {
+ return HttpDeliveryMethods.OptionsRequest;
} else {
throw ErrorUtilities.ThrowArgumentNamed("httpVerb", MessagingStrings.UnsupportedHttpVerb, httpVerb);
}
@@ -1470,8 +1470,8 @@ namespace DotNetOpenAuth.Messaging {
return "HEAD";
} else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.PatchRequest) {
return "PATCH";
- } else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.OptionRequest) {
- return "OPTION";
+ } else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.OptionsRequest) {
+ return "OPTIONS";
} else if ((httpMethod & HttpDeliveryMethods.AuthorizationHeaderRequest) != 0) {
return "GET"; // if AuthorizationHeaderRequest is specified without an explicit HTTP verb, assume GET.
} else {