Archived Forum Post

Index of archived forum posts

Question:

Extended notation in http content-disposition headers

Jun 12 '13 at 15:02

Are you planning to implement support for extended notation in content-disposition headers as described in RFC 5987. Or is it already supported and how?

An example could be:

Content-Disposition: attachment; filename*= UTF-8''%e2%82%ac%20rates

or

Content-Disposition: attachment;
                          filename="EURO rates";
                          filename*=utf-8''%e2%82%ac%20rates

The reason I am asking is that I have been struggling with getting SynchronousRequest to play nice with filenames containing Danish characters during a POST operation. No matter how I set charset, use put_utf8, etc. the content-disposition header is messed up upon arrival at the server. The server expects utf-8 input.

For now I have worked around the problem by disallowing non-ascii characters in filenames, but I am still curious about whether or not this is actually supported?

P.S. I was simply using the AddFileForUpload or AddBytesForUpload to add the file to the POST and tried both with and without setting req.put_Utf8(true), req.put_Charset("utf-8") and req.put_SendCharset(true). The issue is very much related to SynchronousRequest POST to .net 4.5 web api controller (also my post), but now it is the filename header and not other parameters that causes a problem.


Accepted Answer

Thanks! I noted this and added it as a feature request for a future version..