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

fix(router) ensure preserve_host when no hosts #2344

Merged
merged 1 commit into from Apr 6, 2017

Conversation

thibaultcha
Copy link
Member

Summary

The router avoids grabbing the headers if not absolutely necessary (at
least one API configured with a hosts rule. This caused an edge-case
and mislead the router into believing the headers were already grabbed,
and returned a nil value instead of the request's Host header.

Full changelog

  • add a unit test case
  • add an integration test case, although more generic
  • use the ngx.var.http_* API to grab the request's Host

The router avoids grabbing the headers if not absolutely necessary (at
least one API configured with a `hosts` rule. This caused an edge-case
and mislead the router into believing the headers were already grabbed,
and returned a `nil` value instead of the request's Host header.

* add a unit test case
* add an integration test case, although more generic
* use the `ngx.var.http_*` API to grab the request's Host
@thibaultcha thibaultcha added this to the 0.10.2 milestone Apr 6, 2017
@thibaultcha thibaultcha merged commit 62e3828 into master Apr 6, 2017
@thibaultcha thibaultcha deleted the fix/preserve-hosts-no-grab-headers branch April 6, 2017 22:11
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 this pull request may close these issues.

None yet

1 participant