mnot’s blog

Design depends largely on constraints.” — Charles Eames

Friday, 2 September 2011


RFC6266 and Content-Disposition

HTTPbis published RFC6266 a little while ago, but the work isn’t finished.

This is the RFC that clarifies how the Content-Disposition header is used in HTTP; in a nutshell, while basic file downloads worked OK, there wasn’t any broad interoperability between browsers for non-ASCII filenames.

Julian Reschke did the hard work of coming up with a test suite to find how how bad things were, filing bugs with browsers (such as here and here), and finally writing the draft that eventually became the RFC. Thanks again, Julian.

Since publication, it’s become apparent that browsers are indeed moving towards better interop. So, the next step was to start to publicise this interop so that people on the content side can take advantage of it.

As a result, we’ve come up with a page giving advice to people who produce Content-Disposition — especially Web frameworks.

There’s also a sample implementation for Node.JS called sweet, so you can see how it should work, and support for checking Content-Disposition in REDbot, so you can confirm that you’re doing it well.

So, if you’re involved in a Web framework, please have a look and publicise this within your community. We’ve already filed a request with Django; if your framework has a tracking URL, please add it to the producer advice wiki page.


Fabien Potencier said:

That’s great. I have implemented it in Symfony, a PHP web framework:

Sunday, September 4 2011 at 5:39 AM said:

comments appear closed on ‘How Web-Ready is XMLHttpRequest?’ so posting something here:

“XMLHttpRequest Tests” is pretty handy, would love to see a version that does the same but for CORS

Wednesday, October 5 2011 at 5:05 AM