flaptor/indextank-py — pull request #9 by clamprecht (2011-12-27 21:01:47+00:00)
Title: Fixing HTTP requests to not include "http://..." in GET request

The indextank python client is sending its HTTP GET requests with the full URL, instead of just the path & query part. For example, calling list_indexes() would send this HTTP request:

```code
GET http://aeou.api.indextank.com/v1/indexes HTTP/1.1
[HTTP headers here...]
```

Instead of just:

```code
GET /v1/indexes HTTP/1.1
```

This patch fixes this by passing empty string for the scheme and netloc parameters to urlunsplit. The current code seems to work with the production indextank server, maybe because nginx is handling the extraneous "http://..." part. But when testing the REST API locally with django "runserver" mode, it was just causing 404s for every request.