Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Apr 12, 2024
1 parent e709e7f commit b3045ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ static void *guppy_download(const Selector *sel, URL *url, char **mime, Parser *
status = do_guppy_download(url, s, mime, ask);
/* stop on success, on error or when the redirect limit is exhausted */
if (status > 5) break;
} while (status == 1 || ((status == 3 && ++redirs < 5 && url->proto->download != guppy_download)));
} while (status == 1 || ((status == 3 && ++redirs < 5 && url->proto->download == guppy_download)));

if (redirs < 5 && url->proto->download != guppy_download) return url->proto->download(sel, url, mime, parser, redirs, ask);
if (redirs < 5 && url->proto->download != guppy_download) { guppy_close(s); return url->proto->download(sel, url, mime, parser, redirs, ask); }

if (status > 6 && strncmp(*mime, "text/gemini", 11) == 0) *parser = parse_gemtext_line;
else if (status > 6 && strncmp(*mime, "text/plain", 10) == 0) *parser = parse_plaintext_line;
Expand Down

0 comments on commit b3045ae

Please sign in to comment.