X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=python3%2Fashd%2Futil.py;h=3818e4b86b012f6847e2c26b45095cfc03021f1f;hb=64c8865417aedcf88ff3f6f647ee2ccf4a3522ed;hp=08945f2618fb12722a894b889d43723a8624403c;hpb=173e0e9efec5ae690cc157fe238113fcd814895e;p=ashd.git diff --git a/python3/ashd/util.py b/python3/ashd/util.py index 08945f2..3818e4b 100644 --- a/python3/ashd/util.py +++ b/python3/ashd/util.py @@ -126,7 +126,8 @@ def respond(req, body, status = ("200 OK"), ctype = "text/html"): and the `ctype' argument can be used to specify a non-HTML MIME-type. - If `body' is a Unicode object, it will be encoded as UTF-8. + If `body' is not a byte string, its string representation will be + encoded as UTF-8. For example: respond(req, "Not found", status = "404 Not Found", ctype = "text/plain")