Certain response types (notably 204 and 304) require a slightly different
handling like emitting the response body entirely, therfore record the last
code to act on it in the appropriate places.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
const char *enc = "Transfer-Encoding: chunked\r\n";
const char *conn;
+ cl->http_code = code;
+
if (!uh_use_chunked(cl))
enc = "";
enum client_state state;
bool tls;
+ int http_code;
struct http_request request;
struct uh_addr srv_addr, peer_addr;