honeycombio / libhoney-go

Go library for sending data to Honeycomb
Apache License 2.0
58 stars 40 forks source link

fix: Build the URL using url.JoinPath instead of path.Join #249

Closed MikeGoldsmith closed 3 months ago

MikeGoldsmith commented 3 months ago

Which problem is this PR solving?

There is a weird bug in setting a URL path directly, where it will escape some characters, but not all.

This go playground example shows it. The unescaped value is used directly, the escaped value double escapes some of the characters.

This PR uses url.PathJoin instead, which is intended to handle URLs.

Short description of the changes