aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-08-10 23:50:07 +0200
committerGravatar Tom Willemse2013-08-10 23:50:07 +0200
commit6cf6009b199e03b67864649b9e2ea6a704094ccc (patch)
tree5772eb750d9e39b39e1c5ac9e6ccc827a13892bf
parent18cf043be3175a0098dad1e24266c10b7f21922c (diff)
downloadhypo-6cf6009b199e03b67864649b9e2ea6a704094ccc.tar.gz
hypo-6cf6009b199e03b67864649b9e2ea6a704094ccc.zip
Revert "Don't set web.ctx.status"
This reverts commit 18cf043be3175a0098dad1e24266c10b7f21922c. All that flup really wants is for the strings to be of type `str'. Hy strings are of type `unicode' by default.
-rwxr-xr-xhypo.hy2
1 files changed, 2 insertions, 0 deletions
diff --git a/hypo.hy b/hypo.hy
index 9f3a7b0..b055869 100755
--- a/hypo.hy
+++ b/hypo.hy
@@ -54,6 +54,7 @@
res))
(defun no-such-file []
+ (setv web.ctx.status (str "404 Not Found"))
"No such file.\n")
(defun get-file [name]
@@ -125,6 +126,7 @@
"hash" (get h 1)
"filename" name
"type" (get-type (get (os.path.splitext name) 1))})
+ (setv web.ctx.status (str "201 Created"))
(+ web.ctx.home "/" *prefix* (get h 0) "\n")))]])
(when (= __name__ "__main__")