Simple Proposal for setting HTTP headers

Hi all, 

I've received a number of requests for .htaccess support or the ability to write server-side code in order to be able to set HTTP headers.

Supporting .htaccess ties us to Apache, which makes our test suite less portable. And although there are valid use cases for writing server-side code (which will of course be supported), setting HTTP headers hardly seems to be one of them.

Instead I suggest we agree on the following convention to set HTTP headers for specific files: just add those headers in a file with the same filename and a .headers extensions.

So for example, specifying a specific charset for the `the-input-byte-stream-001.html` file would consist in adding a file named `the-input-byte-stream-001.headers` in the same directory with the following content:
 
    Content-Type: text/html; charset=iso-8859-15

These directives would be picked up by the server whenever a file was requested and would override any defaults.

Thoughts?

--tobie

Received on Thursday, 18 July 2013 11:08:38 UTC