MCPcopy Create free account
hub / github.com/cortexproject/cortex / parseRequestQueryString

Method parseRequestQueryString

pkg/frontend/transport/handler.go:605–617  ·  view source on GitHub ↗
(r *http.Request, bodyBuf bytes.Buffer)

Source from the content-addressed store, hash-verified

603}
604
605func (f *Handler) parseRequestQueryString(r *http.Request, bodyBuf bytes.Buffer) url.Values {
606 // Use previously buffered body.
607 r.Body = io.NopCloser(&bodyBuf)
608
609 // Ensure the form has been parsed so all the parameters are present
610 err := r.ParseForm()
611 if err != nil {
612 level.Warn(util_log.WithContext(r.Context(), f.log)).Log("msg", "unable to parse request form", "err", err)
613 return nil
614 }
615
616 return r.Form
617}
618
619func formatQueryString(queryString url.Values) (fields []any) {
620 var queryFields []any

Callers 1

ServeHTTPMethod · 0.95

Calls 2

LogMethod · 0.45
ContextMethod · 0.45

Tested by

no test coverage detected