X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=python3%2Fashd%2Futil.py;h=3818e4b86b012f6847e2c26b45095cfc03021f1f;hp=08945f2618fb12722a894b889d43723a8624403c;hb=1f3d7aa314fa55a238be0940a1cd244e4671fc7d;hpb=c8301b0b38cae03a08ff8d11f0055f2353e86a41 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")