You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2016/11/01 17:41:57 UTC

incubator-ponymail git commit: fix error handling - responses are not JSON!

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 4f58b0977 -> 8f3775d41


fix error handling - responses are not JSON!

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/8f3775d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/8f3775d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/8f3775d4

Branch: refs/heads/master
Commit: 8f3775d4130fc951e1053b5b45d3cab366c24bf0
Parents: 4f58b09
Author: Sebb <se...@apache.org>
Authored: Tue Nov 1 17:41:38 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Tue Nov 1 17:41:38 2016 +0000

----------------------------------------------------------------------
 site/api/mbox.lua | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/8f3775d4/site/api/mbox.lua
----------------------------------------------------------------------
diff --git a/site/api/mbox.lua b/site/api/mbox.lua
index 8a629d0..222c0a6 100644
--- a/site/api/mbox.lua
+++ b/site/api/mbox.lua
@@ -45,6 +45,7 @@ function handle(r)
         local flid = get.list:gsub("[.@]", "_")
         local month = get.date:match("(%d+%-%d+)")
         if not month then
+            r.content_type = "text/plain"
             r:puts("Wrong date format given!\n")
             return cross.OK
         end
@@ -108,6 +109,9 @@ function handle(r)
                 end
             end
         end
+    else
+        r.content_type = "text/plain"
+        r:puts("Both list and date are required!\n")
     end
     return cross.OK
 end