summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-26 08:35:20 +0200
committerErich Eckner <git@eckner.net>2020-06-26 08:35:20 +0200
commit9df336691c741d120cd5d1a551bdb52f2ddfc325 (patch)
tree7dd7910e5f1777438cc923e272c453626801cdac
parent045444dee303d60e74edd8efa28ebc0fbd7907d1 (diff)
downloadsourceMirror-9df336691c741d120cd5d1a551bdb52f2ddfc325.tar.xz
only give size if file is already downloaded
-rw-r--r--mirror.php8
1 files changed, 0 insertions, 8 deletions
diff --git a/mirror.php b/mirror.php
index 0cc2836..5a0daf2 100644
--- a/mirror.php
+++ b/mirror.php
@@ -74,14 +74,6 @@
}
}
if (! file_exists($pfad)) {
- $size = shell_exec(
- "curl -ILs -A 'Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' '".$quelle."' " .
- "| sed '" .
- "s/^Content-Length: //;t;d" .
- "'"
- );
- if (! empty($size))
- header('Content-Length: ' . $size);
passthru(
"mkdir -p '".dirname($pfad)."'; ".
"( ".