Skip to content

Commit 19975c4

Browse files
authored
fix empty ports (#594)
1 parent 6b8c5af commit 19975c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/protocol/snowplow/eventBuilder.go

+6
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ func getPageFromParam(params map[string]interface{}, k string) (Page, error) {
164164
qParams := util.QueryToMap(parsedUrl.Query())
165165
frag := parsedUrl.Fragment
166166
port := parsedUrl.Port()
167+
if port == "" {
168+
port = "80"
169+
if parsedUrl.Scheme == "https" {
170+
port = "443"
171+
}
172+
}
167173
page := Page{
168174
Url: p,
169175
Scheme: &parsedUrl.Scheme,

0 commit comments

Comments
 (0)