Re: Simple Proposal for setting HTTP headers

On 07/18/2013 01:08 PM, Tobie Langel wrote:
> 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?

Completely agree; that's what I filed bug 13875 [1] for two years ago.

For integration at Mozilla, using foo.html^headers^ rather than 
foo.html.headers would be slightly easier.

Ms2ger

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=13875

Received on Thursday, 18 July 2013 12:32:40 UTC