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

Headers are sent in reversed order #1

Closed
madamm91 opened this issue May 12, 2020 · 1 comment
Closed

Headers are sent in reversed order #1

madamm91 opened this issue May 12, 2020 · 1 comment

Comments

@madamm91
Copy link

I'm using the 1.0.3 version of the library.

Let's see the part of ImageUpload example from README.md.

let header:[String:String] = ["Authorization":"Client-ID"]

In this case the header key is "Authorization" and the value is "Client-ID".
When the request is sent, the server gets this header in reversed order, so the key is "Client-ID" and the value is "Authorization".

In short:
value: key instead of key:value

Fix:
Gem/Gem.swift:110
Should be:
request.addValue(headerDetail.value, forHTTPHeaderField: headerDetail.key)

P.s.: Please specify CONTRIBUTING.md file to clarify the process of contribution.

@Albinzr
Copy link
Owner

Albinzr commented May 13, 2020

This issue is fixed, You can try out the version 1.0.4

@Albinzr Albinzr closed this as completed May 13, 2020
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

No branches or pull requests

2 participants