summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.OAuth')
-rw-r--r--src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs5
-rw-r--r--src/DotNetOpenAuth.OAuth/OAuth/Messages/AccessProtectedResourceRequest.cs4
2 files changed, 3 insertions, 6 deletions
diff --git a/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs b/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs
index f3c5897..e5dd258 100644
--- a/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs
+++ b/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs
@@ -309,11 +309,8 @@ namespace DotNetOpenAuth.OAuth.ChannelElements {
if (requestMessageWithBinaryData != null && requestMessageWithBinaryData.SendAsMultipart) {
// Include the binary data in the multipart entity, and any standard text extra message data.
// The standard declared message parts are included in the authorization header.
- var content = new MultipartFormDataContent();
+ var content = InitializeMultipartFormDataContent(requestMessageWithBinaryData);
httpRequest.Content = content;
- foreach (var contentPart in requestMessageWithBinaryData.BinaryData) {
- content.Add(contentPart.Value, contentPart.Key);
- }
foreach (var extraData in requestMessage.ExtraData) {
content.Add(new StringContent(extraData.Value), extraData.Key);
diff --git a/src/DotNetOpenAuth.OAuth/OAuth/Messages/AccessProtectedResourceRequest.cs b/src/DotNetOpenAuth.OAuth/OAuth/Messages/AccessProtectedResourceRequest.cs
index 77b1733..9b698b9 100644
--- a/src/DotNetOpenAuth.OAuth/OAuth/Messages/AccessProtectedResourceRequest.cs
+++ b/src/DotNetOpenAuth.OAuth/OAuth/Messages/AccessProtectedResourceRequest.cs
@@ -20,7 +20,7 @@ namespace DotNetOpenAuth.OAuth.Messages {
/// <summary>
/// A store for the binary data that is carried in the message.
/// </summary>
- private Dictionary<string, HttpContent> binaryData = new Dictionary<string, HttpContent>();
+ private List<MultipartContentMember> binaryData = new List<MultipartContentMember>();
/// <summary>
/// Initializes a new instance of the <see cref="AccessProtectedResourceRequest"/> class.
@@ -58,7 +58,7 @@ namespace DotNetOpenAuth.OAuth.Messages {
/// Gets the parts of the message that carry binary data.
/// </summary>
/// <value>A list of parts. Never null.</value>
- public IDictionary<string, HttpContent> BinaryData {
+ public IList<MultipartContentMember> BinaryData {
get { return this.binaryData; }
}