Commit d6d956b9 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Do not prefix successfulresponse with "Error: "

It's confusing

PUBLISHED_FROM=9158ccd920dabf92963e76aa96a988753b9c427d
parent 383b2a48
...@@ -36,8 +36,9 @@ static void s3_handler(struct mg_connection *nc, int ev, void *ev_data) { ...@@ -36,8 +36,9 @@ static void s3_handler(struct mg_connection *nc, int ev, void *ev_data) {
switch (ev) { switch (ev) {
case MG_EV_HTTP_REPLY: case MG_EV_HTTP_REPLY:
if (nc2 != NULL) { if (nc2 != NULL) {
mg_printf_http_chunk(nc2, "Error: %.*s", (int) hm->message.len, mg_printf_http_chunk(nc2, "%s%.*s",
hm->message.p); (hm->resp_code == 200 ? "" : "Error: "),
(int) hm->message.len, hm->message.p);
mg_send_http_chunk(nc2, "", 0); mg_send_http_chunk(nc2, "", 0);
} }
unlink_conns(nc); unlink_conns(nc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment