Received: (qmail 31792 invoked by uid 501); 3 Aug 2001 01:12:53 -0000 Message-Id: <20010803011253.31791.qmail@apache.org> Date: 3 Aug 2001 01:12:53 -0000 From: Jim Mackraz Reply-To: bugs@trickybit.to To: submit@bugz.apache.org Subject: initial default page returns index.html.zh.Big5 X-Send-Pr-Version: 3.110 >Number: 8130 >Category: mod_negotiation >Synopsis: initial default page returns index.html.zh.Big5 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu Aug 02 18:20:00 PDT 2001 >Closed-Date: Tue Oct 02 13:07:47 PDT 2001 >Last-Modified: Tue Oct 02 13:07:47 PDT 2001 >Originator: bugs@trickybit.to >Release: 1.13.20 >Organization: >Environment: redhat 7.1, updated. >Description: After clean config/build/install on clean RH7 system, defaunt index page ("/") returns index.html.zh.Big5 instead of index.html.en Configured with --enable-module=most --enable-shared=max >How-To-Repeat: On a clean installation of RH7 (w/ no web server) built 1.13.20 from source with configuration: ./configure --prefix=/usr/local/apache --enable-module=most --enable-shared=max Started apache, tested from a windows machine (IE5.5, Win2000) http:// returned index.html.zh.Big5 instead of index.html.en. - determined it was zh.Big5 by comparing file size (1062) and entry in access log for / - noticed the .Big5 was the only index.html.* to have execute access, but changing this made no difference, likewise adding execute access to index.html.en. - renaming the file to anything starting with index.html. does not change the results: the file is returned. Even if another file is named index.html.zh.Big5. >Fix: It must be based on the file's content... but I don't know now mod_negotiation works; does it look inside at the document attributes? I tried many variations of file names and content copied from other index.html.* and couldn't figure out what the heck caused zh.Big5 to be selected. (I note that .zh is not represented by AddLanguage, but it didn't seem to matter, because the problem occured regardless of file extensions... WORKAROUND: delete htdocs/index.html.zh.Big5 >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: stoddard State-Changed-When: Tue Oct 2 13:07:46 PDT 2001 State-Changed-Why: Will be fixed in the next release. Bill Rowe shot the bug and Bill Stoddard ported the fix from 2.0 to 1.3. For future reference, I am adding the significant text of an email exchange between B. Rowe and the bug db author: >Unformatted: >>>> Size is part of the negotation, the very _LAST_ part. >>>> Is your Big5 file actually smaller than the others? >>> >>> Yes it is. >>> I will test by making it much longer: >>> ...testing... >>> Ah, you got it. Adding much content to >>> index.html.zh.Big5 resulted in .en being served. >>> >>> I will now restore it to "short" and test your other >>> points. >>> >>> >>>> Also, do you have the .en, .se, .tw definitions at the >>>> _top_level_? >>> >>> Don't know precisely what you mean by "top level," but >>> as per defaults: >>> .en, .se, and .tw AddLanguage directives are >>> directly "beneath" >>> >>> >>>> is this line in your conf? >>>> >>>> AddCharset Big5 .Big5 .big5 >>> >>> Yes. >>> >>> Commenting out AddLanguage for tw and zh-tw (and >>> restarting apache) makes no >>> difference >>> Likewise commenting out AddCharset Big .Big5 .big5 >>> makes no difference. >>> >>> >>>> AddLanguage tw .tw >>> >>> In there, commenting it out makes no difference >>> >>>> Just checking. >>> >>> So, why does size matter...? ;^) >>> >>> Note that the second-shortest index.html file >>> is .kr.iso-kr, third-shortest >>> is .en. >>> I also notice that the file is .zh.Big5 not .tw.Big5 >>> (and that appeared to be a late change in the source >>> upgrade notes I saw on Deja) and there is NO >>> appearance of ".zh" in httpd.conf at all. >>> >>> Ah, there you go! This fixes the problem: >>> mv index.html.zh.big5 index.html.tw.big5 >>> >>> So, the combination of being a short file, and NOT >>> being represented in the AddLanguage list seems to be >>> the issue. >>> >>> Compare your installation on those points: file >>> named .zh.Big5 (not .tw) and no .zh in httpd.conf. >>> >>> Again, that's the default configuration...! [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database 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! ]