-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow respWriterWrapper to call ResponseWriter.WriteHeader multiple t…
…imes (#3580) * Allow respWriterWrapper to call ResponseWriter.WriteHeader multiple times otelhttp respWriterWrapper no longer interrupts WriteHeader calls to underlying ResponseWriters. This allows stdlib net/http to handle and log incorrect usage of WriteHeader. * Update CHANGELOG with changes to wrapped ResponseWriter * Ensure http response wrapper retains initial status where multiple statuses are written * Test propagation of all WriteHeader calls in otelhttp * Documenting how otelhttp.Handler allows propagating WriteHeader calls We explicitly capture initial statusCode written while propagating all consecutive calls to the wrapped ResponseWriter without altering state. * Apply suggestions from code review Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update CHANGELOG.md * Move changelog entry to unreleased * Revert unrelated changes to changelog --------- Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Tyler Yahn <codingalias@gmail.com>
- Loading branch information
1 parent
f398558
commit 830138c
Showing
3 changed files
with
86 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters