Return a string suitable for HTTP.
(self, attrs=None, header="Set-Cookie:", sep="\015\012")
| 516 | self.__set(key, rval, cval) |
| 517 | |
| 518 | def output(self, attrs=None, header="Set-Cookie:", sep="\015\012"): |
| 519 | """Return a string suitable for HTTP.""" |
| 520 | result = [] |
| 521 | items = sorted(self.items()) |
| 522 | for key, value in items: |
| 523 | value_output = value.output(attrs, header) |
| 524 | if _has_control_character(value_output): |
| 525 | raise CookieError("Control characters are not allowed in cookies") |
| 526 | result.append(value_output) |
| 527 | return sep.join(result) |
| 528 | |
| 529 | __str__ = output |
| 530 |
nothing calls this directly
no test coverage detected