Skip to content

Strange behavior when setting cookie value to None in the method-level parameter #2716

Open
@mcpwlk

Description

@mcpwlk

After running the following code

s = requests.Session()
s.cookies.update({'from-my': 'browser'})
r = s.get('http://httpbin.org/cookies', cookies={'another': 'cookie', 'from-my': None})
print r.text

the output is

{
  "cookies": {
    "from-my; another": "cookie"
  }
}

I used Python 2.7.6 and requests 2.7.0.

For more information, please see http://stackoverflow.com/questions/31902510/strange-requests-behavior-when-setting-cookie-value-to-none-in-the-method-level

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions