mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Don't incorrectly report a protocol error when we get a 302 and redirects
are disabled.
This commit is contained in:
parent
d4c3159a33
commit
cf5af79cac
1 changed files with 5 additions and 2 deletions
|
|
@ -522,7 +522,9 @@ fetchGetHTTP(struct url *URL, char *flags)
|
|||
if (e != (URL->offset ? HTTP_PARTIAL : HTTP_OK)
|
||||
&& (e != HTTP_MOVED || noredirect)) {
|
||||
_http_seterr(e);
|
||||
goto fouch;
|
||||
free(c);
|
||||
fclose(f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* browse through header */
|
||||
|
|
@ -633,7 +635,8 @@ fetchStatHTTP(struct url *URL, struct url_stat *us, char *flags)
|
|||
e = _http_request(f, "HEAD", URL, flags);
|
||||
if (e != HTTP_OK && (e != HTTP_MOVED || noredirect)) {
|
||||
_http_seterr(e);
|
||||
goto ouch;
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue