redpanda-data / redpanda-data/benthos
"http_server" input: query parameter overwrites header field with the same name
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
When using the http_server input, the query parameters and header fields are both kept in the metadata. This has the consequence that if a query parameter has the name as a header field, the header field value gets overwritten with the query parameter. This likely hasn't been reported due to the odd chances of query parameters and header field names coinciding (also due to differing capitalization traditions).
As @mihaitodor suggested on Discord, where I asked about this behavior, that extra parameters could be introduced to configure different namespaces (i.e. sub-objects of meta) for query parameters and header fields.
I like this idea as it would also enable to test for request errors 414 (Request URI too long) and 431 (header fields too large) correctly, which is currently not possible.
Contributor guide
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 at the http_server input's metadata construction and trace how query parameters and header fields are inserted. Define separate metadata namespaces for the two sources, then add coverage for same-name collisions and the 414/431 cases described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100