Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-10486 - Remove the conditional for setting query. #23604

Merged
merged 1 commit into from Dec 3, 2020
Merged

bpo-10486 - Remove the conditional for setting query. #23604

merged 1 commit into from Dec 3, 2020

Conversation

orsenthil
Copy link
Member

@orsenthil orsenthil commented Dec 1, 2020

bpo-issue10486: Remove the conditional for setting the query string.

In https://bugs.python.org/issue10486, there was a discussion about setting all the environment variables in CGI. I am not certain if we need that, I plan to recommend closing the issue without any changes, since the request is stale, and CGI specification leaves it to implementation. Two of the commenters in that issue agree

There is a minor change that is not related to the issue but was observed in the discussion.

QUERY_STRING is always set in the env

        for k in ('QUERY_STRING', 'REMOTE_HOST', 'CONTENT_LENGTH',
                  'HTTP_USER_AGENT', 'HTTP_COOKIE', 'HTTP_REFERER'):
            env.setdefault(k, "")

However, earlier in the code, it was being tested for a non-empty value. This test condition was not required. Instead of leaving that no-op test condition, I am removing it in this PR. Since this is not a bug fix, but a cosmetic improvement, I don't think we need to backport.

https://bugs.python.org/issue10486

@orsenthil orsenthil changed the title bpo-issue10486 - Remove the conditional for setting query. bpo-10486 - Remove the conditional for setting query. Dec 1, 2020
@orsenthil orsenthil merged commit 3ec9d01 into python:master Dec 3, 2020
@bedevere-bot
Copy link

@orsenthil: Please replace # with GH- in the commit message next time. Thanks!

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants