Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
bbad84b4
Kaydet (Commit)
bbad84b4
authored
Ara 22, 2006
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[Bug #737202; fix from Titus Brown] Make CGIHTTPServer work for scripts in sub-directories
üst
28cfe299
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
CGIHTTPServer.py
Lib/CGIHTTPServer.py
+19
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/CGIHTTPServer.py
Dosyayı görüntüle @
bbad84b4
...
@@ -105,17 +105,36 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
...
@@ -105,17 +105,36 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def
run_cgi
(
self
):
def
run_cgi
(
self
):
"""Execute a CGI script."""
"""Execute a CGI script."""
path
=
self
.
path
dir
,
rest
=
self
.
cgi_info
dir
,
rest
=
self
.
cgi_info
i
=
path
.
find
(
'/'
,
len
(
dir
)
+
1
)
while
i
>=
0
:
nextdir
=
path
[:
i
]
nextrest
=
path
[
i
+
1
:]
scriptdir
=
self
.
translate_path
(
nextdir
)
if
os
.
path
.
isdir
(
scriptdir
):
dir
,
rest
=
nextdir
,
nextrest
i
=
path
.
find
(
'/'
,
len
(
dir
)
+
1
)
else
:
break
# find an explicit query string, if present.
i
=
rest
.
rfind
(
'?'
)
i
=
rest
.
rfind
(
'?'
)
if
i
>=
0
:
if
i
>=
0
:
rest
,
query
=
rest
[:
i
],
rest
[
i
+
1
:]
rest
,
query
=
rest
[:
i
],
rest
[
i
+
1
:]
else
:
else
:
query
=
''
query
=
''
# dissect the part after the directory name into a script name &
# a possible additional path, to be stored in PATH_INFO.
i
=
rest
.
find
(
'/'
)
i
=
rest
.
find
(
'/'
)
if
i
>=
0
:
if
i
>=
0
:
script
,
rest
=
rest
[:
i
],
rest
[
i
:]
script
,
rest
=
rest
[:
i
],
rest
[
i
:]
else
:
else
:
script
,
rest
=
rest
,
''
script
,
rest
=
rest
,
''
scriptname
=
dir
+
'/'
+
script
scriptname
=
dir
+
'/'
+
script
scriptfile
=
self
.
translate_path
(
scriptname
)
scriptfile
=
self
.
translate_path
(
scriptname
)
if
not
os
.
path
.
exists
(
scriptfile
):
if
not
os
.
path
.
exists
(
scriptfile
):
...
...
Misc/NEWS
Dosyayı görüntüle @
bbad84b4
...
@@ -122,6 +122,9 @@ Extension Modules
...
@@ -122,6 +122,9 @@ Extension Modules
Library
Library
-------
-------
-
Bug
#
737202
:
Make
CGIHTTPServer
work
for
scripts
in
subdirectories
.
Fix
by
Titus
Brown
.
-
Patch
#
1608267
:
fix
a
race
condition
in
os
.
makedirs
()
is
the
directory
-
Patch
#
1608267
:
fix
a
race
condition
in
os
.
makedirs
()
is
the
directory
to
be
created
is
already
there
.
to
be
created
is
already
there
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment