mod_http_upload_external/share.php
changeset 2976 67d6510c5f49
parent 2337 f86478a02b25
child 2981 7036e82f83f5
--- a/mod_http_upload_external/share.php	Fri Mar 30 13:41:56 2018 +0200
+++ b/mod_http_upload_external/share.php	Fri Mar 30 21:00:15 2018 +0200
@@ -70,9 +70,7 @@
 $request_method = $_SERVER['REQUEST_METHOD'];
 
 if(array_key_exists('v', $_GET) === TRUE && $request_method === 'PUT') {
-	$headers = getallheaders();
-
-	$upload_file_size = $headers['Content-Length'];
+	$upload_file_size = $_SERVER['HTTP_CONTENT_LENGTH'];
 	$upload_token = $_GET['v'];
 
 	$calculated_token = hash_hmac('sha256', "$upload_file_name $upload_file_size", $CONFIG_SECRET);