1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

[http] Redirect also for 308. Refs #343

This commit is contained in:
Witold Filipczyk 2024-12-08 12:42:27 +01:00
parent 4e0c7fd9d3
commit 00009e3ca4
2 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ static const struct http_code http_code[] = {
{ 305, "Use Proxy" },
{ 306, "(Unused)" },
{ 307, "Temporary Redirect" },
{ 308, "Permanent Redirect" },
{ 400, "Bad Request" },
{ 401, "Unauthorized" },
{ 402, "Payment Required" },

View File

@ -1693,7 +1693,7 @@ again:
/* XXX: Is there some reason why NOT to follow the Location header
* for any status? If the server didn't mean it, it wouldn't send
* it, after all...? --pasky */
if (h == 201 || h == 301 || h == 302 || h == 303 || h == 307) {
if (h == 201 || h == 301 || h == 302 || h == 303 || h == 307 || h == 308) {
d = parse_header(conn->cached->head, "Location", NULL);
if (d) {
int use_get_method = (h == 303);