Skip to content

h3-proxy: fix callback return values, and a typo in tests#21802

Closed
vszakats wants to merge 3 commits into
curl:masterfrom
vszakats:tidy26059
Closed

h3-proxy: fix callback return values, and a typo in tests#21802
vszakats wants to merge 3 commits into
curl:masterfrom
vszakats:tidy26059

Conversation

@vszakats

@vszakats vszakats commented May 28, 2026

Copy link
Copy Markdown
Member
  • replace literal -1 with NGHTTP3_ERR_CALLBACK_FAILURE in nghttp3
    callback.
  • replace NGHTTP3_ERR_CALLBACK_FAILURE with
    NGTCP2_ERR_CALLBACK_FAILURE in ngtcp2 callbacks.
  • test_60_h3_proxy: fix non-critical typo in symbol.

Spotted by GitHub Code Quality

Follow-up to e78b1b3 #21153

@github-actions github-actions Bot added the tests label May 28, 2026
@vszakats vszakats changed the title h3-proxy: fix various typos h3-proxy: fix callback return values, and a typo in tests May 28, 2026
@vszakats vszakats requested a review from Copilot May 28, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects error codes returned from nghttp3/ngtcp2 callbacks in the HTTP/3 proxy filter and fixes a small typo in an HTTP/3 proxy test, aligning behavior with the respective libraries’ expected callback-failure return values.

Changes:

  • Replace a literal -1 with NGHTTP3_ERR_CALLBACK_FAILURE in an nghttp3 callback.
  • Replace incorrect NGHTTP3_ERR_CALLBACK_FAILURE returns with NGTCP2_ERR_CALLBACK_FAILURE in ngtcp2 callbacks.
  • Fix a typo in the test helper invocation (nghttps_fwdnghttpx_fwd).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/cf-h3-proxy.c Uses the correct nghttp3/ngtcp2 callback failure constants for error returns.
tests/http/test_60_h3_proxy.py Fixes a typo in _require_available(...) kwargs to reference nghttpx_fwd correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@testclutch

Copy link
Copy Markdown

Analysis of PR #21802 at c10adfba:

Test ../../tests/http/test_60_h3_proxy.py::TestH3ProxyFailure::test_60_02_connect_tunnel_fail[fail_h2_over_h3_proxytunnel] failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them).

Test ../../tests/http/test_60_h3_proxy.py::TestH3ProxyFailure::test_60_02_connect_tunnel_fail[fail_h3_over_h2_proxytunnel] failed, but it has been permanently failing lately, so it's probably NOT a fault of the PR. Note that this test has failed in 4 different CI jobs (the link just goes to one of them).

Test ../../tests/http/test_60_h3_proxy.py::TestH3ProxyModeSelection::test_60_03_h3_target_auto_connect_udp[proxy_h3] failed, but it has been permanently failing lately, so it's probably NOT a fault of the PR. Note that this test has failed in 4 different CI jobs (the link just goes to one of them).

Generated by Testclutch

@vszakats vszakats closed this in c37405c May 28, 2026
@vszakats vszakats deleted the tidy26059 branch May 28, 2026 21:33
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
- replace literal -1 with `NGHTTP3_ERR_CALLBACK_FAILURE` in nghttp3
  callback.
- replace `NGHTTP3_ERR_CALLBACK_FAILURE` with
  `NGTCP2_ERR_CALLBACK_FAILURE` in ngtcp2 callbacks.
- test_60_h3_proxy: fix non-critical typo in symbol.

Spotted by GitHub Code Quality

Follow-up to e78b1b3 curl#21153

Closes curl#21802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants