http: terminate old connection in uclient_http_connect after incomplete request proce...
authorFelix Fietkau <nbd@openwrt.org>
Thu, 4 Sep 2014 11:19:59 +0000 (13:19 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 4 Sep 2014 11:19:59 +0000 (13:19 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient-http.c

index ff1bcc464a75f2d686a70256f24acc7f93238ba7..7c5bc63c37160212374a529432f5420b30e610c8 100644 (file)
@@ -797,6 +797,9 @@ static int uclient_http_connect(struct uclient *cl)
        struct uclient_http *uh = container_of(cl, struct uclient_http, uc);
        int ret;
 
+       if (!cl->eof || uh->disconnect)
+               uclient_http_disconnect(uh);
+
        uclient_http_init_request(uh);
 
        if (uh->us)