aprimadi/influxdb2

[BUG] Invalid URL concatenation: double slashes

Samiisd opened this issue · 2 comments

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.:

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

  1. url concatenation should avoid double slash
  2. 200 should be considered as an eror for api/v2/write, success is 204

I can take on this issue if you want

Sure bro, go ahead.