Skip to content

Commit

Permalink
change url parsing to escape params correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblakeley committed May 14, 2019
1 parent 1ba82aa commit 45a35a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions jsvm_goja.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ func (j *GojaJSVM) LoadTykJSApi() {
data.Set(k, v)
}

u, _ := url.ParseRequestURI(domain)
u.Path = hro.Resource
u, _ := url.ParseRequestURI(domain + hro.Resource)
urlStr := u.String() // "https://api.com/user/"

var d string
Expand Down
3 changes: 1 addition & 2 deletions jsvm_otto.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ func (j *OttoJSVM) LoadTykJSApi() {
data.Set(k, v)
}

u, _ := url.ParseRequestURI(domain)
u.Path = hro.Resource
u, _ := url.ParseRequestURI(domain + hro.Resource)
urlStr := u.String() // "https://api.com/user/"

var d string
Expand Down

0 comments on commit 45a35a9

Please sign in to comment.