diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-05-29 17:13:38 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-05-29 17:13:38 -0700 |
commit | c733132040cde775210e909fed1bf44e9bd983ff (patch) | |
tree | 6bdbaa41212a94f3be51d86058339ed10720c11c /src | |
parent | 1a9c7478deaa33507a553e20ae26aa0d5e8fd836 (diff) | |
download | DotNetOpenAuth-c733132040cde775210e909fed1bf44e9bd983ff.zip DotNetOpenAuth-c733132040cde775210e909fed1bf44e9bd983ff.tar.gz DotNetOpenAuth-c733132040cde775210e909fed1bf44e9bd983ff.tar.bz2 |
OAuth messages now only scrape the FORM data for application/x-www-form-urlencoded HTTP requests.
This fixes sending multipart POST messages (including images, for example).
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs b/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs index dcd4494..5ac1aa8 100644 --- a/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs +++ b/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs @@ -142,8 +142,10 @@ namespace DotNetOpenAuth.OAuth.ChannelElements { } // Scrape the entity - foreach (string key in request.Form) { - fields.Add(key, request.Form[key]); + if (string.Equals(request.Headers[HttpRequestHeader.ContentType], HttpFormUrlEncoded, StringComparison.Ordinal)) { + foreach (string key in request.Form) { + fields.Add(key, request.Form[key]); + } } // Scrape the query string |