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: endless matching loop #199

Merged
merged 1 commit into from
Jun 28, 2024
Merged

fix: endless matching loop #199

merged 1 commit into from
Jun 28, 2024

Commits on Jun 6, 2024

  1. fix: endless matching loop

    This happens for example with the proxy_protocol matcher and handler. If we receive a proxy proto header from a not allowed source the matcher matches, but the handler does not consume any of the prefetched bytes. Since the handler is not terminal we jump back to the beginning of the matching loop and match the same matcher/handler combo again. It never stops because we never call cx.prefetch again. Since `isFirstPrefetch = false` is unreachable in this situation (the statement is at the wrong place). It always must be set false after the first iteration.
    This bug was caused by the fix for #194
    ydylla committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    c154283 View commit details
    Browse the repository at this point in the history