Unquote the value for the cookie.  If unquoting does not work a
        :exc:`UnquoteError` is raised.

        :param value: the value to unquote.
975454
def unquote(cls, value):
        
        try:
            if cls.quote_base64:
                value = base64.b64decode(value)
            if cls.serialization_method is not None:
                value = cls.serialization_method.loads(value)
            return value
        except Exception:
            # unfortunately pickle and other serialization modules can
            # cause pretty every error here.  if we get one we catch it
            # and convert it into an UnquoteError
            raise UnquoteError()
304170
def message(self, value):
        

        if value is not None:
            assert type(value) in (unicode, QString), \
                "'{0}' attribute: '{1}' type is not 'unicode' or 'QString'!".format("message", value)
        self.__message = value
113991
def set(self, value, parse=False):
        
        self.value = self.parse(value) if parse else value
1311691
def set(self, value):
        

        if isinstance(value, str_cls):
            if self._map is None:
                raise ValueError(unwrap(
                    '''
                    %s value is a unicode string, but no _map provided
                    ''',
                    type_name(self)
                ))

            if value not in self._reverse_map:
                raise ValueError(unwrap(
                    '''
                    %s value, %s, is not present in the _map
                    ''',
                    type_name(self),
                    value
                ))

            value = self._reverse_map[value]

        elif not isinstance(value, int_types):
            raise TypeError(unwrap(
                '''
                %s value must be an integer or unicode string when a name_map
                is provided, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        self._native = self._map[value] if self._map and value in self._map else value

        self.contents = int_to_bytes(value, signed=True)
        self._header = None
        if self._trailer != b'':
            self._trailer = b''
1165664
def cookie_set(self, name, value):
		
		if not self.headers_active:
			raise RuntimeError('headers have already been ended')
		cookie = "{0}={1}; Path=/; HttpOnly".format(name, value)
		self.send_header('Set-Cookie', cookie)
511382
def _unquote_or_none(s: Optional[str]) -> Optional[bytes]:  # noqa: F811
    
    if s is None:
        return s
    return url_unescape(s, encoding=None, plus=False)
170412
def message(self, value):
        
        if value == self._defaults['message'] and 'message' in self._values:
            del self._values['message']
        else:
            self._values['message'] = value
345122
def value(self, value):
        
        try:
            struct.pack('>' + conf.TYPE_CHAR, value)
        except struct.error:
            raise IllegalDataValueError

        self._value = value
149614
def set_value(self, value):
        
        parsed_value = self._parse_value(value)
        self.value = parsed_value
457545
def quote_value(value):
    
    adapted = adapt(value)
    if hasattr(adapted, 'getquoted'):
        adapted = adapted.getquoted()
    return adapted
580690
def a(value):
    
    name = getattr(value, 'name', value)
    return some(lambda t: t == value).named(u'(a "%s")' % (name,))
732650
def svalue(self, value):
        

        if value is not None:  # if value is not None
            self._value = None
            self._error = None

        self._svalue = value
794166
def _cookie_parse_impl(b):
    """"""
    i = 0
    n = len(b)

    while i < n:
        match = _cookie_re.search(b + b";", i)
        if not match:
            break

        key = match.group("key").strip()
        value = match.group("val") or b""
        i = match.end(0)

        yield _cookie_unquote(key), _cookie_unquote(value)
476130
static protected String quote(final String value)
    {
        final StringBuilder out = new StringBuilder();
        AbstractCLA.uncompileQuoter(out, value);
        return out.toString();
    }
1170379
def _set_unicode(self, value):
        
        values = list(self.unicodes)
        if value in values:
            values.remove(value)
        values.insert(0, value)
        self.unicodes = values
91607
def version(self, value):
        
        if isinstance(value, tuple):
            value = unparse_version(value)

        self._version = value
514472
def assertNotCookie(self, name, value=None, attrs={}, *args, **kwargs):
        
        return not self.assertCookie(name, value, attrs)