mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Whitespace normalization.
This commit is contained in:
parent
c48b0e6657
commit
982c30b861
5 changed files with 3 additions and 81 deletions
|
|
@ -209,7 +209,7 @@ class BaseHandler:
|
||||||
assert type(data) is StringType,"write() argument must be string"
|
assert type(data) is StringType,"write() argument must be string"
|
||||||
|
|
||||||
if not self.status:
|
if not self.status:
|
||||||
raise AssertionError("write() before start_response()")
|
raise AssertionError("write() before start_response()")
|
||||||
|
|
||||||
elif not self.headers_sent:
|
elif not self.headers_sent:
|
||||||
# Before the first output, send the stored headers
|
# Before the first output, send the stored headers
|
||||||
|
|
@ -473,20 +473,3 @@ class CGIHandler(BaseCGIHandler):
|
||||||
self, sys.stdin, sys.stdout, sys.stderr, dict(os.environ.items()),
|
self, sys.stdin, sys.stdout, sys.stderr, dict(os.environ.items()),
|
||||||
multithread=False, multiprocess=True
|
multithread=False, multiprocess=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,19 +187,3 @@ class Headers:
|
||||||
else:
|
else:
|
||||||
parts.append(_formatparam(k.replace('_', '-'), v))
|
parts.append(_formatparam(k.replace('_', '-'), v))
|
||||||
self._headers.append((_name, "; ".join(parts)))
|
self._headers.append((_name, "; ".join(parts)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,15 +191,3 @@ if __name__ == '__main__':
|
||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open('http://localhost:8000/xyz?abc')
|
webbrowser.open('http://localhost:8000/xyz?abc')
|
||||||
httpd.handle_request() # serve one request, then exit
|
httpd.handle_request() # serve one request, then exit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,10 @@ def application_uri(environ):
|
||||||
|
|
||||||
if environ['wsgi.url_scheme'] == 'https':
|
if environ['wsgi.url_scheme'] == 'https':
|
||||||
if environ['SERVER_PORT'] != '443':
|
if environ['SERVER_PORT'] != '443':
|
||||||
url += ':' + environ['SERVER_PORT']
|
url += ':' + environ['SERVER_PORT']
|
||||||
else:
|
else:
|
||||||
if environ['SERVER_PORT'] != '80':
|
if environ['SERVER_PORT'] != '80':
|
||||||
url += ':' + environ['SERVER_PORT']
|
url += ':' + environ['SERVER_PORT']
|
||||||
|
|
||||||
url += quote(environ.get('SCRIPT_NAME') or '/')
|
url += quote(environ.get('SCRIPT_NAME') or '/')
|
||||||
return url
|
return url
|
||||||
|
|
@ -171,35 +171,3 @@ _hoppish = {
|
||||||
def is_hop_by_hop(header_name):
|
def is_hop_by_hop(header_name):
|
||||||
"""Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header"""
|
"""Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header"""
|
||||||
return _hoppish(header_name.lower())
|
return _hoppish(header_name.lower())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -426,4 +426,3 @@ def check_iterator(iterator):
|
||||||
assert not isinstance(iterator, str), (
|
assert not isinstance(iterator, str), (
|
||||||
"You should not return a string as your application iterator, "
|
"You should not return a string as your application iterator, "
|
||||||
"instead return a single-item list containing that string.")
|
"instead return a single-item list containing that string.")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue