Return a string suitable for HTTP.
(self, attrs=None, header="Set-Cookie:", sep="\015\012")
| 500 | self.__set(key, rval, cval) |
| 501 | |
| 502 | def output(self, attrs=None, header="Set-Cookie:", sep="\015\012"): |
| 503 | """Return a string suitable for HTTP.""" |
| 504 | result = [] |
| 505 | items = sorted(self.items()) |
| 506 | for key, value in items: |
| 507 | value_output = value.output(attrs, header) |
| 508 | if _has_control_character(value_output): |
| 509 | raise CookieError("Control characters are not allowed in cookies") |
| 510 | result.append(value_output) |
| 511 | return sep.join(result) |
| 512 | |
| 513 | __str__ = output |
| 514 |
nothing calls this directly
no test coverage detected