shazow/urllib3 — pull request #31 by jandre (2012-01-19 18:32:36+00:00)
Title: issue with PoolManager.request() method

hey,

there's two issues i noticed today: when i do a POST like this (using the example from your github wiki):

import urllib3 # (Version 1.0)

http = urllib3.PoolManager()

params = ...

r = http.request('POST', 'http://localhost:1111/my/post/uri' , params)

print r.status, r.data

The POST directive in the request headers does not remove the host url, e.g. it will do:

POST http://localhost:1111/my/post/uri

instead of

POST /my/post/uri

Additionally, I noticed if i do an PoolManager.request('GET', 'http://blahblah.com', 80) after creating it tries to go into a loop retrying when I don't specify the port # in the URL. that's because it sets self.port = 80 in is_host_same() even when get_host returns "None".

Let me know if I am using the API wrong, or you have problems reproducing this, or there any other issues.