In general, it should be the case that value_encode() and value_decode() are inverses on the range of value_decode.
|[attrs[, header[, sep]]])|
'\r\n'(CRLF). Changed in version 2.5: The default separator has been changed from
'\n'to match the cookie specification.
The meaning for attrs is the same as in output().
HTTP_COOKIEand add the values found there as Morsels. If it is a dictionary, it is equivalent to:
for k, v in rawdata.items(): cookie[k] = v
See About this document... for information on suggesting changes.