Signed-off-by: Felix Fietkau <nbd@openwrt.org>
static void uclient_http_init_request(struct uclient_http *uh)
{
static void uclient_http_init_request(struct uclient_http *uh)
{
uclient_http_reset_state(uh);
blob_buf_init(&uh->meta, 0);
}
uclient_http_reset_state(uh);
blob_buf_init(&uh->meta, 0);
}
static void uclient_http_headers_complete(struct uclient_http *uh)
{
enum auth_type auth_type = uh->auth_type;
static void uclient_http_headers_complete(struct uclient_http *uh)
{
enum auth_type auth_type = uh->auth_type;
uh->state = HTTP_STATE_RECV_DATA;
uh->uc.meta = uh->meta.head;
uh->state = HTTP_STATE_RECV_DATA;
uh->uc.meta = uh->meta.head;
if (uh->uc.cb->header_done)
uh->uc.cb->header_done(&uh->uc);
if (uh->uc.cb->header_done)
uh->uc.cb->header_done(&uh->uc);
+ if (uh->eof || seq != uh->uc.seq)
return;
if (uh->req_type == REQ_HEAD || uh->uc.status_code == 204) {
return;
if (uh->req_type == REQ_HEAD || uh->uc.status_code == 204) {
bool data_eof;
int error_code;
int status_code;
bool data_eof;
int error_code;
int status_code;
struct blob_attr *meta;
struct uloop_timeout connection_timeout;
struct blob_attr *meta;
struct uloop_timeout connection_timeout;