uclient-http: fix HTTP authentication after deferred header processing
authorFelix Fietkau <nbd@nbd.name>
Fri, 13 Feb 2026 07:30:42 +0000 (07:30 +0000)
committerFelix Fietkau <nbd@nbd.name>
Fri, 13 Feb 2026 07:30:42 +0000 (07:30 +0000)
commit63413daa876066484a4ee62803aa943f3f19348c
tree3f1b992ebc28d8163775762165af7d22cf9cd6bd
parent931bbfeb2c92ecaa8ca2262b9bef27df8614ffb9
uclient-http: fix HTTP authentication after deferred header processing

Move uclient_http_process_headers() into the deferred callback so that
auth_type is captured before it gets updated. The previous refactor in
commit 80c9bd29c233 ("uclient-http: fix hang on HTTP to HTTPS redirect")
moved the auth_type snapshot after uclient_http_process_headers() had
already changed it from AUTH_TYPE_UNKNOWN, causing the 401 retry path
to never trigger.

Fixes: https://github.com/openwrt/uclient/issues/14
Signed-off-by: Felix Fietkau <nbd@nbd.name>
uclient-http.c