properly terminate POST requests
authorFelix Fietkau <nbd@openwrt.org>
Sat, 29 Mar 2014 19:17:46 +0000 (20:17 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 29 Mar 2014 19:17:46 +0000 (20:17 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient-http.c

index 1ab1f46..2005f0c 100644 (file)
@@ -850,6 +850,8 @@ uclient_http_request_done(struct uclient *cl)
                return -1;
 
        uclient_http_send_headers(uh);
                return -1;
 
        uclient_http_send_headers(uh);
+       if (uh->req_type == REQ_POST)
+               ustream_printf(uh->us, "0\r\n\r\n");
        uh->state = HTTP_STATE_REQUEST_DONE;
 
        return 0;
        uh->state = HTTP_STATE_REQUEST_DONE;
 
        return 0;