Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 301: www.archlinux.org redirects to archlinux.org #153

Open
nheir opened this issue Aug 28, 2023 · 0 comments
Open

Error 301: www.archlinux.org redirects to archlinux.org #153

nheir opened this issue Aug 28, 2023 · 0 comments

Comments

@nheir
Copy link

nheir commented Aug 28, 2023

Current redirection prevents package-query to get out-of-date info

#define ARCH_PACKAGES_URL "https://www.archlinux.org/packages/"

char *res = curl_fetch (curl, url);
if (res) {
char *f = strstr (res, OUTOFDATE_FLAG);
if (f && strncmp (f + strlen (OUTOFDATE_FLAG), "null", strlen ("null")) != 0) {
flagged = true;
}
free (res);
}

package-query/src/util.c

Lines 1137 to 1141 in 9160ff6

if (http_code != 200) {
fprintf(stderr, "The URL %s returned error : %ld\n", url, http_code);
string_free (res);
return NULL;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant