The code was checking uh->uc.seq for changes to detect redirects, but
only uh->seq is actually incremented (in uclient_http_init_request and
uclient_http_reset_state). This meant the redirect detection check was
always comparing against an unchanging value.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void uclient_http_headers_complete(struct uclient_http *uh)
{
enum auth_type auth_type = uh->auth_type;
- int seq = uh->uc.seq;
+ unsigned int seq = uh->seq;
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->eof || seq != uh->uc.seq)
+ if (uh->eof || seq != uh->seq)
return;
if (uh->req_type == REQ_HEAD || uh->uc.status_code == 204 ||
bool data_eof;
int error_code;
int status_code;
- int seq;
struct blob_attr *meta;
struct uloop_timeout connection_timeout;