From aed910aadd9dd976f93f066ee6dbf9f6b641f966 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 19 May 2014 11:16:25 +0100 Subject: [PATCH] Avoided the URL class adding parameters when generating post data for uploading files. --- modules/juce_core/network/juce_URL.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 496b00b922..49db1f9f04 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -241,8 +241,6 @@ void URL::createHeadersAndPostData (String& headers, MemoryBlock& headersAndPost { MemoryOutputStream data (headersAndPostData, false); - data << URLHelpers::getMangledParameters (*this); - if (filesToUpload.size() > 0) { // (this doesn't currently support mixing custom post-data with uploads..) @@ -285,7 +283,8 @@ void URL::createHeadersAndPostData (String& headers, MemoryBlock& headersAndPost } else { - data << postData; + data << URLHelpers::getMangledParameters (*this) + << postData; // if the user-supplied headers didn't contain a content-type, add one now.. if (! headers.containsIgnoreCase ("Content-Type"))