Fix: Content-Length für HTTP/1.1 statische Dateien (NS_ERROR_NET_EMPTY_RESPONSE)
This commit is contained in:
@@ -219,6 +219,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
|||||||
|
|
||||||
self.send_response(200)
|
self.send_response(200)
|
||||||
self.send_header("Content-Type", f"{content_type}; charset=utf-8")
|
self.send_header("Content-Type", f"{content_type}; charset=utf-8")
|
||||||
|
self.send_header("Content-Length", str(len(content)))
|
||||||
self.send_header("Access-Control-Allow-Origin", "*")
|
self.send_header("Access-Control-Allow-Origin", "*")
|
||||||
self.send_header("Cache-Control", "no-cache")
|
self.send_header("Cache-Control", "no-cache")
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|||||||
Reference in New Issue
Block a user