Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/dload.h
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-01-15 21:10:04 -0500
committerAllan McRae <allan@archlinux.org>2013-01-17 22:32:54 +1000
commit132e1ac10c7fef54372f4d8119b6cc3e82d2c957 (patch)
treedb6c37a76fd44e2ee37ee4f31ece45e073e2e2cd /lib/libalpm/dload.h
parentc628d649f6568fc2627c685add09fc4024e87e4b (diff)
dload: avoid showing progress bars on some redirects
RFC 2616 doesn't forbid a 301 or 302 repsonse from having a body, and servers exist in the wild that show this behavior. In order to prevent pacman from showing a progress bar when we aren't actually downloading a package (and merely following one of these pain in the butt redirects), capture the server response code in the response header, rather than waiting to peel it off the handle after the download has finished. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Reported-by: Alexandre Filgueira <alexfilgueira@cinnarch.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/dload.h')
-rw-r--r--lib/libalpm/dload.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h
index ca172006..70e34791 100644
--- a/lib/libalpm/dload.h
+++ b/lib/libalpm/dload.h
@@ -42,6 +42,7 @@ struct dload_payload {
#ifdef HAVE_LIBCURL
CURLcode curlerr; /* last error produced by curl */
#endif
+ long respcode;
};
void _alpm_dload_payload_reset(struct dload_payload *payload);