summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/network.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-02-20 15:49:20 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-02-20 15:49:20 +0000
commit616e5e677e36cd6c3909a6e22fd130e467cf555c (patch)
tree774e9e7ec0c0ea2ab54da70c91c648c5d13f919d /mdk-stage1/network.c
parentd71f1b5bcbf6552d3a7531e5f843db4dd5fd2d9f (diff)
downloaddrakx-backup-do-not-use-616e5e677e36cd6c3909a6e22fd130e467cf555c.tar
drakx-backup-do-not-use-616e5e677e36cd6c3909a6e22fd130e467cf555c.tar.gz
drakx-backup-do-not-use-616e5e677e36cd6c3909a6e22fd130e467cf555c.tar.bz2
drakx-backup-do-not-use-616e5e677e36cd6c3909a6e22fd130e467cf555c.tar.xz
drakx-backup-do-not-use-616e5e677e36cd6c3909a6e22fd130e467cf555c.zip
for HTTP installs, make use of Content-Length when available, to display progressbar
Diffstat (limited to 'mdk-stage1/network.c')
-rw-r--r--mdk-stage1/network.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index 47436a940..9a07fa34a 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -761,7 +761,7 @@ enum return_type http_prepare(void)
do {
char location_full[500];
- int fd;
+ int fd, size;
results = ask_from_entries_auto("Please enter the name or IP address of the HTTP server, "
"and the directory containing the " DISTRIB_NAME " Distribution.",
@@ -774,7 +774,7 @@ enum return_type http_prepare(void)
log_message("HTTP: trying to retrieve %s", location_full);
- fd = http_download_file(answers[0], location_full);
+ fd = http_download_file(answers[0], location_full, &size);
if (fd < 0) {
log_message("HTTP: error %d", fd);
if (fd == FTPERR_FAILED_CONNECT)
@@ -784,8 +784,10 @@ enum return_type http_prepare(void)
results = RETURN_BACK;
continue;
}
+
+ log_message("HTTP: size of download %d bytes", size);
- results = load_ramdisk_fd(fd, 0);
+ results = load_ramdisk_fd(fd, size);
method_name = strdup("http");
sprintf(location_full, "http://%s/%s", answers[0], answers[1]);