Received: (qmail 61375 invoked by uid 501); 15 Aug 2001 16:26:22 -0000 Message-Id: <20010815162622.61366.qmail@apache.org> Date: 15 Aug 2001 16:26:22 -0000 From: Ray Chan Reply-To: ksc@softhome.net To: submit@bugz.apache.org Subject: if a filename is not english, sometimes, apache will return error code 403, access forbidden. X-Send-Pr-Version: 3.110 >Number: 8187 >Category: os-windows >Synopsis: if a filename is not english, sometimes, apache will return error code 403, access forbidden. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Aug 15 09:30:01 PDT 2001 >Closed-Date: >Last-Modified: Thu Aug 16 07:02:13 PDT 2001 >Originator: ksc@softhome.net >Release: 1.3.20 >Organization: >Environment: Chinese Windows 98 Second Edition >Description: I'm using the chinese windows 98 second edition and apache server 1.3.20. I've found that sometimes if my filename is in chinese, apache will return error code 403, access forbidden, but not always, just most likely. for example, if the filename(not including the file extension) is: 0xB9, 0x4C (%b9L) (chinese character = "¹L") or 0xAC, 0x50 (%acP) (chinese character = "¬P") >How-To-Repeat: just create any file contain the characters 0xB9, 0x4C or 0xAC, 0x50, and try to access from apache server. >Fix: >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: slive State-Changed-When: Wed Aug 15 12:53:57 PDT 2001 State-Changed-Why: We are missing two crucial pieces of information here: 1. What does the error log say? 2. What URL are you using to request the content? My guess is that the problem is that you are sending non-ASCII characters in the URL, which is not allowed. To use non-ASCII characters, they must be URL-encoded. For example, see: http://skew.org/xml/misc/URI-i18n/ Thanks for using Apache! From: "[KSC]" To: slive@apache.org, apbugs@Apache.Org Cc: Subject: Re: os-windows/8187: if a filename is not english, sometimes, apache will return error code 403, access forbidden. Date: Thu, 16 Aug 2001 16:35:54 +1000 Hello, you said it may because I'm sending non-ascii characters to the URL, but that URL is generated by apache. <<1. What does the error log say? I just copy the error log here: [Thu Aug 16 02:25:58 2001] [error] [client 127.0.0.1] (2)No such file or directory: file permissions deny server access: c:/songs/¬p.txt you can see that the file name in the error log is ¬p.txt (0xAC, 0x70), however, the actual file name is ¬P.txt (0xAC, 0x50). <<2. What URL are you using to request the content? when I test it, I just setup the URL as http://localhost:5354/, and the root dir is c:/songs, this is where the test file located. I have even put it to my DNS provider, then the URL became http://enigma.idleplay.net:5354/, but the problem still there. if I set it up as http://localhost:5354/ and the file want to access is ¬P.txt, the URL is: http://localhost:5354/%acP.txt, it's correct, but apache just returns error. I think it may because when apache generates the URL, it produces 0xAC, 0x50, but when it actually tries to access the file, it uses 0xAC, 0x70. If you need to test it, I'll be happy to help. slive@apache.org wrote: > [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! ] > > Synopsis: if a filename is not english, sometimes, apache will return error code 403, access forbidden. > > State-Changed-From-To: open-closed > State-Changed-By: slive > State-Changed-When: Wed Aug 15 12:53:57 PDT 2001 > State-Changed-Why: > > We are missing two crucial pieces of information here: > > 1. What does the error log say? > > 2. What URL are you using to request the content? > > My guess is that the problem is that you are sending > > non-ASCII characters in the URL, which is not allowed. > > To use non-ASCII characters, they must be > > URL-encoded. For example, see: > > http://skew.org/xml/misc/URI-i18n/ > > Thanks for using Apache! State-Changed-From-To: closed-open State-Changed-By: slive State-Changed-When: Thu Aug 16 07:02:13 PDT 2001 State-Changed-Why: Yah, OK. I have no idea what is going on here, so I will re-open the problem report to see if anyone else can help. >Unformatted: [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! ]