[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Glenn Linderman
Glenn Linderman added the comment: Thanks for the patch, Oscar, I've not had more time to follow up on this issue, and haven't yet learned how to generate the patches. While you dropped the "return False" line, which surprised me, the implicit "return None" is sufficiently false, that there no

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Oscar Campos
Changes by Oscar Campos : Added file: http://bugs.python.org/file26686/http-server.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Oscar Campos
Changes by Oscar Campos : Added file: http://bugs.python.org/file26685/http-server.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Oscar Campos
Oscar Campos added the comment: Greetings, I did a diff patch based on the previous work of Glenn Linderman and Pierre Quentel. I did some test and is working well so now the implementation is doing what the docstring says. I already passed the full test suite without problems. I add two pat

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-07 Thread Pierre Quentel
Pierre Quentel added the comment: Hi Glenn, My proposal was not about optimization, I just thought that "if x==y" is simpler than "if len(x)==len(y) and x==y". Since we don't expect that there will be many directories in the list, I don't think optimizing is so important. But it doesn't matt

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-07 Thread Éric Araujo
Changes by Éric Araujo : -- versions: -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-07 Thread Glenn Linderman
Glenn Linderman added the comment: Hi Pierre, You are right, the "found" variable is not needed, I guess the reason I coded it that way, is I had some validation code before the return, during testing, so it was easier not to have it in three places. Regarding precalculating ln, I don't know

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-06 Thread Pierre Quentel
Pierre Quentel added the comment: Thanks for the explanation I still think that the patch can be simplified, not using path lengths and the "found" flag collapsed_path = _url_collapse_path(self.path) for head in self.cgi_directories: if head==collapsed_path: self.cgi_info = (head,

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-06 Thread Glenn Linderman
Glenn Linderman added the comment: Hi Pierre, Nice to see your name pop up again. Your suggestion is certainly simpler... but unfortunately, too much simpler. One reason, is that in configuring a path to contain CGI files, the CGI files are allowed to be there, or anywhere deeper in the tree

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-06 Thread Pierre Quentel
Pierre Quentel added the comment: Hi Glenn, good to hear from you ;-) I think the fix can be simplified replacing dir_sep = collapsed_path.find('/', 1) by dir_sep = collapsed_path.rfind('/', 1) -- nosy: +quentel ___ Python tracker

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-04-12 Thread Glenn Linderman
Glenn Linderman added the comment: Happily, this can be cured by overriding and replacing is_cgi, but it shouldn't be necessary to do so. -- components: +Library (Lib) type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-04-12 Thread Glenn Linderman
Changes by Glenn Linderman : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-04-12 Thread Glenn Linderman
New submission from Glenn Linderman : I notice a deficiency in is_cgi: there is no documentation requiring cgi_directories to be a single part, only that the initial value happens to be a list of two directories, each of which have only a single part or level. The description of is_cgi, howev