Skip to content

Commit 649e529

Browse files
Copilotfredbi
andauthored
middleware/parameter.go: fix comment about ParseForm fallback for non-multipart types (#451)
Agent-Logs-Url: https://github.com/go-openapi/runtime/sessions/19da5630-9b1a-4aec-ac77-ca9c8552d4c3 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fredbi <14262513+fredbi@users.noreply.github.com>
1 parent 09c03d0 commit 649e529

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

middleware/parameter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ func (p *untypedParamBinder) Bind(request *http.Request, routeParams RouteParams
100100
}
101101

102102
// Parse via the shared helper. The helper routes on Content-Type
103-
// (multipart/form-data → ParseMultipartForm, otherwise → ParseForm)
103+
// (multipart/form-data → ParseMultipartForm; all non-multipart types,
104+
// including application/x-www-form-urlencoded, → ParseForm)
104105
// and applies the default 32 MiB body cap via http.MaxBytesReader.
105106
// Idempotent across the per-parameter loop: stdlib short-circuits
106107
// when r.MultipartForm / r.PostForm are already populated.

0 commit comments

Comments
 (0)