client: fix incorrectly emitting HTTP 413 for certain content lengths
[project/uhttpd.git] / client.c
index 06336eb39046a18da75981a46e248793ed22d3a9..c037cc79874855999fb849c03e064a7f6a99072b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -532,7 +532,8 @@ void uh_client_read_cb(struct client *cl)
 
                if (!read_cbs[cl->state](cl, str, len)) {
                        if (len == us->r.buffer_len &&
-                           cl->state != CLIENT_STATE_DATA)
+                           cl->state != CLIENT_STATE_DATA &&
+                           cl->state != CLIENT_STATE_DONE)
                                uh_header_error(cl, 413, "Request Entity Too Large");
                        break;
                }