Re: Simple Proposal for setting HTTP headers

Seems like it could work, and it would certainly make tests easier for 
me to write and move around (.htaccess files are a pain to look at or 
copy from one place to another on the Mac, and the fact that there's 
only one of them for all files in a directory makes it slightly more 
difficult to move files around.)

Presumably this would work for all types of file: ie. CSS files and SVG 
files, not just HTML ones.

RI


On 18/07/2013 12:08, 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?
>
> --tobie
>
>
>


-- 
Richard Ishida, W3C
http://rishida.net/

Received on Thursday, 18 July 2013 12:07:38 UTC