Handle downcased params - #28
Open
josh-works wants to merge 5 commits into
Open
Conversation
houndci-bot
reviewed
Jun 28, 2019
josh-works
force-pushed
the
handle_downcased_params
branch
from
June 28, 2019 02:02
045d257 to
f623e4b
Compare
josh-works
force-pushed
the
handle_downcased_params
branch
from
June 28, 2019 02:03
f623e4b to
eea3bc0
Compare
josh-works
marked this pull request as ready for review
June 28, 2019 02:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
smithinsmith@company.com; RFC281 says thatsmith@email.comis distinct fromSmith@email.com, 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-mailgunin our applications.we built hashes like this:
Because this hash does not matching the expected casing,
griddler-mailgunwas trying to operate on anil, and not surfacing the actual problem to the user.This PR updates the
Griddler::Mailgun::Adapterclass 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!