Revert "Don't set web.ctx.status"

This reverts commit 18cf043be3.

All that flup really wants is for the strings to be of type `str'. Hy
strings are of type `unicode' by default.
This commit is contained in:
Tom Willemse 2013-08-10 23:50:07 +02:00
parent 18cf043be3
commit 6cf6009b19

View file

@ -54,6 +54,7 @@
res)) res))
(defun no-such-file [] (defun no-such-file []
(setv web.ctx.status (str "404 Not Found"))
"No such file.\n") "No such file.\n")
(defun get-file [name] (defun get-file [name]
@ -125,6 +126,7 @@
"hash" (get h 1) "hash" (get h 1)
"filename" name "filename" name
"type" (get-type (get (os.path.splitext name) 1))}) "type" (get-type (get (os.path.splitext name) 1))})
(setv web.ctx.status (str "201 Created"))
(+ web.ctx.home "/" *prefix* (get h 0) "\n")))]]) (+ web.ctx.home "/" *prefix* (get h 0) "\n")))]])
(when (= __name__ "__main__") (when (= __name__ "__main__")