Return read-only copy

		:return: WHTTPCookieJar
516810
def ro(self):
		
		ro_jar = WHTTPCookieJar()
		for cookie in self.__cookies.values():
			ro_jar.add_cookie(cookie.ro())
		ro_jar.__ro_flag = True
		return ro_jar
484799
def copy_session(session: requests.Session) -> requests.Session:
    """"""
    new = requests.Session()
    new.cookies = requests.utils.cookiejar_from_dict(requests.utils.dict_from_cookiejar(session.cookies))
    new.headers = session.headers.copy()
    return new
428188
def from_headers (strheader):
    
    res = []
    fp = StringIO(strheader)
    headers = httplib.HTTPMessage(fp, seekable=True)
    if "Host" not in headers:
        raise ValueError("Required header 'Host:' missing")
    host = headers["Host"]
    path= headers.get("Path", "/")
    for header in headers.getallmatchingheaders("Set-Cookie"):
        headervalue = header.split(':', 1)[1]
        for pairs in cookielib.split_header_words([headervalue]):
            for name, value in pairs:
                cookie = requests.cookies.create_cookie(name, value,
                    domain=host, path=path)
                res.append(cookie)
    return res
769533
async def copy(self, key_source, storage_dest, key_dest):
        
        from aioworkers.storage.filesystem import FileSystemStorage
        if not isinstance(storage_dest, FileSystemStorage):
            return super().copy(key_source, storage_dest, key_dest)
        url = self.raw_key(key_source)
        logger = self.context.logger
        async with self._semaphore:
            async with self.session.get(url) as response:
                if response.status == 404:
                    return
                elif response.status >= 400:
                    if logger.getEffectiveLevel() == logging.DEBUG:
                        logger.debug(
                            'HttpStorage request to %s '
                            'returned code %s:\n%s' % (
                                url, response.status,
                                (await response.read()).decode()))
                    return
                async with storage_dest.raw_key(key_dest).open('wb') as f:
                    async for chunk in response.content.iter_any():
                        await f.write(chunk)
                    return True
805508
def copy(self):
        
        return self.__class__(self.tag, self.data.copy(), self.context.copy())
3153
def raw_cookies(self):
        ''''''
        cookie_data = self.environ.get('HTTP_COOKIE', '')
        cookies = SimpleCookie()
        if not cookie_data:
            return cookies
        cookies.load(cookie_data)
        return cookies
385472
def copy(self, key=None):
        
        other = self.__class__(
            self.__iter__(),
            self.maxlen,
            redis=self.redis,
            key=key,
            writeback=self.writeback,
        )

        return other
399589
def wsgiheader(self):
        '''  '''
        for c in list(self.COOKIES.values()):
            if c.OutputString() not in self.headers.getall('Set-Cookie'):
                self.headers.append('Set-Cookie', c.OutputString())
        return list(self.headers.iterallitems())
906408
def copy(self):
        """"""
        return self.__class__(self._key, self._load, self._iteritems())
738959
def copy(self, target, timeout=500):
        """"""

        if self.metadata and 'encoding' in self.metadata:
            with io.open(target,'w', encoding=self.metadata['encoding']) as f:
                for line in self:
                    f.write(line)
        else:
            with io.open(target,'wb') as f:
                for line in self:
                    if sys.version < '3' and isinstance(line,unicode): #pylint: disable=undefined-variable
                        f.write(line.encode('utf-8'))
                    elif sys.version >= '3' and isinstance(line,str):
                        f.write(line.encode('utf-8'))
                    else:
                        f.write(line)
1085975
def clone(self):
        
        result = AsyncBox(maxsize=self._maxsize, loop=self.loop)
        result._queue = self._queue
        result._can_read = self._can_read
        result._can_write = self._can_write

        return result
379119
def py_to_go_cookie(py_cookie):
    ''''''
    # TODO (perhaps):
    #   HttpOnly
    #   Creation
    #   LastAccess
    #   Updated
    # not done properly: CanonicalHost.
    go_cookie = {
        'Name': py_cookie.name,
        'Value': py_cookie.value,
        'Domain': py_cookie.domain,
        'HostOnly': not py_cookie.domain_specified,
        'Persistent': not py_cookie.discard,
        'Secure': py_cookie.secure,
        'CanonicalHost': py_cookie.domain,
    }
    if py_cookie.path_specified:
        go_cookie['Path'] = py_cookie.path
    if py_cookie.expires is not None:
        unix_time = datetime.datetime.fromtimestamp(py_cookie.expires)
        # Note: fromtimestamp bizarrely produces a time without
        # a time zone, so we need to use accept_naive.
        go_cookie['Expires'] = pyrfc3339.generate(unix_time, accept_naive=True)
    return go_cookie
1244558
def copy(self):
        
        out = type(self)(
            name=self.__name,
            field=self.__field,
            display=self.__display,
            flags=self.__flags,
            default=self.__default,
            defaultOrder=self.__defaultOrder,
            getter=self.__gettermethod,
            setter=self.__settermethod,
            queryFilter=self.__query_filter,
            shortcut=self.__shortcut,
            readPermit=self.__readPermit,
            writePermit=self.__writePermit,
            order=self.__order
        )

        return out
203057
def copy(self):
        
        cls = self.__class__
        result = cls.__new__(cls)
        result._default_plugins = dict(self._default_plugins)  # pylint:disable=protected-access
        return result
784569
def copy(self):
        ""
        other = _ChainedHashAlgorithm(self._algorithms)
        other._hobj = deepcopy(self._hobj)
        other._fobj = deepcopy(self._fobj)
        return other
446440
def copy(self, cls=None):
        '''  '''
        cls = cls or BaseResponse
        assert issubclass(cls, BaseResponse)
        copy = cls()
        copy.status = self.status
        copy._headers = dict((k, v[:]) for (k, v) in self._headers.items())
        if self._cookies:
            copy._cookies = SimpleCookie()
            copy._cookies.load(self._cookies.output(header=''))
        return copy
1043313
def wsgiheader(self):
        '''  '''
        for c in self.COOKIES.values():
            if c.OutputString() not in self.headers.getall('Set-Cookie'):
                self.headers.append('Set-Cookie', c.OutputString())
        # rfc2616 section 10.2.3, 10.3.5
        if self.status in (204, 304) and 'content-type' in self.headers:
            del self.headers['content-type']
        if self.status == 304:
            for h in ('allow', 'content-encoding', 'content-language',
                      'content-length', 'content-md5', 'content-range',
                      'content-type', 'last-modified'): # + c-location, expires?
                if h in self.headers:
                     del self.headers[h]
        return list(self.headers.iterallitems())