Skip to content

[ISSUE-4] Successful request validation quits access phase #5

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

Merged
merged 2 commits into from
Nov 11, 2015

Conversation

alexpopero
Copy link
Contributor

No description provided.

@alexpopero
Copy link
Contributor Author

@ddascal Take a look !

@ddragosd
Copy link
Member

ddragosd commented Nov 5, 2015

I believe this was the intent initially. ngx.exit(ngx.OK) quits the current phase handler continuing to run later phases for the current request. This may indeed pose problems for cases when something else needs to be executed in the access_phase, after the validation. Is this the case you're trying to achieve here ? If yes there may be other places to update as well.

At the same time, in case of validation error, the only way this library stops the request is by calling ngx.exit() with another status. In that case, the remaining logic in access_phase won't be executed.

@alexpopero
Copy link
Contributor Author

@ddragosd That's exactly what I want. In case validation fails here, it's ok to exit the whole request phase.

@alexpopero
Copy link
Contributor Author

@ddascal ping

@cristianconstantin
Copy link
Contributor

👍

@ddragosd, ngx.exit() will still be called in case of validation errors, so I don't see any harm in applying this change.

ddragosd added a commit that referenced this pull request Nov 11, 2015
[ISSUE-4] Successful request validation quits access phase
@ddragosd ddragosd merged commit 380c5c2 into adobe-apiplatform:master Nov 11, 2015
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.

3 participants