From 132e1ac10c7fef54372f4d8119b6cc3e82d2c957 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 15 Jan 2013 21:10:04 -0500 Subject: 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 Reported-by: Alexandre Filgueira Signed-off-by: Allan McRae --- lib/libalpm/dload.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libalpm/dload.h') 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); -- cgit v1.2.3-24-g4f1b