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

fix: set headers before calling WriteHeader #729

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

bradydean
Copy link
Contributor

While WriteHeader correctly infers the Content-Type as HTML in the example, the correct way to use ResponseWriter is to set the response headers first, then call WriteHeader.

@a-h a-h merged commit 27fc6a3 into a-h:main May 6, 2024
@a-h
Copy link
Owner

a-h commented May 6, 2024

Thanks for the contribution! 😁

@bradydean bradydean deleted the echo-example branch May 12, 2024 02:23
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