Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/httparty/cookie_hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def add_cookies(value)
end

def to_cookie_string
delete_if { |k, v| CLIENT_COOKIES.include?(k.to_s) }.collect { |k, v| "#{k}=#{v}" }.join("; ")
delete_if { |k, v| CLIENT_COOKIES.include?(k.to_s.downcase) }.collect { |k, v| "#{k}=#{v}" }.join("; ")
end
end
6 changes: 6 additions & 0 deletions spec/httparty/cookie_hash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,11 @@
@s = @cookie_hash.to_cookie_string
@s.should_not match(/path=\//)
end

it "should not include client side only cookies even when attributes use camal case" do
@cookie_hash.add_cookies(:Path => "/")
@s = @cookie_hash.to_cookie_string
@s.should_not match(/Path=\//)
end
end
end