initnull/tachyon — pull request #7 by hubertperron (2012-03-07 04:05:29+00:00)
Title: Clearing request headers on each url fetch

This pull request address an initialization problem with the add_headers dictionary. The add_headers is a mutable variables and is not cleared on each call which leaves unwanted headers from previous calls still active.

http://effbot.org/zone/default-values.htm

How to reproduce:

1. call fetch_url with limit_len = true.
2. "Range" key is added.
3. call fetch_url with limit_len = false.
4. "Range" key should be removed but it is still defined from the previous call.

This leftover "Range" header modified the response code of some request on my test target which broke the Robots plugin and the SVN plugin as it was receiving a 203 http response code instead of a 200.