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

Get should be GET #127

Open
lastmjs opened this issue Jan 25, 2024 · 0 comments
Open

Get should be GET #127

lastmjs opened this issue Jan 25, 2024 · 0 comments

Comments

@lastmjs
Copy link

lastmjs commented Jan 25, 2024

I've been integrating Express in our environment and using wasmedge-quickjs. This enum is problematic: https://github.com/second-state/wasmedge-quickjs/blob/main/src/internal_module/httpx/core/mod.rs#L12

It seems that when this enum is turned into a JsValue that the properties are converted into strings as they are, so Get remains Get. This breaks the Express.js serve static middleware, as (IIRC) there is a conditional in there that looks at the method property of the request and compares it to GET. But unfortunately because of this enum the property is Get.

I believe that the request method should always have uppercase methods when converting from Rust to JS, at least that is how I have solved the problem in my work of wasmedge-quickjs.

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

No branches or pull requests

1 participant