Skip to content

Commit

Permalink
fix: check for query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj319 committed Dec 30, 2023
1 parent ec3f8b9 commit 63968dd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ func callHandler(handler interface{}, pathArray []string, handerObj *RouteHandle
}

func (r *SimpleRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
url := req.URL.String()
i := strings.IndexRune(url, '?')
if i != -1 {
url = url[:i]
}
url := req.URL.Path
pathArray := strings.Split(url, "/")
pathArray = removeBlankStrings(pathArray)

Expand Down

0 comments on commit 63968dd

Please sign in to comment.