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

Force h3 to send the correct content-type for JSON #324

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

mcollina
Copy link
Member

I was investigating why h3 came out faster than Fastify in our benchmark, and I noticed an oddity: it had lower throughput but higher req/s. However, our benchmark is set up to have identical headers and bodies.

It turns out that it's cheating on the content type and shaving some bytes which causes problems with Chinese characters.

This PR forces it to be identical again.

@mcollina mcollina merged commit 31bbeef into master Jan 16, 2024
14 checks passed
@mcollina mcollina deleted the level-playing-field branch January 16, 2024 14:08
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