summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-05-29 17:13:38 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-05-29 17:13:38 -0700
commitc733132040cde775210e909fed1bf44e9bd983ff (patch)
tree6bdbaa41212a94f3be51d86058339ed10720c11c /src
parent1a9c7478deaa33507a553e20ae26aa0d5e8fd836 (diff)
downloadDotNetOpenAuth-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.cs6
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