add handling of BadStatusLine from httplib because urllib2 doesn't clean up after itself :/