Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm copy-pasting some of my comment from #19 here.
tl;dr I believe the email RFC is one where we should not make judgements on the capitalization (or lack there of) of email headers, like
To
,From
, etc.From https://tools.ietf.org/html/rfc2821#section-2.4:
The "mailbox local-part" would be
smith
in[email protected]
; RFC281 says that[email protected]
is distinct from[email protected]
, but goes on to sayAh. RFC 822, section 3.4.7 CASE INDEPENDENCE:
I, and others, like @zeknox were thrown for a bit when we tried to use standard Ruby hash syntax for testing
griddler-mailgun
in our applications.we built hashes like this:
Because this hash does not matching the expected casing,
griddler-mailgun
was trying to operate on anil
, and not surfacing the actual problem to the user.This PR updates the
Griddler::Mailgun::Adapter
class to downcase all params and headers; it of course does not change the output of the class; just updates some of the internals.All tests still pass. I don't do OS PRs a lot, so I'm more than happy to make any modifications. If this PR is accepted, #27 should be rejected and closed, as that documentation update would now be made irrelevant.
I'm happy to squash this PR into a single commit, as well. Just let me know what would be helpful!