':param code: HTTP code
:param read: HTTP body text; typically a string
:param headers: HTTP headers, typically a dict or a httplib.HTTPMessage
:param geturl: URL object instance
:param original_url: URL object instance
:param msg: HTTP message
:param _id: Optional response identifier
:param time: The time between the request and the response
:param alias: Alias for the response, this contains a hash that helps
the backend sqlite find http_responses faster by indexing
by this attr.
:param charset: Response\'s encoding; obligatory when `read` is unicode'

def __init__(self, code, read, headers, geturl, original_url, msg='OK', _id=None, time=DEFAULT_WAIT_TIME, alias=None, charset=None):

    if (not isinstance(geturl, URL)):
        msg = 'Invalid    type    %s    for    HTTPResponse    ctor    param    geturl.'
        raise TypeError((msg % type(geturl)))
    if (not isinstance(original_url, URL)):
        msg = 'Invalid    type    %s    for    HTTPResponse    ctor    param    original_url.'
        raise TypeError((msg % type(original_url)))
    if (not isinstance(headers, Headers)):
        msg = 'Invalid    type    %s    for    HTTPResponse    ctor    param    headers.'
        raise TypeError((msg % type(headers)))
    if (not isinstance(read, basestring)):
        raise TypeError(('Invalid    type    %s    for    HTTPResponse    ctor    param    read.' % type(read)))
    self._charset = charset
    self._headers = None
    self._body = None
    self._raw_body = read
    self._content_type = None
    self._dom = None
    self.id = _id
    self._from_cache = False
    self._info = headers
    self.set_code(code)
    self._realurl = original_url.uri2url()
    self._uri = original_url
    self._redirected_url = geturl
    self._redirected_uri = geturl.uri2url()
    self._msg = smart_unicode(msg)
    self._time = time
    self._alias = alias
    self._doc_type = None
    self._body_lock = threading.RLock()
