- From: Martin J. Dürst <duerst@it.aoyama.ac.jp>
- Date: Fri, 19 Jul 2013 15:18:32 +0900
- To: Tobie Langel <tobie@w3.org>
- CC: public-test-infra <public-test-infra@w3.org>, Richard Ishida <ishida@w3.org>, Anne van Kesteren <annevk@annevk.nl>, "Phillips, Addison" <addison@lab126.com>
Hello Tobie, others, I have read through the followup messages in the thread, but I'm responding in general. I prompted this message from Tobie by asking him privately about how to set up charset information for encoding tests, and proposing .htaccess as a solution. Just a few thoughts, I can live with quite a few outcomes, but I wouldn't want to have to write code for the server side. There is certainly a downside with tying in with Apache, but whatever we use, we'll be tying in with something, either some specific server or some specific software of ours, or so. The possibility to just put the stuff on a server e.g. for testing in private before submitting tests looks important to me. To serve headers from a custom .header (or whatever we call it) file, we have to define the exact semantics of that file (see discussion about adding/replacing/removing headers, and that has just started), and have to make sure they get implemented ("picked up by the server" is easier said than done). Because the implementations will differ from server to server, we have to make sure the implementations match. But then we start to be in the business of testing servers, were we intended to test clients. BTW, in Apache there is also the .asis format, which contains both headers and body. That would work for those cases where we want everything in a single file. See http://httpd.apache.org/docs/2.2/mod/mod_asis.html. The downside is that then you can't test on a local file system because the headers get in the way. The upside is that it's a very clear format, and works with very little settings on Apache, and for other servers, it shouldn't be too difficult to make it work (although I'm not familiar with any other server than Apache); it would definitely be easier on other servers than .htaccess, which includes structured syntax and configuration options for many different Apache modules that are most probably difficult to mirror on other servers. Another idea would be to use a restricted subset of .htaccess functionality, but that would mean we would have to define that, and we would also have to check it. Regards, Martin. On 2013/07/18 20: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 > > >
Received on Friday, 19 July 2013 06:19:57 UTC