mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #23919 -- Removed unneeded str() calls
This commit is contained in:
@@ -10,7 +10,7 @@ MAX_SOCKET_CHUNK_SIZE = 32 * 1024 * 1024 # 32 MB
|
||||
|
||||
|
||||
class ServerHandler(simple_server.ServerHandler):
|
||||
error_status = str("500 INTERNAL SERVER ERROR")
|
||||
error_status = "500 INTERNAL SERVER ERROR"
|
||||
|
||||
def write(self, data):
|
||||
"""'write()' callable as specified by PEP 3333"""
|
||||
@@ -55,12 +55,12 @@ class FileWrapperHandler(ServerHandler):
|
||||
|
||||
|
||||
def wsgi_app(environ, start_response):
|
||||
start_response(str('200 OK'), [(str('Content-Type'), str('text/plain'))])
|
||||
start_response('200 OK', [('Content-Type', 'text/plain')])
|
||||
return [b'Hello World!']
|
||||
|
||||
|
||||
def wsgi_app_file_wrapper(environ, start_response):
|
||||
start_response(str('200 OK'), [(str('Content-Type'), str('text/plain'))])
|
||||
start_response('200 OK', [('Content-Type', 'text/plain')])
|
||||
return environ['wsgi.file_wrapper'](BytesIO(b'foo'))
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class WriteChunkCounterHandler(ServerHandler):
|
||||
|
||||
|
||||
def send_big_data_app(environ, start_response):
|
||||
start_response(str('200 OK'), [(str('Content-Type'), str('text/plain'))])
|
||||
start_response('200 OK', [('Content-Type', 'text/plain')])
|
||||
# Return a blob of data that is 1.5 times the maximum chunk size.
|
||||
return [b'x' * (MAX_SOCKET_CHUNK_SIZE + MAX_SOCKET_CHUNK_SIZE // 2)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user