Closed mikeseese closed 4 months ago
It's the opposite - getParameter(name) is brand new, getParameter(index) is old as rock. But the whole file was taken from here https://github.com/SaltyAom/bun-http-framework-benchmark
Ah I see; how would you like to proceed as this library doesn't use the same implementation as Bun's (and there's inconsistency between this example and Router.js
)? The failing tests seem to be unrelated to this change (primarily compiler errors in Http3Context.h
).
I'm confused but I see the problem.
The JS wrapper does not expose the new getParameter(name) only the old getParameter(integer). The Benchmarker.js still happens to work because the integer value of "id" happens to be 0 as it fails to be an integer so it still gets the correct parameter.
What Bun has to do with this, I have no idea. The issue is that uWS.js needs to wrap the new overload that takes string.
This PR updates the
Benchmarker.js
to use the most recent signature forHTTPRequest::getParameter
, which accepts the index of the parameter instead of the name. TheRouter.js
example already has the appropriate change, but this example is outdated.