chiark / gitweb /
mason/pastebin/%show: Don't flush FS buffers in `filter' child.
[odin-cgi] / mason / pastebin / dhandler
index 85b7ef31c1bbef9739aed6be9a39a0f1308fbbba..42c91283658dac4313354172c308c13e39d11662 100644 (file)
@@ -1,3 +1,27 @@
+%# -*-html-*-
+%#
+%# Pastebin creation webservice for Odin
+%#
+%# (c) 2015 Mark Wooding
+%#
+%#----- Licensing notice ----------------------------------------------------
+%#
+%# This file is part of the `odin.gg' service, `odin-cgi'.
+%#
+%# `odin-cgi' is free software; you can redistribute it and/or modify
+%# it under the terms of the GNU Affero General Public License as
+%# published by the Free Software Foundation; either version 3 of the
+%# License, or (at your option) any later version.
+%#
+%# `odin-cgi' is distributed in the hope that it will be useful,
+%# but WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%# GNU Affero General Public License for more details.
+%#
+%# You should have received a copy of the GNU Affero General Public
+%# License along with `odin-cgi'; if not, see
+%# <http://www.gnu.org/licenses/>.
+%#
 <%perl>
        my $tag = $m->dhandler_arg;
 
@@ -76,8 +100,17 @@ tag &lsquo;<% $tag %>&rsquo; not found
 </%args>
 </%def>
 %#
+<%def .badpaste>
+<&| SELF:error, status => 400 &>\
+invalid paste content
+</&>
+<%args>
+       $tag
+</%args>
+</%def>
+%#
 <%def .badhash>
-<&| SELF:error, status => 404 &>\
+<&| SELF:error, status => 403 &>\
 incorrect edit key
 </&>
 <%args>