mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-12 23:54:01 +09:00
ParseForm reads no body on a GET or on a POST that is not a form. When such a request declared a body and never sent it, net/http drained it after the handler flushed the headers, with no read deadline, so the request held its slot for as long as the client kept the connection. The handler now reads the rest of the body itself, under the same deadline and size cap as the form. Draining was chosen over refusing a declared body so that clients which send one stay working. A body over the cap now answers 413 instead of a generic 400. Assisted-by: LLM Signed-off-by: ZverGuy <maximbel2003@gmail.com>