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(javascript/fastify): fixed body parser. #7981

Closed
wants to merge 1 commit into from

Conversation

KostyaTretyak
Copy link
Contributor

As you can see from the benchmarks, fastify throws errors:

image

This is because POST requests are not actually parsed because there is no parser for this type:

wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"

@waghanza
Copy link
Collaborator

Thanks for this @KostyaTretyak. Glad to see anyone check the implementations health.

However, I'm in favour of changing the line you found in lua script.

I mean form encoded is not relevant here. In a server side context, data are sent in plain text of serialised in JSON, msgpack or else.

Better, remove the lua line, what do you think ?

PS : I'm thinking of changing the stress tool, maybe oha, which does not have lua support.

@KostyaTretyak
Copy link
Contributor Author

First, thank you for inviting me to join @the-benchmarker organization. But to be honest, I don't see when I will be able to devote time to it.

Regarding the replacement of the Content-Type header, I agree with you that much more often POST requests are formed in the application/json format. And in that case, really, this PR can be close.

@waghanza
Copy link
Collaborator

@KostyaTretyak this invitation is kindly to formalize your contribution, but no rate is expected.

I mean even if you have no time to devote for this, I can understand.

I however use team members to ask some questions, when I have a doubt of something, or when I want to gather various opinion.

Let me know it this is ok for you (or not).

And I'll close this PR for now

@waghanza waghanza closed this Nov 24, 2024
@KostyaTretyak
Copy link
Contributor Author

I have extensive experience with the TypeScript stack, so if there are any questions regarding it, I’m happy to help.

@waghanza
Copy link
Collaborator

typescript only or the whole javascript inclduing bun and other things ?

@KostyaTretyak
Copy link
Contributor Author

TypeScript/JavaScript stack.

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