Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Just removed that smelly code. #27

Merged
merged 1 commit into from

3 participants

@budnik

I've tesed it on a sandbox - seems like PAYPAL doesn't care about headers case. Just like RFC says it should.

@jpablobr jpablobr merged commit f21aec0 into jpablobr:master
@saizai

I'm confused. How does this change make it case insensitive?

… are we looking at the same commit?

I see one that's just 12 deleted lines, so it's not clear how this could add insensitivity.

It doesn't have the word 'downcase' in it anywhere, whereas the Ruby you quoted has key.downcase.

Owner

To me seems like ruby will downcase the key parameter sent to the []= method so it can maybe have a better chance at matching that header key... but that's my guess... :/

Owner

I don't remember :disappointed: but I think it had something to do with the way PayPal was validating headers.

Does PP think they're case sensitive? If yes, RFC or no, then they effectively are…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
12 lib/active_merchant/billing/gateways/paypal_adaptive_payments/ext.rb
@@ -28,15 +28,3 @@ def underscore_string(str)
end
end
-
-module Net
- module HTTPHeader
- def []= key, val
- unless val
- @header.delete key
- return val
- end
- @header[key] = [val]
- end
- end
-end
Something went wrong with that request. Please try again.