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 middleware panic on nil *http.Request #212

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

DariaKunoichi
Copy link
Contributor

Goal

One of the two default OnBeforeNotify callbacks was panicking if http request in Event's RawData was nil.
Check for nil request added (#210).

Design

Changeset

Added check for nil http.Request in httpRequestMiddleware callback.

Testing

Added unit tests for nil request scenario.

@DariaKunoichi DariaKunoichi changed the base branch from next to release-v2.2.1 February 20, 2024 18:16
@DariaKunoichi DariaKunoichi merged commit 3804faf into release-v2.2.1 Feb 20, 2024
28 checks passed
@DariaKunoichi DariaKunoichi deleted the daria-PLAT-11611 branch February 20, 2024 18:30
@DariaKunoichi DariaKunoichi mentioned this pull request Feb 20, 2024
DariaKunoichi added a commit that referenced this pull request Feb 21, 2024
2.2.1 (2022-02-21)
Bug fixes: Fix middleware panic on nil *http.Request #212
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