Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty header key appears if user set Custom HTTP Headers as empty fields when create datasource #1202

Open
dmitryk-dk opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dmitryk-dk
Copy link

What happened:
While configuring the data source, the user can define empty custom headers like in the image below

Image

In that case, opts.Header will have empty header keys, which are not allowed

and when you try to query the data source, you will get an error like

Post "https://play-vmlogs.victoriametrics.com/select/logsql/query?end=1737573753&limit=1000&query=%2A&start=1737570153": net/http: invalid header field name ""

What you expected to happen:
Headers keys shouldn't be empty and query works as expected

How to reproduce it (as minimally and precisely as possible):
Please check my description of the issue

Anything else we need to know?:

Environment:

  • SDK version: v0.260.3
  • Grafana version: v11.3.0
  • Go version: v1.23.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant