eshad / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

Transform _normalize_headers into a method of Http class #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm trying to create a subclass of httplib2.Http that allows a calculated
header in request (eg. request signature).

To make this possible I'm sending some callable objects instead of strings
into the header dictionary and calling this objects in an overrided
_conn_request() method.

But there is a problem with this strategy: the _normalize_headers functions
breaks (it's possible to call the re.sub() method using a callable object
instead of regular expression string).

So, to enable the possibility of overriding this function I'm submitting a
patch that add a _normalize_headers() method inside httplib2.Http class
(that calls the module function) and call this method inside .request().

Original issue reported on code.google.com by osantana on 2 Sep 2009 at 5:50

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, it's not a defect. It's a improvement. (I can't change the issue type)

Original comment by osantana on 2 Sep 2009 at 5:52

GoogleCodeExporter commented 9 years ago
Fixed in 1367adf877

Original comment by joe.gregorio@gmail.com on 26 Dec 2009 at 4:39