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

Fixed issue with duplicated Http Headers #84

Merged
merged 1 commit into from
Sep 18, 2014
Merged

Fixed issue with duplicated Http Headers #84

merged 1 commit into from
Sep 18, 2014

Conversation

rickykaare
Copy link

When a header was having multiple values, the iOS solution was to pick the last, and the Android solution was to create multiple headers.

I believe the correct behavior is to separate each value with a comma.

Example:

In the current implementation I was getting 400 - Bad Request responses because of the headers being sent from my Android device looked like this:

User-Agent: Android/4.1.1
User-Agent: Music.Droid.Msh/1.0.0.0
User-Agent: Rev/local
User-Agent: E247.Api.Client/0.1.0.157
User-Agent: (Google Nexus 4 - 4.1.1 - API 16 - 768x1280 vbox86p)
Accept-Language: en-US
Accept-Encoding: gzip
Accept-Encoding: deflate

With the suggested changes the headers would render like this:

User-Agent: Android/4.1.1,Music.Droid.Msh/1.0.0.0,Rev/local,E247.Api.Client/0.1.0.157,(Google Nexus 4 - 4.1.1 - API 16 - 768x1280 vbox86p)
Accept-Language: en-US
Accept-Encoding: gzip,deflate

@anaisbetts
Copy link
Owner

Thanks!

anaisbetts pushed a commit that referenced this pull request Sep 18, 2014
Fixed issue with duplicated Http Headers
@anaisbetts anaisbetts merged commit fab22e1 into anaisbetts:master Sep 18, 2014
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