Skip to content

Commit

Permalink
Fixed ignored input path
Browse files Browse the repository at this point in the history
Only the template port  takes preference over the input URL, not paths.
  • Loading branch information
vzamanillo committed Oct 7, 2020
1 parent 7da51a8 commit 6777069
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions v2/pkg/requests/bulk-http-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const (
)

var urlWithPortRgx = regexp.MustCompile(`{{BaseURL}}:(\d+)`)
var urlWithPathRgx = regexp.MustCompile(`{{BaseURL}}.*/`)

// BulkHTTPRequest contains a request to be made from a template
type BulkHTTPRequest struct {
Expand Down Expand Up @@ -296,12 +295,6 @@ func baseURLWithTemplatePrefs(data string, parsedURL *url.URL) string {
parsedURL.Host = hostname
}

// template path preference over input URL path
hasPath := len(urlWithPathRgx.FindStringSubmatch(data)) > 0
if hasPath {
parsedURL.Path = ""
}

return parsedURL.String()
}

Expand Down

0 comments on commit 6777069

Please sign in to comment.