Opened on Jan 22, 2015 at 4:55:51 PM
Closed on Jan 29, 2015 at 3:02:44 PM
Last modified on Jan 29, 2015 at 4:32:54 PM
#8518 closed defect (worksforme)
Rackspace uploads ignore default metadata headers specified in user.config
Reported by: | Olga | Owned by: | dkocher |
---|---|---|---|
Priority: | normal | Milestone: | 4.6.4 |
Component: | cloudfiles | Version: | 4.6.3 |
Severity: | normal | Keywords: | |
Cc: | Architecture: | ||
Platform: | Windows 7 |
Description
I'm uploading files to a Rackspace Cloud Files container, and need to add the Access-Control-Allow-Origin: * header to all files. From the docs --
https://trac.cyberduck.io/wiki/help/en/howto/cloudfiles#Defaultmetadata
https://trac.cyberduck.io/wiki/help/en/howto/preferences#Hiddenconfigurationoptions
I understand that I can set the default metadata headers for uploads in user.config.
I added the following to <settings> in C:\Users\<name>\AppData\Roaming\Cyberduck\Cyberduck.exe_Url_<...>\4.6.1.16121\user.config:
<setting name="cf.metadata.default" value="Access-Control-Allow-Origin=*" />
But when I upload the files to Rackspace, Cyberduck uploads them without this header.
Fiddler shows that Cyberduck PUTs the file without the custom header, and doesn't additionally POST the header:
PUT https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_.../container-name/myfile.htm HTTP/1.1 Content-Type: text/html X-Auth-Token: ... Content-Length: 10864 Host: storage101.ord1.clouddrive.com Connection: Keep-Alive User-Agent: Cyberduck/4.6.3 (16490) (Windows 7/6.1) (x86) Accept-Encoding: gzip,deflate <!DOCTYPE html> ...
If I PUT the file using cURL, the header gets added correctly:
> curl -i -X PUT -T myfile.htm -H "X-Auth-Token: ..." -H "Access-Control-Allow-Origin: *" https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_.../container-name/myfile.htm HTTP/1.1 201 Created > curl -i -X HEAD -H "X-Auth-Token: ..." https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_.../container-name/myfile.htm HTTP/1.1 200 OK ... Access-Control-Allow-Origin: * Content-Type: text/html ...
Change History (10)
comment:1 Changed on Jan 23, 2015 at 9:57:13 AM by dkocher
- Milestone set to 4.6.4
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed on Jan 23, 2015 at 9:57:54 AM by dkocher
Fixed in help/en/howto/cloudfiles.
comment:3 follow-up: ↓ 5 Changed on Jan 28, 2015 at 8:58:58 AM by Olga
- Resolution fixed deleted
- Status changed from closed to reopened
openstack.metadata.default doesn't work for me. The header isn't PUT/POSTed during upload.
comment:4 Changed on Jan 28, 2015 at 2:25:07 PM by dkocher
Added test in r16621.
comment:5 in reply to: ↑ 3 Changed on Jan 28, 2015 at 2:25:33 PM by dkocher
Replying to Olga:
openstack.metadata.default doesn't work for me. The header isn't PUT/POSTed during upload.
Have you restarted Cyberduck after making the changes?
comment:6 Changed on Jan 29, 2015 at 8:30:35 AM by Olga
I close Cyberduck before editing the config file.
I tried (in turns) the CORS header:
... <setting name="CdSettings" serializeAs="Xml"> <value> <settings> ... <setting name="openstack.metadata.default" value="Access-Control-Allow-Origin=*" /> </settings> </value> </setting> ...
and the example from the documentation:
<setting name="openstack.metadata.default" value="Creator=Cyberduck" />
Also updated to 4.6.4. But the PUT request is the same - without this header.
Any ideas?
comment:7 Changed on Jan 29, 2015 at 2:26:19 PM by yla
I'm unable to reproduce the issue. Works for me. Are you sure that you have edited the correct user.config?
C:\Users\<name>\AppData\Roaming\Cyberduck\Cyberduck.exe_Url_<...>\4.6.1.16121\user.config
The issue is reported against 4.6.3 but apparently you changed the 4.6.1 settings. Can you please update to 4.6.4 and edit the appropriate user.config.
comment:8 Changed on Jan 29, 2015 at 3:02:44 PM by dkocher
- Resolution set to worksforme
- Status changed from reopened to closed
comment:9 follow-up: ↓ 10 Changed on Jan 29, 2015 at 3:21:33 PM by Olga
OK, there seems to be another doc error here: https://trac.cyberduck.io/wiki/help/en/faq#Windows2
It says on Windows 7 the user.config lives in %APPDATA%\Cyberduck\…, but it's actually in %APPDATA%\iterate_GmbH\…, separately from all other app support files:
Roaming\ Cyberduck\ Bookmarks\ ... Transfers\ cyberduck.log iterate_GmbH\ Cyberduck.exe_Url_*\ 4.6.3.16490\ user.config 4.6.4.16610\ user.config
The path must have been changed in 4.6.2 or 4.6.3.
So I was editing a wrong file left over from 4.6.1. After I changed the correct file the currently installed version 4.6.4, it worked.
Thanks!
comment:10 in reply to: ↑ 9 Changed on Jan 29, 2015 at 4:32:54 PM by dkocher
Replying to Olga:
OK, there seems to be another doc error here: https://trac.cyberduck.io/wiki/help/en/faq#Windows2
Fixed in https://trac.cyberduck.io/wiki/help/en/faq?version=110.
This is a documentation error. The correct property name is openstack.metadata.default.