[BUG] Invalid URL concatenation: double slashes
Samiisd opened this issue · 2 comments
Samiisd commented
Issues
Context
If the provided influxdb url ends with /
(e.g. http://localhost:8086/
), the following format generates an API url with double slashes:
https://github.com/aprimadi/influxdb2/blob/main/src/api/write.rs#L20
While this isn't an issue for some servers, it is for the other ones, e.g.:
- with double slashe: https://docs.rs/url/latest/url//struct.Url.html#method.join
- without: https://docs.rs/url/latest/url/struct.Url.html#method.join
What is making this issue even worst with InfluxDB server, is that the return code is 200
, therefore this client thinks that the entries were correctly added, while no new data is observed on the influxdb server.
Summary
- url concatenation should avoid double slash
200
should be considered as an eror forapi/v2/write
, success is204
Samiisd commented
I can take on this issue if you want
aprimadi commented
Sure bro, go ahead.