'Accept' in `request_headers` doesn't match rule in certain cases when running http-server
- Dominant language
- Go
- Stars
- 12
- Forks
- 18
- Avg merge
- 10h 32m
- Merged PRs (30d)
- 1
Description
Consider the rule:
```yaml
rules:
- path: /feed
methods: ["GET"]
request_headers:
Authorization: "Token token=testing"
Accept: "application/vnd.cif.v3+json"
query_params:
itype: "ipv4"
```
I couldn't get stream's http-server to match against the rule when a request came in that should have matched, e.g.:
`curl -H "Authorization: Token token=testing" -H "Accept: application/vnd.cif.v3+json" "http://localhost:8080/feed?itype=ipv4"
However, the moment I removed the "Accept" line from the `request_headers` key in the rule, the same request worked.
```yaml
rules:
- path: /feed
methods: ["GET"]
request_headers:
Authorization: "Token token=testing"
query_params:
itype: "ipv4"
```
Either **stream** isn't picking up on it correctly or I've config'd something incorrectly in the rule or my clients. I tried from a few different HTTP clients including curl and the elastic-package system test (which I think uses Golang under the hood). Trying from either client exhibited the same failure.
Not sure if it has something to do with special chars or perhaps I have just missed something. Figured I'd file an issue in the event you're able to reproduce.
Contributor guide
Assessment
This issue has not been assessed yet.