(self, state)
| 372 | } |
| 373 | |
| 374 | def __setstate__(self, state): |
| 375 | key = state['key'] |
| 376 | value = state['value'] |
| 377 | coded_value = state['coded_value'] |
| 378 | if _has_control_character(key, value, coded_value): |
| 379 | raise CookieError("Control characters are not allowed in cookies " |
| 380 | f"{key!r} {value!r} {coded_value!r}") |
| 381 | self._key = key |
| 382 | self._value = value |
| 383 | self._coded_value = coded_value |
| 384 | |
| 385 | def output(self, attrs=None, header="Set-Cookie:"): |
| 386 | return "%s %s" % (header, self.OutputString(attrs)) |