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

A mechanism for adding non-ASCII headers #4296

Merged
merged 3 commits into from
Sep 29, 2018

Conversation

amirlivneh
Copy link
Collaborator

As suggested in #4283 (comment).

Copy link
Collaborator

@yschimke yschimke left a comment

Choose a reason for hiding this comment

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

LGTM

@swankjesse
Copy link
Member

It's my preference that we only expose this via the builder, named addUnsafeNonAscii(). For this we should still require that header names pass strict validation.

@swankjesse swankjesse merged commit 0ebaef2 into square:master Sep 29, 2018
@swankjesse
Copy link
Member

Thanks!

@sxci
Copy link

sxci commented Dec 11, 2018

https://github.com/square/okhttp/blob/parent-3.12.0/okhttp/src/main/java/okhttp3/MultipartBody.java#L259
it looks like doesnot allow utf8 headers, Header.of check strict validation.

monkey-mas added a commit to monkey-mas/okhttp that referenced this pull request Jan 27, 2019
Use addUnsafeNonAscii(...) that was previously added to Headers.Builder[1].

[1] square#4296
monkey-mas added a commit to monkey-mas/okhttp that referenced this pull request Jan 27, 2019
Use addUnsafeNonAscii(...) that was previously added to Headers.Builder[1].

[1] square#4296
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.

None yet

4 participants