kennethreitz/requests — pull request #516 by EnTeQuAk (2012-03-27 13:44:06+00:00)
Title: Move pre_request to a more usable place, followup to #382

Having the hook called so late makes it impossible to overwrite the HTTP request
calling behavior and set self.sent to True in case of possible cache matches
for example.

This way we can interfere before we waste any CPU time to calculate
a request.

As a side note I am not sure if this whole process should be splitted into two parts: pre_prepare_request and pre_request so that one hook really can interfere before we calculate anything and the other can use the certificate and gathered authentication information to make it's decisions... not sure