'Given an :class:`httplib.HTTPResponse` instance ``r``, return a
corresponding :class:`urllib3.response.HTTPResponse` object.
Remaining parameters are passed to the HTTPResponse constructor, along
with ``original_response=r``.'

@classmethod
def from_httplib(ResponseCls, r, **response_kw):

    headers = {}
    for (k, v) in r.getheaders():
        k = k.lower()
        has_value = headers.get(k)
        if has_value:
            v = ',    '.join([has_value, v])
        headers[k] = v
    strict = getattr(r, 'strict', 0)
    return ResponseCls(body=r, headers=headers, status=r.status, version=r.version, reason=r.reason, strict=strict, original_response=r, **response_kw)
