-
Notifications
You must be signed in to change notification settings - Fork 381
http headers Content-Type problems #15
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
Comments
<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl |
This comment was originally written by [email protected] I think the problem is in base_request.dart: BaseRequest(this.method, this.url) This map is not case-insensitive, it should be. A few lines higher, I've found the following comment: // TODO(nweiz): make this a HttpHeaders object I tried to figure out if I could make a patch, but I encountered two problems:
|
<img src="https://avatars.githubusercontent.com/u/22043?v=3" align="left" width="48" height="48"hspace="10"> Comment by skabet I'm re-assigning, as this is the http package, and not dart:io directly. Thanks for filing this! |
This comment was originally written by [email protected] Created a patch: https://codereview.chromium.org/198423002 |
<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3 |
Originally opened as dart-lang/sdk#17405
This issue was originally filed by [email protected]
A Content-Type header is ignored when sending http.post.
If I call http.post with a header "Content-Type", the server doesn't get the value specified if there is also a body. Instead, it always gets "text/plain; charset=utf-8".
If I change the header key to "content-type", everything works as expected.
There are several issues here.
This side-effect is documented, however it explicitly mentions "Content-Type". And so does Requests
ContentType get \_contentType
.I've attached two source files to demonstrate the problem.
Attachments:
httpheadersserver.dart (288 Bytes)
httpheadersclient.dart (243 Bytes)
pubspec.yaml (91 Bytes)
The text was updated successfully, but these errors were encountered: