[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Siwon Kang
Change by Siwon Kang : -- pull_requests: -16785 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Siwon Kang
Change by Siwon Kang : -- pull_requests: +16800 pull_request: https://github.com/python/cpython/pull/17312 ___ Python tracker ___

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Dong-hee Na
Dong-hee Na added the comment: 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. According to docs, This defaults to ['/cgi-bin', '/htbin'] and describes

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Siwon Kang
Siwon Kang added the comment: Thank you for your message and the info about 21323. I agree with the idea that cgi files are conventionally placed at the cgi-bin of the root but there is no explicit regulation so other servers, apache for example, handle this kind of sub directories

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Dong-hee Na
Dong-hee Na added the comment: In addition, the code is not about the path on the file system, but about the web request path. https://bugs.python.org/msg216960 will help you to understand. -- ___ Python tracker

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Dong-hee Na
Dong-hee Na added the comment: CGI programs are stored in a directory which must be configured in the web server. The path is typically SERVER_ROOT/cgi-bin, so the URL looks like http://www.domain/cgi-bin/script So IMHO, is_cgi's assumption is correct. IMHO, this is not the wrong code.

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Siwon Kang
Change by Siwon Kang : -- keywords: +patch pull_requests: +16785 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17292 ___ Python tracker ___

[issue38863] http.server is_cgi() does not correctly separate dir

2019-11-20 Thread Siwon Kang
New submission from Siwon Kang : is_cgi() in CGIHTTPRequestHandler class separates given path into (dir, rest) then checks if dir is in cgi_directories. However, it divides based on the first seen '/', multi-level directories like /sub/dir/cgi-bin/hello.py is divided into head=/sub,