summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenId/Util.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-05-26 23:15:21 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2008-05-26 23:15:21 -0700
commit24bcd4604eef4e77c0db3408df65ea3f7ff33e0e (patch)
tree2c7fddddd0351473966ecaa27cef9ec1836ab072 /src/DotNetOpenId/Util.cs
parentea26f06c67848867d693c178335dad579e987154 (diff)
downloadDotNetOpenAuth-24bcd4604eef4e77c0db3408df65ea3f7ff33e0e.zip
DotNetOpenAuth-24bcd4604eef4e77c0db3408df65ea3f7ff33e0e.tar.gz
DotNetOpenAuth-24bcd4604eef4e77c0db3408df65ea3f7ff33e0e.tar.bz2
Breaking changes! OpenID indirect messages larger than 2KB are now sent via form POST instead of GET.
Refactored public API to allow for form POST responses. This scenario is not being tested.
Diffstat (limited to 'src/DotNetOpenId/Util.cs')
-rw-r--r--src/DotNetOpenId/Util.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DotNetOpenId/Util.cs b/src/DotNetOpenId/Util.cs
index 82892b2..65bf3b0 100644
--- a/src/DotNetOpenId/Util.cs
+++ b/src/DotNetOpenId/Util.cs
@@ -88,7 +88,7 @@ namespace DotNetOpenId {
internal const string DefaultNamespace = "DotNetOpenId";
public static IDictionary<string, string> NameValueCollectionToDictionary(NameValueCollection nvc) {
- if (nvc == null) throw new ArgumentNullException("nvc");
+ if (nvc == null) return null;
var dict = new Dictionary<string, string>(nvc.Count);
for (int i = 0; i < nvc.Count; i++) {
string key = nvc.GetKey(i);
@@ -103,6 +103,7 @@ namespace DotNetOpenId {
return dict;
}
public static NameValueCollection DictionaryToNameValueCollection(IDictionary<string, string> dict) {
+ if (dict == null) return null;
NameValueCollection nvc = new NameValueCollection(dict.Count);
foreach (var pair in dict) {
nvc.Add(pair.Key, pair.Value);