CGI server by Python

Brian Lee senux at senux.com
Sat Oct 5 09:36:38 EDT 2002


On Thu, Sep 26, 2002 at 11:54:54AM +0000, Alex Martelli wrote:
> Brian Lee wrote:
> 
> > Hi,
> > 
> > I tested CGIHTTPServer.py in Python 2.2 and found that cgi files in
> > sub directory does not run. Does anybody know about this?
>         ...
> > avante.xxx.co.kr - - [26/Sep/2002 19:20:24] code 403, message CGI script
> > is not a plain file ('/cgi-bin/a') avante.xxx.co.kr - 
> 
> Exactly as it says, /cgi-bin/a is not a plain file (it's a directory!)
> and CGIHTTPServer.py is written to support plain files right under
> cgi-bin only.  See the parsing in function run_cgi around line 100
> and following of that file in your Python library directory.  If you
> don't like the way it parses things, it ain't hard to modify...

Hi Alex, thanks for your posting!

I read carefully the code how it parse the directory. I modified it
and it works. 

But I found environmental variable, $PATH_INFO is not match for my
code. I searched on Google how PATH_INFO define and how to set
the variable in server. But I can't find it and just wonder someone
who know it. 

-- 
Brian Lee - http://www.senux.com/en/




More information about the Python-list mailing list