Skip to content

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