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 the bug that fillRequestOptions() does not respect method option #73

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

Leo-768
Copy link
Contributor

@Leo-768 Leo-768 commented Jun 8, 2024

It may cause 414 (URI Too Long) error for massQuery().

@siddharthvp
Copy link
Owner

I don't think there's a bug. getMethod()'s return value is overwritten by the provided requestOptions in fillRequestOptions().

@Leo-768
Copy link
Contributor Author

Leo-768 commented Jun 8, 2024

The variable "method" itself won't be overwritten, so the program will call handleGet() instead of handlePost(). That's the reason why the 414 (URI Too Long) error may happen.

mwn/src/core.ts

Lines 92 to 96 in 5975811

if (method === 'get') {
this.handleGet();
} else {
await this.handlePost();
}

@siddharthvp
Copy link
Owner

Indeed, thanks for catching this!

@siddharthvp siddharthvp merged commit 9f94374 into siddharthvp:master Jun 16, 2024
14 checks passed
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