Skip to content

Normalizing parameters duplicated in URL query string and POST parameters - #197

Merged
jaitaiwan merged 2 commits into
joestump:developfrom
arthurian:fix-duplicate-post-and-url-params
Aug 15, 2016
Merged

Normalizing parameters duplicated in URL query string and POST parameters#197
jaitaiwan merged 2 commits into
joestump:developfrom
arthurian:fix-duplicate-post-and-url-params

Conversation

@arthurian

Copy link
Copy Markdown

This PR modifies the merging of POST parameters with URL query parameters in get_normalized_parameters() so that duplicate parameters (same key/value) are not duplicated in the normalized base string.

I could not find any guidance on this issue from RFC 5849. Thoughts?

Note: per @jaitaiwan's request, I've closed #195 and reopened it here so that it's compared to develop instead of master.

@arthurian arthurian changed the title Fix duplicate post and url params Normalizing parameters duplicated in URL query string and POST parameters Oct 1, 2015
@jaitaiwan

Copy link
Copy Markdown
Contributor

Thanks @arthurian :)

The issue with duplicated parameters is that it's up to the receiving server to determine how to deal with the url. We discussed a similar case in regards to arrays in urls. In which case the current implementation would end up looking like an array to some web servers, potentially breaking it.

So from my perspective this pull request is definitely needed.

How I personally think this should be implemented is similar to the way PHP populates it's $_REQUEST variable which contains variables from session, cookie, post and get. POST vars should override GET vars.

@joestump @rickhanlonii what are your thoughts?

@GuillaumeDerval

Copy link
Copy Markdown

Any news on this? Would be nice if merged :-)

@jaitaiwan

Copy link
Copy Markdown
Contributor

I've confirmed this merge and we'll see how it goes!

@nikolas

nikolas commented Nov 15, 2017

Copy link
Copy Markdown
Contributor

Can you publish a new release on pypi that includes this?

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.

4 participants