-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
We're starting the response too early, so when we transmit an error page, it won't be rendered correctly.
As an example, the timeout error looks like this:
POST OK.
start printing: foo
HTTP/1.0 500 ERROR: timed out
Server: BaseHTTP/0.6 Python/3.8.10
Date: Tue, 24 Aug 2021 16:18:10 GMT
Connection: close
Content-Type: text/html;charset=utf-8
Content-Length: 453
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code: 500</p>
<p>Message: ERROR: timed out.</p>
<p>Error code explanation: 500 - Server got itself in trouble.</p>
</body>
</html>
If we don't send the first two lines, we'll get the HTML rendered.
Reactions are currently unavailable