Skip to content

Fix WrapM pattern restore#106

Merged
tigerwill90 merged 4 commits into
masterfrom
fix/wrapm-pattern-restore
May 10, 2026
Merged

Fix WrapM pattern restore#106
tigerwill90 merged 4 commits into
masterfrom
fix/wrapm-pattern-restore

Conversation

@tigerwill90
Copy link
Copy Markdown
Collaborator

@tigerwill90 tigerwill90 commented May 10, 2026

Restore req.Pattern on the original request in WrapM (the previous code reassigned req after req.WithContext, leaving the deferred restore pointing at the discarded clone), and expose http.Flusher to std-lib middleware via a small flusherWriter shim that delegates Flush() to FlushError() so middlewares like Coraza, gzip, or any stdlib code that type-asserts http.Flusher work correctly through WrapM.

@tigerwill90 tigerwill90 requested a review from pawndev May 10, 2026 13:24
@tigerwill90 tigerwill90 self-assigned this May 10, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
context.go 80.00% 2 Missing ⚠️
response_writer.go 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@tigerwill90 tigerwill90 merged commit 7fd0db9 into master May 10, 2026
3 of 4 checks passed
@tigerwill90 tigerwill90 deleted the fix/wrapm-pattern-restore branch May 10, 2026 13:51
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