- From: <noah_mendelsohn@us.ibm.com>
- Date: Tue, 28 Aug 2007 10:17:49 -0400
- To: wangxiao@musc.edu
- Cc: "'www-tag'" <www-tag@w3.org>
Xiashu Wang writes: > I found the common practice of web server is to ignore the unknown query > parameter. > > For instance, > > http://www.w3.org/?foo=bar > > response the same as > > http://www.w3.org > > But should it be a 404 instead? Speaking for myself, and not for the TAG, when you say "should it be a 404", I think that can be read two ways: 1) Is it strictly a violation of Web Architecture? I think the answer to that is no. The authority responsible for these reasources is presumably indicating that both http://www.w3.org and http://www.w3.org?foo=bar (I'm going to leave out that trailing / in your second one) are URIs associated with resources. Implicit in your example is that those resources seem in all cases to serve the same representations, and so in the absence of other information external observers may at least suspect that they are in fact the same resource. 2) Is it a good idea? Well, Web Architecture suggests [1] as good practice: "A URI owner SHOULD NOT associate arbitrarily different URIs with the same resource." So, the question is whether these differences are sufficiently arbitrary as to be discourged. My personal feeling is: in most cases, yes the advice in Web Architecture applies here, so don't do it. Still, this is just a good practice, and not strictly required by the architeture; if you feel that the benefits to your users and the community of giving the multiple URIs to the same resource outweighs the drawbacks then you can do it. In any case, my personal feeling is that this is already pretty well covered by the Web Architecture document. I suppose that your examples might be considered for inclusion in an expanded version of that section if the document is ever revised, or perhaps they might be included if we decide to update the "Metadata in URI" finding [2]. Thank you very much for your comment. Noah [1] http://www.w3.org/TR/webarch/#uri-aliases [2] http://www.w3.org/2001/tag/doc/metaDataInURI-31.html -------------------------------------- Noah Mendelsohn IBM Corporation One Rogers Street Cambridge, MA 02142 1-617-693-4036 -------------------------------------- Xiaoshu Wang <wangxiao@musc.edu> Sent by: www-tag-request@w3.org 08/28/2007 06:49 AM Please respond to wangxiao To: "'www-tag'" <www-tag@w3.org> cc: (bcc: Noah Mendelsohn/Cambridge/IBM) Subject: Response to unknown query parameter Hi, Tag members, I found the common practice of web server is to ignore the unknown query parameter. For instance, http://www.w3.org/?foo=bar response the same as http://www.w3.org But should it be a 404 instead? I think if this behavior is not specified, it will have serious consequence because one resource can in fact be identified by many URIs. Should a recommendation be made, or there is already one that I am not aware of, regarding the response to unknown query parameter? Xiaoshu
Received on Tuesday, 28 August 2007 14:18:16 UTC