Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs
[issue14565] is_cgi doesn't function as documented for cgi_directories
 

Index | Next | Previous | View Flat


report at bugs

May 6, 2012, 11:14 PM


Views: 55
Permalink
[issue14565] is_cgi doesn't function as documented for cgi_directories [In reply to]

Pierre Quentel <pierre.quentel [at] gmail> 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,'')
return True
elif collapsed_path.startswith(head) \
and collapsed_path[len(head)]=='/':
self.cgi_info = head, collapsed_path[len(head)+1:]
return True
return False

BTW the last "return False" is rather useless since is_cgi() is only used in tests like "if is_cgi()"

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14565>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Subject User Time
[issue14565] is_cgi doesn't function as documented for cgi_directories report at bugs May 6, 2012, 12:46 AM
    [issue14565] is_cgi doesn't function as documented for cgi_directories report at bugs May 6, 2012, 2:57 PM
    [issue14565] is_cgi doesn't function as documented for cgi_directories report at bugs May 6, 2012, 11:14 PM
    [issue14565] is_cgi doesn't function as documented for cgi_directories report at bugs May 7, 2012, 2:15 PM
    [issue14565] is_cgi doesn't function as documented for cgi_directories report at bugs May 7, 2012, 8:37 PM
    [issue14565] is_cgi doesn't function as documented for cgi_directories report at bugs May 7, 2012, 11:22 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.