cpython: ecef74419d55 (original) (raw)

Mercurial > cpython

changeset 70908:ecef74419d55

Close #12289: Fix "is executable?" test in the CGI server Use os.access(path, os.X_OK) instead of (os.stat(path).st_mode & 0o111 != 0), and ignore the test on Windows. [#12289]

Victor Stinner victor.stinner@haypocalc.com
date Mon, 20 Jun 2011 17:45:54 +0200
parents d84760f1dcbe
children 1861683793d9
files Lib/http/server.py
diffstat 1 files changed, 2 insertions(+), 6 deletions(-)[+] [-] Lib/http/server.py 8

line wrap: on

line diff

--- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -897,11 +897,7 @@ def nobody_uid(): def executable(path): """Test for executable file."""

class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): @@ -1015,7 +1011,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRe scriptname) return ispy = self.is_python(scriptname)