Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Superfluous response.WriteHeader call in contrib net/http #2859

Closed
nakkamarra opened this issue Sep 12, 2024 · 1 comment
Closed

[BUG] Superfluous response.WriteHeader call in contrib net/http #2859

nakkamarra opened this issue Sep 12, 2024 · 1 comment
Labels
apm:ecosystem contrib/* related feature requests or bugs bug unintended behavior that has to be fixed needs-triage New issues that have not yet been triaged

Comments

@nakkamarra
Copy link
Contributor

Version of dd-trace-go
1.66.0

Describe what happened:
In this code block the custom responseWriter type is writing a 200 OK with a call to WriteHeader, but the net/http stdlib already does this, so the subsequent call to Write afterwards will attempt to do this again causing the stdlib to complain with a message to stdout

Describe what you expected:
No error logs from the stdlib package

Steps to reproduce the issue:
Call TraceAndServe from within a server (will update with code example)

@nakkamarra nakkamarra added the bug unintended behavior that has to be fixed label Sep 12, 2024
@github-actions github-actions bot added needs-triage New issues that have not yet been triaged apm:ecosystem contrib/* related feature requests or bugs labels Sep 12, 2024
@nakkamarra
Copy link
Contributor Author

Actually, after reviewing the reproduction code I wrote, it seems to just be an issue in my original code 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs bug unintended behavior that has to be fixed needs-triage New issues that have not yet been triaged
Projects
None yet
Development

No branches or pull requests

1 participant