-
Notifications
You must be signed in to change notification settings - Fork 367
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 a bug where cronet_http sends incorrect HTTP request methods #1058
Conversation
|
||
test('custom method', () async { | ||
await client.send(Request( | ||
'CUSTOM', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we test case-sensitive method too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that IOClient would not pass that test because it always uppercases the request method:
https://github.com/dart-lang/sdk/blob/0b10bfcde99def6c43d4a306c920ba1ba855d058/sdk/lib/_http/http_impl.dart#L2791
This seems like a bug according to RFC-7232: https://www.rfc-editor.org/rfc/rfc7231#section-4.1
I will add a case-insensitive test and then a flag to disable it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh well, another bug, good spot. 👍
@brianquinlan Could you also publish a new version of |
package:cronet_http
was always sending the "GET" HTTP request method, even for methods likeclient.post
CronetClient
didn't setup proper method for requests #1053Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.