[-] CORE : No Exception when CONTENT_LENGTH is no set

This commit is contained in:
gRoussac
2013-11-25 16:05:07 +01:00
parent d30e376354
commit 620441997c
+9 -5
View File
@@ -248,9 +248,13 @@ class QqUploadedFileXhr
public function getSize() public function getSize()
{ {
if (isset($_SERVER['CONTENT_LENGTH'])) if (isset($_SERVER['CONTENT_LENGTH']) || isset($_SERVER['HTTP_CONTENT_LENGTH']))
return (int)$_SERVER['CONTENT_LENGTH']; {
else if (isset($_SERVER['HTTP_CONTENT_LENGTH']))
throw new Exception('Getting content length is not supported.'); return (int)$_SERVER['HTTP_CONTENT_LENGTH'];
else
return (int)$_SERVER['CONTENT_LENGTH'];
}
return false;
} }
} }