kennethreitz/requests — Issue #467: url is quoted twice before finally sending the request
Author: Reorx
Created: 2012-03-02 06:27:05+00:00
State: open

well this is my code:

```Python
import logging
logging.getLogger().setLevel(logging.DEBUG)
import requests
logging.info('requests version: %s' % requests.__version__)

requests.get('http://www.google.com/hello@gmail.com')
```

and this is the output I got from terminal after running the code

> INFO:root:requests version: 0.10.1
> INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): www.baidu.com
> DEBUG:requests.packages.urllib3.connectionpool:"GET /omg%2540requests.com HTTP/1.1" 302 222
> INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (2): www.baidu.com
> DEBUG:requests.packages.urllib3.connectionpool:"GET /search/error.html HTTP/1.1" 200 1262

Look at the third line of results, what do you see?

/omg%2540requests.com

OMG, path of the url was quoted twice! (omg@requests.com -> omg%40requests.com -> omg%2540requests.com)

Although the request I made was just a sample and has no actual meaning, but this is a very serious BUG, I tried this url with Chrome, curl and wget, everyone of them works fine.

It's very curious that the newest version 0.10.6 doesn't have this problem, but I still want to grumble a little about it :\, cause requests, my favourite python request module, almost made me crazy this afternoon