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

Refactor headers #92

Merged
merged 6 commits into from
Mar 18, 2014
Merged

Refactor headers #92

merged 6 commits into from
Mar 18, 2014

Conversation

ixti
Copy link
Member

@ixti ixti commented Mar 9, 2014

No description provided.

@ixti ixti added the WIP label Mar 9, 2014
@ixti ixti added this to the v0.6 milestone Mar 11, 2014
@ixti ixti removed the WIP label Mar 18, 2014
@ixti
Copy link
Member Author

ixti commented Mar 18, 2014

Ready for review
//cc @sferik @tarcieri

@ixti
Copy link
Member Author

ixti commented Mar 18, 2014

Notice, there's a backward incompatible change. Behavior before this PR:

request[:accept] = 'text/plain'
request[:accept] = 'application/json'
request[:accept] # => ['text/plain', 'application/json']

Behavior after this PR:

request[:accept] = 'text/plain'
request[:accept] = 'application/json'
request[:accept] # => 'application/json'

In order to get same result as before this PR one would have to:

request[:accept] = ['text/plain', 'application/json']

# or

request.headers.add :accept, 'text/plain'
request.headers.add :accept, 'application/json'

@sferik sferik modified the milestone: v0.6 Mar 18, 2014
@sferik
Copy link
Contributor

sferik commented Mar 18, 2014

I’m 👍 on the new interface. = should always overwrite. The current behavior seems wrong to me.

@sferik
Copy link
Contributor

sferik commented Mar 18, 2014

Overall, this looks good. I’m 👍 to merge.

@tarcieri
Copy link
Member

+1 on the current = behavior being wrong. This is some great work, thank you! 👍 :shipit:

tarcieri added a commit that referenced this pull request Mar 18, 2014
@tarcieri tarcieri merged commit 9fa6f3f into master Mar 18, 2014
@tarcieri tarcieri deleted the feature/improve-headers branch March 18, 2014 03:23
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

3 participants