Skip to content

Validate headers specific to upgrade request only when response is 101. - #113

Merged
tarasko merged 9 commits into
masterfrom
custom_http_responses
Sep 11, 2026
Merged

tarasko merged 9 commits into
masterfrom
custom_http_responses

Conversation

@tarasko

@tarasko tarasko commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

No description provided.

Call listener_factory before validating upgrade specific headers
@codspeed

codspeed Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 14.07%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 2 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_bench_echo[32768] 2 s 1.7 s +14.07%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing custom_http_responses (3254076) with master (bbea420)

Open in CodSpeed

@codecov-commenter

codecov-commenter commented Sep 11, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.78%. Comparing base (bbea420) to head (3254076).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   91.00%   91.78%   +0.78%     
==========================================
  Files          18       18              
  Lines        2590     2667      +77     
  Branches      138      139       +1     
==========================================
+ Hits         2357     2448      +91     
+ Misses        190      176      -14     
  Partials       43       43              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tarasko

tarasko commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

The parser now enforces:

  • GET, non-empty target, and exactly HTTP/1.1.
  • Valid HTTP-token header names without stripping whitespace.
  • Valid field values, OWS trimming, and no obsolete folding.
  • Maximum 128 headers.
  • No Transfer-Encoding.
  • At most one Content-Length, whose value must represent zero.
  • Existing 16 KiB total header limit remains.
  • Expect remains accepted and unprocessed.

WebSocket validation has direct unit coverage for every existing branch, including accept-value calculation and non-ASCII keys.

@tarasko

tarasko commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

Closes #112

@tarasko
tarasko merged commit dc78590 into master Sep 11, 2026
33 checks passed
@tarasko
tarasko deleted the custom_http_responses branch September 11, 2026 23:45
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.

2 participants