[Python-bugs-list] [ python-Bugs-737202 ] CGIHTTPServer does not handle scripts in sub-dirs
SourceForge.net
noreply@sourceforge.net
Tue, 13 May 2003 10:54:52 -0700
Bugs item #737202, was opened at 2003-05-13 19:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=737202&group_id=5470
Category: Python Library
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Hartmut Goebel (htgoebel)
Assigned to: Nobody/Anonymous (nobody)
Summary: CGIHTTPServer does not handle scripts in sub-dirs
Initial Comment:
CGIHTTPServer does not handle scripts in sub directoreis correctly:
When accessing eg. '/cgi-bin/scripts/bla', CGIHTTPServer returns
404 CGI script is not a plain file ('/cgi-bin/script')
This tracked down to CGIHTTPRequestHandler.run_cgi() containing
these lines:
i = rest.find('/')
if i >= 0:
script, rest = rest[:i], rest[i:]
else:
script, rest = rest, ''
scriptname = dir + '/' + script
This will move the dir-part of the 'rest' into 'script', but leave the
actual filename in 'rest'. The 'scriptname' thus does miss the filename.
I assume this should become simply:
script, rest = rest, ''
scriptname = dir + '/' + script
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=737202&group_id=5470