use a better error code for unsupported expect headers
authorFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 00:03:17 +0000 (01:03 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 00:03:17 +0000 (01:03 +0100)
client.c

index 8604034..4d8b17b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -228,7 +228,7 @@ static void client_parse_header(struct client *cl, char *data)
                if (!strcasecmp(val, "100-continue"))
                        cl->request.expect_cont = true;
                else {
                if (!strcasecmp(val, "100-continue"))
                        cl->request.expect_cont = true;
                else {
-                       uh_header_error(cl, 400, "Bad Request");
+                       uh_header_error(cl, 412, "Precondition Failed");
                        return;
                }
        }
                        return;
                }
        }