Index: http.c =================================================================== RCS file: /home/ncvs/src/lib/libfetch/http.c,v retrieving revision 1.78.2.5 diff -u -r1.78.2.5 http.c --- http.c 27 Jan 2010 14:54:48 -0000 1.78.2.5 +++ http.c 1 Jul 2010 13:45:06 -0000 @@ -1786,12 +1786,14 @@ case hdr_www_authenticate: if (conn->err != HTTP_NEED_AUTH) break; - http_parse_authenticate(p, &server_challenges); + if (http_parse_authenticate(p, &server_challenges)) + ++n; break; case hdr_proxy_authenticate: if (conn->err != HTTP_NEED_PROXY_AUTH) break; - http_parse_authenticate(p, &proxy_challenges); + if (http_parse_authenticate(p, &proxy_challenges) == 0); + ++n; break; case hdr_end: /* fall through */