Skip to content

Commit 8e615ae

Browse files
author
Tarek Ziadé
committed
Merged revisions 78367 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78367 | tarek.ziade | 2010-02-23 00:53:05 -0500 (Tue, 23 Feb 2010) | 1 line fixed python#5801: removed spurious empty lines in wsgiref ........
1 parent c339978 commit 8e615ae

5 files changed

Lines changed: 2 additions & 177 deletions

File tree

Lib/wsgiref/handlers.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def format_date_time(timestamp):
2020
)
2121

2222

23-
2423
class BaseHandler:
2524
"""Manage the invocation of a WSGI application"""
2625

@@ -55,13 +54,6 @@ class BaseHandler:
5554
headers = None
5655
bytes_sent = 0
5756

58-
59-
60-
61-
62-
63-
64-
6557
def run(self, application):
6658
"""Invoke the application"""
6759
# Note to self: don't move the close()! Asynchronous servers shouldn't
@@ -351,15 +343,6 @@ def add_cgi_vars(self):
351343
raise NotImplementedError
352344

353345

354-
355-
356-
357-
358-
359-
360-
361-
362-
363346
class SimpleHandler(BaseHandler):
364347
"""Handler that's just initialized with streams, environment, etc.
365348
@@ -430,23 +413,6 @@ class BaseCGIHandler(SimpleHandler):
430413
origin_server = False
431414

432415

433-
434-
435-
436-
437-
438-
439-
440-
441-
442-
443-
444-
445-
446-
447-
448-
449-
450416
class CGIHandler(BaseCGIHandler):
451417

452418
"""CGI-based invocation via sys.stdin/stdout/stderr and os.environ
@@ -471,20 +437,3 @@ def __init__(self):
471437
self, sys.stdin, sys.stdout, sys.stderr, dict(os.environ.items()),
472438
multithread=False, multiprocess=True
473439
)
474-
475-
476-
477-
478-
479-
480-
481-
482-
483-
484-
485-
486-
487-
488-
489-
490-
#

Lib/wsgiref/headers.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@ def _formatparam(param, value=None, quote=1):
2525
return param
2626

2727

28-
29-
30-
31-
32-
33-
34-
35-
36-
37-
38-
39-
4028
class Headers:
4129

4230
"""Manage a collection of HTTP response headers"""
@@ -87,10 +75,6 @@ def __getitem__(self,name):
8775
"""
8876
return self.get(name)
8977

90-
91-
92-
93-
9478
def __contains__(self, name):
9579
"""Return true if the message contains the header."""
9680
return self.get(name) is not None
@@ -127,9 +111,6 @@ def keys(self):
127111
"""
128112
return [k for k, v in self._headers]
129113

130-
131-
132-
133114
def values(self):
134115
"""Return a list of all header values.
135116
@@ -171,7 +152,6 @@ def setdefault(self,name,value):
171152
else:
172153
return result
173154

174-
175155
def add_header(self, _name, _value, **_params):
176156
"""Extended header setting.
177157
@@ -200,19 +180,3 @@ def add_header(self, _name, _value, **_params):
200180
v = self._convert_string_type(v)
201181
parts.append(_formatparam(k.replace('_', '-'), v))
202182
self._headers.append((self._convert_string_type(_name), "; ".join(parts)))
203-
204-
205-
206-
207-
208-
209-
210-
211-
212-
213-
214-
215-
216-
217-
218-
#

Lib/wsgiref/simple_server.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ def close(self):
3838

3939

4040

41-
42-
4341
class WSGIServer(HTTPServer):
4442

4543
"""BaseHTTPServer that implements the Python WSGI protocol"""
@@ -69,18 +67,6 @@ def set_app(self,application):
6967

7068

7169

72-
73-
74-
75-
76-
77-
78-
79-
80-
81-
82-
83-
8470
class WSGIRequestHandler(BaseHTTPRequestHandler):
8571

8672
server_version = "WSGIServer/" + __version__
@@ -139,29 +125,6 @@ def handle(self):
139125

140126

141127

142-
143-
144-
145-
146-
147-
148-
149-
150-
151-
152-
153-
154-
155-
156-
157-
158-
159-
160-
161-
162-
163-
164-
165128
def demo_app(environ,start_response):
166129
from io import StringIO
167130
stdout = StringIO()
@@ -190,16 +153,3 @@ def make_server(
190153
import webbrowser
191154
webbrowser.open('http://localhost:8000/xyz?abc')
192155
httpd.handle_request() # serve one request, then exit
193-
194-
195-
196-
197-
198-
199-
200-
201-
202-
203-
204-
205-
#

Lib/wsgiref/util.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ def __next__(self):
3232
return data
3333
raise StopIteration
3434

35-
36-
37-
38-
39-
40-
41-
4235
def guess_scheme(environ):
4336
"""Return a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
4437
"""
@@ -161,7 +154,6 @@ def setup_testing_defaults(environ):
161154

162155

163156

164-
165157
_hoppish = {
166158
'connection':1, 'keep-alive':1, 'proxy-authenticate':1,
167159
'proxy-authorization':1, 'te':1, 'trailers':1, 'transfer-encoding':1,
@@ -171,35 +163,3 @@ def setup_testing_defaults(environ):
171163
def is_hop_by_hop(header_name):
172164
"""Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header"""
173165
return _hoppish(header_name.lower())
174-
175-
176-
177-
178-
179-
180-
181-
182-
183-
184-
185-
186-
187-
188-
189-
190-
191-
192-
193-
194-
195-
196-
197-
198-
199-
200-
201-
202-
203-
204-
205-
#

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ C-API
254254
Library
255255
-------
256256

257+
- Issue #5801: removed spurious empty lines in wsgiref.
258+
257259
- Issue #6666: fix bug in trace.py that applied the list of directories
258260
to be ignored only to the first file. Noted by Bogdan Opanchuk.
259261

0 commit comments

Comments
 (0)