fog / fog-rackspace

Rackspace provider gem for Fog ecosystem
MIT License
8 stars 35 forks source link

Storage: copy doesn't work on files with "special" characters #6

Open plribeiro3000 opened 8 years ago

plribeiro3000 commented 8 years ago

Hello,

It seems that the copy functionality of rackspace doesn't work on some files. I sort of suspect the problem is that rackspace didn't said it correctly in documentation, but nevertheless ...

In the following snippet, the first copy operation works, while the second fails with "resource not found in ORD region (Fog::Storage::Rackspace::NotFound)"

file = cdc.directory.files.new(:key => 'Test%file', :body => 'Testing.file') file.save puts "Save done" f1 = file.copy(cdc.name, 'Test-file')

file = cdc.directory.files.new(:key => 'Test%2file', :body => 'Testing.file') file.save puts "Save done" f1 = file.copy(cdc.name, 'Test-file')

Looking at output with EXCON_DEBUG=true, I suspect that problem is that "X-Copy-From" is not escaped, which matters in second case.

Honza

Original issue opened by @hkmaly at fog/fog#3719

plribeiro3000 commented 8 years ago

cc/ @hkmaly @mdarby