Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: Moved default status strings from call[fs]cgi to library.
[ashd.git]
/
python3
/
ashd
/
util.py
diff --git
a/python3/ashd/util.py
b/python3/ashd/util.py
index
08945f2
..
3818e4b
100644
(file)
--- 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.
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")
For example:
respond(req, "Not found", status = "404 Not Found", ctype = "text/plain")