mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Bugfix: set content-length header correctly
This commit is contained in:
parent
19c5679461
commit
3b43493bcd
3 changed files with 5 additions and 5 deletions
|
@ -3287,7 +3287,7 @@ register_module([
|
||||||
file_put_contents($paths->recentchanges, "[]");
|
file_put_contents($paths->recentchanges, "[]");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} ?action=recentchanges[&format={code}] Get a list of recent changes
|
* @api {get} ?action=recent-changes[&format={code}] Get a list of recent changes
|
||||||
* @apiName RecentChanges
|
* @apiName RecentChanges
|
||||||
* @apiGroup Stats
|
* @apiGroup Stats
|
||||||
* @apiPermission Anonymous
|
* @apiPermission Anonymous
|
||||||
|
@ -3328,7 +3328,7 @@ register_module([
|
||||||
case "json":
|
case "json":
|
||||||
$result = json_encode($recent_changes);
|
$result = json_encode($recent_changes);
|
||||||
header("content-type: application/json");
|
header("content-type: application/json");
|
||||||
header("content-length: $result");
|
header("content-length: " . strlen($result));
|
||||||
exit($result);
|
exit($result);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds recent changes. Access through the 'recent-changes' action.",
|
"description": "Adds recent changes. Access through the 'recent-changes' action.",
|
||||||
"id": "feature-recent-changes",
|
"id": "feature-recent-changes",
|
||||||
"lastupdate": 1523987868,
|
"lastupdate": 1523988221,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ register_module([
|
||||||
file_put_contents($paths->recentchanges, "[]");
|
file_put_contents($paths->recentchanges, "[]");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} ?action=recentchanges[&format={code}] Get a list of recent changes
|
* @api {get} ?action=recent-changes[&format={code}] Get a list of recent changes
|
||||||
* @apiName RecentChanges
|
* @apiName RecentChanges
|
||||||
* @apiGroup Stats
|
* @apiGroup Stats
|
||||||
* @apiPermission Anonymous
|
* @apiPermission Anonymous
|
||||||
|
@ -56,7 +56,7 @@ register_module([
|
||||||
case "json":
|
case "json":
|
||||||
$result = json_encode($recent_changes);
|
$result = json_encode($recent_changes);
|
||||||
header("content-type: application/json");
|
header("content-type: application/json");
|
||||||
header("content-length: $result");
|
header("content-length: " . strlen($result));
|
||||||
exit($result);
|
exit($result);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue