Skip to content

Commit

Permalink
HTTP utility method improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleu committed Sep 8, 2024
1 parent f7f007e commit 0210c53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controller/cutil/rc.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ func QueryStringBool(r *http.Request, key string) bool {
return x == util.BoolTrue || x == "t" || x == "True" || x == "TRUE"
}

func QueryArgsMap(r *http.Request) util.ValueMap {
ret := make(util.ValueMap, len(r.Header))
for k, v := range r.URL.Query() {
func QueryArgsMap(uri *url.URL) util.ValueMap {
ret := make(util.ValueMap, len(uri.Query()))
for k, v := range uri.Query() {
if len(v) == 1 {
ret[k] = v[0]
} else {
Expand Down

0 comments on commit 0210c53

Please sign in to comment.