Skip to content

Ignore charset encoding in header #269

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

Closed
wants to merge 6 commits into from

Conversation

jefioliveira
Copy link

I need to ignore the charset in the header.

Issue #15
issue #225

Remove charset from "Content-Type" header

Now the null value will be reflected for the charset in the header.
Remove charset from "Content-Type" header

Now the null value will be reflected for the charset in the header.
Remove charset from "Content-Type" header

Now the null value will be reflected for the charset in the header.
Remove charset from "Content-Type" header

Now the null value will be reflected for the charset in the header.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@jefioliveira
Copy link
Author

I signed it!

Copy link
Member

@natebosch natebosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jonasfj

I'm not sure if this is breaking or not...

request.bodyFields = body.cast<String, String>();
} else {
throw new ArgumentError('Invalid request body "$body".');
if(encoding != null) request.encoding = encoding; else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to run dartfmt and the body of the if needs to be wrapped in {}.

Remove charset from "Content-Type" header

Now the null value will be reflected for the charset in the header.
# Conflicts:
#	lib/src/request.dart
@natebosch natebosch requested a review from jonasfj May 17, 2019 15:04
@jonasfj jonasfj requested review from a user and removed request for jonasfj May 21, 2019 12:49
@ghost
Copy link

ghost commented Jun 12, 2019

The PR description isn't very descriptive. Can you please edit it to say what this is and why we (all Dart HTTP users) need it?
The two referenced issues seem unrelated?

Have you considered how this will work with Request.encoding?

@ghost
Copy link

ghost commented Jun 12, 2019

Ah, reviewing #184 I think I see that this PR is trying to address that issue specifically?

Parts of this change is a bit misleading since this doesn't really have anything to do with encoding, but is about whether we latch the charset on in Content-Type.
The way I see the problem is that there isn't really a mechanism for controlling the charset directly through the API, and it's automatically latch on where it really should be fully user controlled.
From skimming this, it doesn't really seem like an elegant solution to do that, so I think we might need to put some more thought into how we go about this.

Another aside is that something like this definitely needs tests.
We want to make sure we don't silently break clients who rely on the quirk of charset being set.

@mit-mit
Copy link
Member

mit-mit commented Jan 16, 2020

Closing as CLA wasn't signed

@mit-mit mit-mit closed this Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants