fix(context): verify URL is Non-nil in initQueryCache() (#3969)

This commit is contained in:
Adriano Sela Aviles
2024-05-18 19:48:07 -07:00
committed by GitHub
parent 4f339e6a35
commit e0d46ded6c
2 changed files with 44 additions and 1 deletions

View File

@ -475,7 +475,7 @@ func (c *Context) QueryArray(key string) (values []string) {
func (c *Context) initQueryCache() {
if c.queryCache == nil {
if c.Request != nil {
if c.Request != nil && c.Request.URL != nil {
c.queryCache = c.Request.URL.Query()
} else {
c.queryCache = url.Values{}