summaryrefslogtreecommitdiff
path: root/inc/httputils.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/httputils.php')
-rw-r--r--inc/httputils.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/inc/httputils.php b/inc/httputils.php
index 0ad97a9a1..4ba287eb5 100644
--- a/inc/httputils.php
+++ b/inc/httputils.php
@@ -15,7 +15,7 @@ define('HTTP_CHUNK_SIZE',16*1024);
*
* @author Simon Willison <swillison@gmail.com>
* @link http://simonwillison.net/2003/Apr/23/conditionalGet/
- * @param timestamp $timestamp lastmodified time of the cache file
+ * @param int $timestamp lastmodified time of the cache file
* @returns void or exits with previously header() commands executed
*/
function http_conditionalRequest($timestamp){
@@ -249,3 +249,11 @@ function http_cached_finish($file, $content) {
print $content;
}
}
+
+function http_get_raw_post_data() {
+ static $postData = null;
+ if ($postData === null) {
+ $postData = file_get_contents('php://input');
+ }
+ return $postData;
+}