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

Fix not need character is append in Basic Auth Header #334

Merged
merged 1 commit into from Nov 17, 2017

Conversation

soh335
Copy link
Contributor

@soh335 soh335 commented Nov 15, 2017

it is typo ?

@@ -26,7 +26,7 @@ def initialize(app, *args)
# @api private
def call(env)
if @auth
env[:request_headers].merge!('Authorization' => "Basic #{@auth}\"")
env[:request_headers].merge!('Authorization' => "Basic #{@auth}")

Choose a reason for hiding this comment

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

Use env[:request_headers]['Authorization'] = "Basic #{@auth}" instead of env[:request_headers].merge!('Authorization' => "Basic #{@auth}").
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@coveralls
Copy link

coveralls commented Nov 15, 2017

Coverage Status

Coverage decreased (-0.02%) to 95.402% when pulling 0a26a4a on soh335:fix/basic_auth into c45b748 on piotrmurach:master.

@piotrmurach piotrmurach merged commit c7fec0f into piotrmurach:master Nov 17, 2017
@piotrmurach
Copy link
Owner

Thanks! ❤️ Of course this is a strange character to have there 😄

@piotrmurach
Copy link
Owner

Released v0.18.2 with your patch!

@soh335
Copy link
Contributor Author

soh335 commented Nov 20, 2017

thanks 👍

@soh335 soh335 deleted the fix/basic_auth branch November 20, 2017 02:52
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