io.ErrNoProgress on parsing form spin

This commit is contained in:
Patricio Whittingslow
2026-07-28 23:08:54 -03:00
parent e1766d072f
commit 29c0d2a008
3 changed files with 468 additions and 223 deletions
+6 -1
View File
@@ -445,7 +445,12 @@ func (exch *Exchange) RequestParseForm(dst *httpraw.Form, buf []byte) error {
for read := 0; read < len(buf); {
n, err := exch.ReadBody(buf[read:])
read += n
if n == 0 && err != nil {
if n == 0 {
if err == nil {
err = io.ErrNoProgress
} else if err == io.EOF {
break
}
return err
}
}