[Python-bugs-list] [ python-Bugs-778804 ] CHIHTTPServer connat manage cgi in sub directories

SourceForge.net noreply@sourceforge.net
Mon, 28 Jul 2003 02:01:12 -0700


Bugs item #778804, was opened at 2003-07-28 11:00
Message generated for change (Settings changed) made by vincent_delft
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=778804&group_id=5470

Category: Python Library
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: vincent delft (vincent_delft)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: CHIHTTPServer connat manage cgi in sub directories

Initial Comment:
With Python 2.2.2, CGIHTTPServer 1.32 on Linux Gentoo 
 
If I have a cgi script in cgi-bin it works wery well. 
If i copy the same script (with all same privileges) in cgi-bin/test 
(a subdirectory) I got the following message : 
"Error response 
Error code 403.  
Message: CGI script is not a plain file ('/cgi-bin/test').  
Error code explanation: 403 = Request forbidden -- authorization 
will not help. " 
 
 
If I remove the "rest.find('/')" code functionality by forcing the 
result to -1 it works well (cfr here after) 
 
Can you explain the goal of such coding ? 
 
 
 
 
        i = rest.find('/') 
+      i=-1 
        if i >= 0: 
            script, rest = rest[:i], rest[i:] 
        else: 
            script, rest = rest, '' 
        scriptname = dir + '/' + script 
        scriptfile = self.translate_path(scriptname) 
 
 
 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=778804&group_id=5470