According to RFC2616 10.2.5 and 10.3.5, 204 and 304 responses MUST NOT contain any
message body, therfore do not emit an EOF chunk for such responses.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
if (cl->request.method == UH_HTTP_MSG_HEAD || cl->request.method == UH_HTTP_MSG_OPTIONS)
return false;
+ /* RFC2616 10.2.5, 10.3.5 */
+ if (cl->http_code == 204 || cl->http_code == 304)
+ return false;
+
return true;
}