[arvados] updated: 2.5.0-10-gffd49a86e
git repository hosting
git at public.arvados.org
Mon Jan 16 22:28:08 UTC 2023
Summary of changes:
lib/controller/router/request.go | 12 ++++++++++++
lib/controller/router/request_test.go | 10 +++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
via ffd49a86ec939a674e141a4cab8dcb3b6baaf2e6 (commit)
via 2b8061c14002b9c58ccebbfbccd041398eb5201c (commit)
via 6742560001ba1db4d51e5bcd5333a0b04d07ca5c (commit)
from a0bee12bba25e564b26972dfb572c5a9e13c8de6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ffd49a86ec939a674e141a4cab8dcb3b6baaf2e6
Merge: a0bee12bb 2b8061c14
Author: Tom Clegg <tom at curii.com>
Date: Mon Jan 16 17:26:57 2023 -0500
Merge branch '19597-multipart-request'
fixes #19597
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
commit 2b8061c14002b9c58ccebbfbccd041398eb5201c
Author: Tom Clegg <tom at curii.com>
Date: Mon Jan 16 17:26:41 2023 -0500
19597: Comment explicit ParseForm usage.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/controller/router/request.go b/lib/controller/router/request.go
index c0a2f23cc..97efe3172 100644
--- a/lib/controller/router/request.go
+++ b/lib/controller/router/request.go
@@ -61,6 +61,12 @@ func guessAndParse(k, v string) (interface{}, error) {
// If the request has a parameter whose name is attrsKey (e.g.,
// "collection"), it is renamed to "attrs".
func (rtr *router) loadRequestParams(req *http.Request, attrsKey string) (map[string]interface{}, error) {
+ // Here we call ParseForm and ParseMultipartForm explicitly
+ // (even though ParseMultipartForm calls ParseForm if
+ // necessary) to ensure we catch errors encountered in
+ // ParseForm. In the non-multipart-form case,
+ // ParseMultipartForm returns ErrNotMultipart and hides the
+ // ParseForm error.
err := req.ParseForm()
if err == nil {
err = req.ParseMultipartForm(int64(rtr.config.MaxRequestSize))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list