summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-07 18:58:15 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-07 18:58:15 +0400
commitc5d7fdf9cf4cfd6ab7037d787ebc50af33036733 (patch)
tree19128d48f2ba7333e38f39e0158e58fdcaca0175
parent908ed0e5ede59e608b742a3abd028bcfc2c2abd0 (diff)
downloadrspamd-c5d7fdf9cf4cfd6ab7037d787ebc50af33036733.tar.gz
rspamd-c5d7fdf9cf4cfd6ab7037d787ebc50af33036733.zip
Fix for fineuploader.
-rw-r--r--src/webui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/webui.c b/src/webui.c
index 6104002bb..f675c57e8 100644
--- a/src/webui.c
+++ b/src/webui.c
@@ -785,7 +785,7 @@ http_handle_history (struct evhttp_request *req, gpointer arg)
* request: /learnspam
* headers: Password
* input: plaintext data
- * reply: plaintext reply
+ * reply: json {"success":true} or {"error":"error message"}
*/
static void
http_handle_learn_spam (struct evhttp_request *req, gpointer arg)
@@ -803,7 +803,7 @@ http_handle_learn_spam (struct evhttp_request *req, gpointer arg)
/* XXX: Add real learning here */
- evbuffer_add (evb, "OK" CRLF, 5);
+ evbuffer_add_printf (evb, "{\"success\":true}" CRLF);
evhttp_add_header (req->output_headers, "Connection", "close");
http_calculate_content_length (evb, req);
@@ -816,7 +816,7 @@ http_handle_learn_spam (struct evhttp_request *req, gpointer arg)
* request: /learnham
* headers: Password
* input: plaintext data
- * reply: plaintext reply
+ * reply: json {"success":true} or {"error":"error message"}
*/
static void
http_handle_learn_ham (struct evhttp_request *req, gpointer arg)
@@ -834,7 +834,7 @@ http_handle_learn_ham (struct evhttp_request *req, gpointer arg)
/* XXX: Add real learning here */
- evbuffer_add (evb, "OK" CRLF, 5);
+ evbuffer_add_printf (evb, "{\"success\":true}" CRLF);
evhttp_add_header (req->output_headers, "Connection", "close");
http_calculate_content_length (evb, req);