Convert our HTTP requests from urllib2 to requests.

Review Request #2863 — Created Feb. 12, 2012 and submitted

david
Review Board
release-1.6.x
547
reviewboard
Convert our HTTP requests from urllib2 to requests.

In addition to being a downright awful API to use, urllib2 has a fundamental
flaw in that it will only send HTTP Basic Auth information if the first request
for the resource comes back with a www-authenticate header. This doesn't work
for many HTTPS mercurial repositories, and it doesn't work with some 3rd-party
providers of raw-file URLs like Codebase HQ's API.

This change converts our code to use the 'requests' module, which is downright
sexy. 'requests' will also do a much better job of trying to guess the charset
of any text we get.
Ran unit tests, tested repository connectivity to an HTTPS Mercurial repository
which required authentication.
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.6.x (f591a04) and master
Loading...