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

Config test: no error on missing upstream for retrying on HTTP status code #177

Open
ironsmile opened this issue Nov 11, 2015 · 1 comment
Labels
Milestone

Comments

@ironsmile
Copy link
Owner

Consider the example

                            {
                                "type": "proxy",
                                "settings": {
                                    "try_other_upstream_on_code": {
                                        "404": "does-not-exist"
                                    }
                                }
                            }

If the upstream does-not-exist is true to its name, the nedomi -t will not say the config was wrong. Rather, there will be quite a lot of runtime errors.

@ironsmile ironsmile added the bug label Nov 11, 2015
@mstoykov
Copy link
Collaborator

This will more or less require types.App to be provided to each handler when it's created in New.

This is probably not a bad idea as it will mean that the upstream setting could be a setting of the proxy handler not one of the Location/VirtualHost it's in.

Other places where it's used could benefit from this as well - we can practically remove all the things we put in context currently and get them through the types.App.

The list of other handlers currently using contexts' GetApp and GetContext:

  • the status handler
  • the purge handler

@mstoykov mstoykov added this to the 0.2 milestone Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants