You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Andrew Phillips <an...@apache.org> on 2014/01/07 10:38:26 UTC

Re: VS: Setting Content-Disposition header containing Finnish alphabets å, ä or ö

> then I will familiarize myself with either of those. Basically I   
> have just followed the upload by the way provided in examples and   
> tried both SwiftObject and Blobs.

Do you mean the examples in the jclouds-examples repo [1]? As far as  
configuring logging, this good blog by Everett might help [2].

ap

[1] https://github.com/jclouds/jclouds-examples
[2] http://blog.phymata.com/2012/08/18/logging-in-jclouds/

Re: VS: VS: Setting Content-Disposition header containing Finnish alphabets å, ä or ö

Posted by Andrew Phillips <an...@apache.org>.
> And the result for Content-Disposition "cöwböys änd åliens.png" in   
> the Rackspace cdn Content-Disposition is "cöwböys änd åliens.png".

Are you seeing the malformed version of the disposition in the  
Rackspace console? Or is this reported by jclouds somehow?

Could you try to *read* the blob back using jclouds and see what  
Rackspace sends back? That should also be in the logs...

Regards

ap

VS: VS: Setting Content-Disposition header containing Finnish alphabets å, ä or ö

Posted by Kalle Malin <ka...@surveypal.com>.
I manage to setup logging. Based on the log of Content-Disposition it seems fine.


Code used to create and set Content-Disposition in short:

final SwiftObject object = cloudFilesClient.newSwiftObject();
object.setPayload(new ProgressInputStream(fileUpload, uploadProgress));
object.getPayload().getContentMetadata().setContentDisposition(MessageFormat.format("attachment; filename=\"{0}\"", fileName));


Jclouds log for Content-Disposition shows:

2014-01-07 11:40:44.762 org.jclouds.logging.slf4j.SLF4JLogger.logDebug:59 [main]
DEBUG: >> Content-Disposition: attachment; filename="cöwböys änd åliens.png"

That was the only reference of Content-Disposition in the log.


And the result for Content-Disposition "cöwböys änd åliens.png" in the Rackspace cdn Content-Disposition is "cöwböys änd Ã¥liens.png".


I tried setting the cdn file name to "cöwböys änd åliens.png" and that works. So only header gets malformed.

- Kalle -

________________________________________
Lähettäjä: Andrew Phillips [andrewp@apache.org]
Lähetetty: 7. tammikuuta 2014 11:38
Vastaanottaja: user@jclouds.apache.org
Aihe: Re: VS: Setting Content-Disposition header containing Finnish     alphabets å, ä or ö

> then I will familiarize myself with either of those. Basically I
> have just followed the upload by the way provided in examples and
> tried both SwiftObject and Blobs.

Do you mean the examples in the jclouds-examples repo [1]? As far as
configuring logging, this good blog by Everett might help [2].

ap

[1] https://github.com/jclouds/jclouds-examples
[2] http://blog.phymata.com/2012/08/18/logging-in-jclouds/