Skip to content

Commit

Permalink
fix: improve handling of extra slashes during ESP websocket URL
Browse files Browse the repository at this point in the history
reconstruction
  • Loading branch information
amlmtl committed Dec 7, 2023
1 parent 0cfca82 commit 04fef0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/plugin/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func generateServerUrl(isTls bool, host string, portPtr *uint16, serverPath stri
host = fmt.Sprintf("%s:%d", host, *portPtr)
}

if len(serverPath) > 0 && serverPath[:1] == "/" {
serverPath = serverPath[1:]
}

p := path.Join(serverPath, "eventStreamProcessing/v2/connect")

urlString := fmt.Sprintf("%s://%s/%s", urlScheme, host, p)
Expand Down

0 comments on commit 04fef0c

Please sign in to comment.