From 3ac60598246cda6947a5ced173784c3ee25622c3 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Mon, 2 Jan 2017 15:32:12 +0100 Subject: Fixed redirect URL, added more mvn repos --- src/loadArtifact.php | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/loadArtifact.php (limited to 'src/loadArtifact.php') diff --git a/src/loadArtifact.php b/src/loadArtifact.php deleted file mode 100644 index 6205164..0000000 --- a/src/loadArtifact.php +++ /dev/null @@ -1,34 +0,0 @@ -"; -if (!is_dir($localFolder)) { - mkdir($localFolder, 0770, true); -} - -$srcUrl = $mvnBaseUrl.$requestedArtifact; -//echo $srcUrl."
"; -$src = fopen($srcUrl, 'r'); - -$dstPath = $baseLocalFolder.$requestedArtifact; -//echo $dstPath; -$dst = fopen($dstPath, 'w'); - -$filesize = stream_copy_to_stream($src, $dst); - -if (0 == $filesize) { - unlink($dstPath); - unlink($localFolder); -} - -if (is_file($dstPath)) { - chmod($dstPath, 0660); - header('Location: http://'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]); -} else { - header('HTTP/1.0 404 Not Found'); -} -?> -- cgit v1.2.3