summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2010-01-30 02:11:40 -0500
committersostler <sbostler@gmail.com>2010-01-30 02:11:40 -0500
commit1dcfbf2578d41c5442c21f3f58170049bb2e6f1a (patch)
tree8116136944c6a46258e5ee49b4e0963974bb6dd9 /src
parent65f06c8d8593881f10d767dd0610ca6f63569f56 (diff)
Changed submission URIs from GET to POST
Diffstat (limited to 'src')
-rwxr-xr-xsrc/site.clj15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/site.clj b/src/site.clj
index 15ac373..c0a6ab4 100755
--- a/src/site.clj
+++ b/src/site.clj
@@ -525,16 +525,13 @@
(GET "/u/:nick/:offset" (profile session
(params :nick)
(params :offset)))
- (GET "/update-profile" (update-profile session params))
(GET "/login" (login session params))
(GET "/logout" (logout session))
(GET "/register" (serve-static "static" "register.html"))
- (GET "/submit-registration" (register session params))
(GET "/:room/chat" (no-cache (validated-chat session (-> request :route-params :room))))
(GET "/chat" (no-cache (validated-chat session "RoomA")))
(GET "/browser" (browser session))
(GET "/refresh" (validated-refresh session params))
- (GET "/msg" (validated-msg session params))
(GET "/log" (validated-log session "RoomA" "0" params))
(GET "/:room/log" (validated-log session
(-> request :route-params :room)
@@ -543,16 +540,20 @@
(-> request :route-params :room)
(-> request :route-params :offset)
params))
+ ;; TODO: validate POST Referrer headers for POSTs
+ (POST "/msg" (validated-msg session params))
+ (POST "/submit-registration" (register session params))
+ (POST "/update-profile" (update-profile session params))
(ANY "*" (unknown-page params)))
-(decorate pichat
- (with-mimetypes)
- (with-session {:type :memory, :expires (* 60 60)}))
-; All uploading-related actions use the with-multipart decoration.
(defroutes multipart
(POST "/upload" (upload session params)))
+(decorate pichat
+ (with-mimetypes)
+ (with-session {:type :memory, :expires (* 60 60)}))
+
(decorate multipart
(with-mimetypes)
(with-session {:type :memory, :expires (* 60 60)})