mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
the usual
This commit is contained in:
parent
1cd6a457d9
commit
d01e9aa0df
2 changed files with 6 additions and 4 deletions
|
@ -148,8 +148,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||||
if ua:
|
if ua:
|
||||||
env['HTTP_USER_AGENT'] = ua
|
env['HTTP_USER_AGENT'] = ua
|
||||||
# XXX Other HTTP_* headers
|
# XXX Other HTTP_* headers
|
||||||
import regsub
|
decoded_query = string.replace(query, '+', ' ')
|
||||||
decoded_query = regsub.gsub('+', ' ', query)
|
|
||||||
try:
|
try:
|
||||||
os.setuid(nobody)
|
os.setuid(nobody)
|
||||||
except os.error:
|
except os.error:
|
||||||
|
|
|
@ -3,8 +3,11 @@ import sys
|
||||||
import imp
|
import imp
|
||||||
import string
|
import string
|
||||||
|
|
||||||
t = imp.find_module('test_zlib')
|
try:
|
||||||
file = t[0]
|
t = imp.find_module('test_zlib')
|
||||||
|
file = t[0]
|
||||||
|
except ImportError:
|
||||||
|
file = open(__file__)
|
||||||
buf = file.read() * 8
|
buf = file.read() * 8
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue