Received: (qmail 21745 invoked by uid 2012); 30 Sep 1998 22:11:21 -0000 Message-Id: <19980930221121.21744.qmail@hyperreal.org> Date: 30 Sep 1998 22:11:21 -0000 From: Jeff Squyres Reply-To: jsquyres@lsc.nd.edu To: apbugs@hyperreal.org Subject: mod_speling will return a "Multiple choices" page when only one choice is available X-Send-Pr-Version: 3.2 >Number: 3115 >Category: mod_speling >Synopsis: mod_speling will return a "Multiple choices" page when only one choice is available >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Sep 30 15:20:00 PDT 1998 >Last-Modified: Wed Oct 7 12:04:40 PDT 1998 >Originator: jsquyres@lsc.nd.edu >Organization: >Release: 1.3.1 >Environment: Solaris 2.6 uname output: SunOS lsc 5.5.1 Generic_103640-18 sun4u sparc SUNW,Ultra-1 >Description: In my srm.conf, I have listed several DirectoryIndex files: DirectoryIndex index.html index.htm index.shtml index.cgi I also have mod_speling enabled in my server, with the "CheckSpelling on" in httpd.conf. If one of those files exists in a directory (e.g., http://my.web.server/yow/index.htm), and there are no other files in that directory, and I explicitly try to browse one of the other DirectoryIndex files (e.g., http://my.web.server/yow/index.shtml), mod_speling will notice this and attempt to redirect me to the right page. However, even though there is only one choice of file to go to, mod_spelling returns the "Multiple Choices" page, and only lists the single file (index.htm) as an alternative. It cites "(common basename)" as the reason for choosing it. But note that if I try to browse to /yow/index.html, mod_speling redirects me automatically to index.htm (presumably because it's only a one letter difference). But even so, isn't mod_speling supposed to send a Location: header back if there is only one choice of files to redirect to? >How-To-Repeat: I have made a sample URL for you to see this behavior on -- it contains the example file that I mentioned above (index.htm). But if you try to browse to index.shtml, you'll see the indicated behavior. http://www.lsc.nd.edu/apache_test/index.shtml Notice that http://www.lsc.nd.edu/apache_test/index.html does the right thing (redirects via Location: to index.htm) >Fix: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: rbbloom@us.ibm.com State-Changed-When: Wed Oct 7 12:04:40 PDT 1998 State-Changed-Why: This is working as expected and documented. Mod_speling "allows up to one misspelling (character insertion / omission / transposition or wrong character)" if it finds more than one file or the only file it finds has more than one spelling mistake, the module will create a file list for the user to select the correct file from. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]