Skip to content

feat(zend): add response header wrappers - #814

Merged
ptondereau merged 1 commit into
masterfrom
feat/zend-response-headers
Oct 10, 2026
Merged

ptondereau merged 1 commit into
masterfrom
feat/zend-response-headers

Conversation

@ptondereau

Copy link
Copy Markdown
Member

Description

Add zend::set_header, add_header, remove_header, remove_all_headers and set_response_code, safe wrappers around sapi_header_op that only fill line/line_len of a zeroed sapi_header_line and use the bindgen op constants, so the 8.5 union and the shifted SAPI_HEADER_* values need no cfg. They refuse to run outside a request (the header list only lives between sapi_activate and sapi_deactivate_module) and while a SapiGlobals guard is alive, since the engine rewrites SG(sapi_headers) under it.

Checklist

@ptondereau
ptondereau force-pushed the feat/zend-response-headers branch from 78d5cde to 705a525 Compare October 10, 2026 11:26
@coveralls

coveralls commented Oct 10, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 38048407340

Coverage increased (+0.2%) to 75.064%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (98 of 99 lines covered, 98.99%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/zend/headers.rs 99 98 98.99%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 14942
Covered Lines: 11216
Line Coverage: 75.06%
Coverage Strength: 53.03 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 10, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 51 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 51 untouched benchmarks


Comparing feat/zend-response-headers (705a525) with master (c9a40ce)

Open in CodSpeed

@ptondereau
ptondereau marked this pull request as ready for review October 10, 2026 11:54
@ptondereau
ptondereau merged commit 6fcc59b into master Oct 10, 2026
76 checks passed
@ptondereau
ptondereau deleted the feat/zend-response-headers branch October 10, 2026 11:55
@ext-php-rs-release ext-php-rs-release Bot mentioned this pull request Oct 10, 2026
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