mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #25684 -- Removed double newline from request/response output of runserver.
Follow up to 0bc5cd6280
.
This commit is contained in:
parent
5d13cc540e
commit
cdd4ff67d2
@ -77,7 +77,7 @@ class WSGIServer(simple_server.WSGIServer):
|
||||
|
||||
def handle_error(self, request, client_address):
|
||||
if is_broken_pipe_error():
|
||||
logger.info("- Broken pipe from %s\n", client_address)
|
||||
logger.info("- Broken pipe from %s", client_address)
|
||||
else:
|
||||
super().handle_error(request, client_address)
|
||||
|
||||
@ -166,7 +166,7 @@ class WSGIRequestHandler(simple_server.WSGIRequestHandler):
|
||||
extra["status_code"] = 500
|
||||
logger.error(
|
||||
"You're accessing the development server over HTTPS, but "
|
||||
"it only supports HTTP.\n",
|
||||
"it only supports HTTP.",
|
||||
extra=extra,
|
||||
)
|
||||
return
|
||||
|
@ -50,7 +50,7 @@ class WSGIRequestHandlerTestCase(SimpleTestCase):
|
||||
|
||||
with self.assertLogs("django.server", "ERROR") as cm:
|
||||
handler.log_message("GET %s %s", "\x16\x03", "4")
|
||||
self.assertIn(
|
||||
self.assertEqual(
|
||||
"You're accessing the development server over HTTPS, "
|
||||
"but it only supports HTTP.",
|
||||
cm.records[0].getMessage(),
|
||||
@ -114,7 +114,7 @@ class WSGIServerTestCase(SimpleTestCase):
|
||||
"""WSGIServer handles broken pipe errors."""
|
||||
request = WSGIRequest(self.request_factory.get("/").environ)
|
||||
client_address = ("192.168.2.0", 8080)
|
||||
msg = f"- Broken pipe from {client_address}\n"
|
||||
msg = f"- Broken pipe from {client_address}"
|
||||
tests = [
|
||||
BrokenPipeError,
|
||||
ConnectionAbortedError,
|
||||
|
Loading…
Reference in New Issue
Block a user