Skip to content

Commit

Permalink
fix empty ports (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
spinx authored Sep 29, 2024
1 parent 6b8c5af commit 19975c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/protocol/snowplow/eventBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ func getPageFromParam(params map[string]interface{}, k string) (Page, error) {
qParams := util.QueryToMap(parsedUrl.Query())
frag := parsedUrl.Fragment
port := parsedUrl.Port()
if port == "" {
port = "80"
if parsedUrl.Scheme == "https" {
port = "443"
}
}
page := Page{
Url: p,
Scheme: &parsedUrl.Scheme,
Expand Down

0 comments on commit 19975c4

Please sign in to comment.