Skip to content

Commit 7c09b0f

Browse files
author
root
committed
fix: glitch xhr can post
1 parent b0f10e1 commit 7c09b0f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

platform/Normal.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ function getpath()
1818

1919
function getGET()
2020
{
21+
if (!$_POST) {
22+
if (!!$HTTP_RAW_POST_DATA) {
23+
$tmpdata = $HTTP_RAW_POST_DATA;
24+
} else {
25+
$tmpdata = file_get_contents('php://input');
26+
}
27+
if (!!$tmpdata) {
28+
$postbody = explode("&", $tmpdata);
29+
foreach ($postbody as $postvalues) {
30+
$pos = strpos($postvalues,"=");
31+
$_POST[urldecode(substr($postvalues,0,$pos))]=urldecode(substr($postvalues,$pos+1));
32+
}
33+
}
34+
}
2135
if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];
2236
$p = strpos($_SERVER['REQUEST_URI'],'?');
2337
if ($p>0) {

0 commit comments

Comments
 (0)