do not send an error on a full buffer for post data
authorFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 02:33:24 +0000 (03:33 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 02:33:24 +0000 (03:33 +0100)
client.c

index 408a813..28c8f76 100644 (file)
--- a/client.c
+++ b/client.c
@@ -360,7 +360,8 @@ static void client_read_cb(struct client *cl)
                        break;
 
                if (!read_cbs[cl->state](cl, str, len)) {
                        break;
 
                if (!read_cbs[cl->state](cl, str, len)) {
-                       if (len == us->r.buffer_len)
+                       if (len == us->r.buffer_len &&
+                           cl->state != CLIENT_STATE_DATA)
                                uh_header_error(cl, 413, "Request Entity Too Large");
                        break;
                }
                                uh_header_error(cl, 413, "Request Entity Too Large");
                        break;
                }