[ python-Bugs-778804 ] CGIHTTPServer cannot manage cgi in sub directories

SourceForge.net noreply at sourceforge.net
Sat Jan 15 19:43:26 CET 2005


Bugs item #778804, was opened at 2003-07-28 06:00
Message generated for change (Comment added) made by facundobatista
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: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: vincent delft (vincent_delft)
Assigned to: Nobody/Anonymous (nobody)
Summary: CGIHTTPServer cannot 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) 
 
 
 

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

>Comment By: Facundo Batista (facundobatista)
Date: 2005-01-15 15:43

Message:
Logged In: YES 
user_id=752496

Duplicate of #737202, as the other has the patch, please go
on with it.

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

Comment By: Titus Brown (titus)
Date: 2004-12-19 03:19

Message:
Logged In: YES 
user_id=23486

same as bug 737202, which has an attached patch.

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

Comment By: Raymond Hettinger (rhettinger)
Date: 2003-08-17 14:06

Message:
Logged In: YES 
user_id=80475

Eric, this was your change (2/9/2001).  Will you take it from 
here?

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

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


More information about the Python-bugs-list mailing list