Skip to content

Commit fc09120

Browse files
authored
Merge pull request #114 from projectdiscovery/bugfix-nil-params
Adding nil check on url Params
2 parents 42f6bec + 3dbe62f commit fc09120

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

url/url.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ func (u *URL) Update() {
5252
// This is a hot patch for url.URL
5353
// parameters are serialized when parsed with `url.Parse()` to avoid this
5454
// url should be parsed without parameters and then assigned with url.RawQuery to force unserialized parameters
55-
u.RawQuery = u.Params.Encode()
55+
if u.Params != nil {
56+
u.RawQuery = u.Params.Encode()
57+
}
5658
}
5759

5860
// Query returns Query Params

0 commit comments

Comments
 (0)