influxdata / influxdata/influxdb-client-php
Guzzle default headers are overwritten
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 166
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. Create an influx client with custom httpClient which has some "default" headers set.
2. Get for example a writeApi instance, and send some points with DEBUG mode enabled.
3. We dont see the custom added headers being sent to influx when looking at influx client logfile.
__Expected behavior:__
We should see the custom headers being sent to influx host.
To add some context I have influx API under cloudflare zero trust. I want to use service tokens to allow influx client to connect to and write points to my influx API. AFAIK this is not possible ATM due to this headers issue.
__Actual behavior:__
Headers are I guess overwritten when calling the "send" request from http client, more details: https://docs.guzzlephp.org/en/7.0/request-options.html?highlight=default%20header#headers
__Specifications:__
- Client Version: Guzzle 7
- InfluxDB Version: latest
- Platform: linux (debian)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with an InfluxDB client using a custom Guzzle HTTP client that defines default headers, then send points through a writeApi instance with DEBUG enabled. Trace the request send path and compare the configured default headers with those shown in the Influx client logfile. Done means custom headers reach the InfluxDB host without breaking the existing request behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100