serve: /config and /load bodies are marked read, so the close does not wait for the drain (#594)

This commit is contained in:
Niko1221 committed 2026-10-05 13:16:53 +02:00
1 parent a8497cf157
commit da170f8ae7
2 files changed
+10 -1

No files matched your search

+2 -1
View File
@@ -3435,6 +3435,7 @@ def make_handler(svc: Service):
complete = False
finally:
self.connection.settimeout(timeout)
self.body_read = True # nothing left for the drain to wait for (#594)
if not complete:
self._json(400, {"error": {"message": "incomplete control request body"}})
return complete
@@ -3465,7 +3466,7 @@ def make_handler(svc: Service):
def _config_post(self):
"""#564: change a few documented keys of the run config - JSON from Strata's own page only, as
/settings (the key is checked before); every other key of the file stays as it is."""
body = self.rfile.read(int(self.headers.get("Content-Length", 0)))
body = self._body()
if not self._own_page("the run config can be changed"):
return
if not svc.config_path: