Siwon Kang <kkangsh...@gmail.com> added the comment:

Hi Donghee,
Since you said this is not a bug, I changed the title describing this is a 
matter of improvement.

For your comment, I would say sorry first that I have made you confused. My 
mention about apache is just to give you an example for the other module that 
does similar thing(HTTP request handler with cgi support). I would never say 
the Python server shall support the sub-directory parsing for cgi scripts 
because apache does but I am saying good is good.

>> Yes, IMHO, but this code is related to the http.server.CGIHTTPRequestHandler.
This code looks like to be executed on the http.server.CGIHTTPRequestHandler 
not the apache server.

So you may see the PR changes the CGIHTTPRequestHandler class. Please refer to 
the code.

>> According to docs,
This defaults to ['/cgi-bin', '/htbin'] and describes directories to treat as 
containing CGI scripts.

This is the one I was looking at. As described, I added '/sub/dir/cgi-bin' into 
the cgi_directories expecting it to be treated the directory is for CGI scripts 
but the CGIHTTPRequestHandler does not process it. That is the reason for this 
issue report. Again, there is no note that restrict the path in cgi_directories 
shall be a single depth, so I think this will definitely give a benefit to 
handle the multi-level directories just like https://bugs.python.org/issue21323 
enables processing the sub directories of /cgi-bin.
Does this make sense to you now?

----------
title: http.server is_cgi() does not correctly separate dir -> Improve is_cgi() 
in http.server
type: behavior -> enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38863>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to