From 064659c48ec70b249c020d26d625f58040ac7a49 Mon Sep 17 00:00:00 2001 From: Don Brower Date: Tue, 7 Jan 2014 10:33:56 -0500 Subject: [PATCH] Remove ineffective multipart option. The code looks like it is doing a multipart request, but it isn't. It is just setting the header 'Multipart' to true. Switching the code to do a multipart encoding with a PUT method triggers a Fedora bug. --- lib/rubydora/rest_api_client.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rubydora/rest_api_client.rb b/lib/rubydora/rest_api_client.rb index b7a5baa..a14bf45 100644 --- a/lib/rubydora/rest_api_client.rb +++ b/lib/rubydora/rest_api_client.rb @@ -342,7 +342,7 @@ def add_datastream options = {} run_hook :before_add_datastream, :pid => pid, :dsid => dsid, :file => file, :options => options str = file.respond_to?(:read) ? file.read : file file.rewind if file.respond_to?(:rewind) - client[datastream_url(pid, dsid, query_options)].post(str, :content_type => content_type.to_s, :multipart => true) + client[datastream_url(pid, dsid, query_options)].post(str, :content_type => content_type.to_s) rescue Exception => exception rescue_with_handler(exception) || raise end @@ -363,7 +363,6 @@ def modify_datastream options = {} rest_client_options = {} if file - rest_client_options[:multipart] = true rest_client_options[:content_type] = content_type end