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

HTTP plugin match request header with out using ^ and $ #2754

Closed
idanto opened this issue Dec 29, 2019 · 0 comments · Fixed by #2761
Closed

HTTP plugin match request header with out using ^ and $ #2754

idanto opened this issue Dec 29, 2019 · 0 comments · Fixed by #2761
Assignees

Comments

@idanto
Copy link

idanto commented Dec 29, 2019

Check CONTRIBUTING guideline first and here is the list to help us investigate the problem.

Describe the bug
In HTTP input plugin there is a switch/case part

when /Expect/i

This switch case is based on regular expressions that are not an exact match - not start with ^ and ends with $.
In case I have a custom header with one of those values like x-envoy-expected-rq-timeout-ms (which is auto-generated by envoy proxy) the request will fail although it should pass.

To Reproduce
Setup Fluentd with HTTP input plugin and send a custom header called some-header-expected-something with a value which is not 100-continue.

Expected behavior
The match should be an exact match.

Your Environment

  • Fluentd or td-agent version: fluentd 1.6.3 (but also true to the latest version)
  • Operating system: alpine 3.9.4
  • Kernel version: 4.14.138-114.102.amzn2.x86_64

Your Configuration

<system>
  log_level "#{ENV["LOG_LEVEL"] || 'info'}"
</system>

<source>
  @type  http
  @id    input1
  port   "#{ENV["PORT"] || '24224'}"
  bind 0.0.0.0
</source>

<match "**">
  @type stdout
</match>

Your Error Log
No error log just 417 respose code

HTTP/1.1 417 Expectation Failed
content-length: 0
content-type: text/plain
x-envoy-upstream-service-time: 4
date: Sun, 29 Dec 2019 14:27:17 GMT
server: istio-envoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants