1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-22 13:45:02 +00:00

Bugfix: set content-length header correctly

This commit is contained in:
Starbeamrainbowlabs 2018-04-17 19:04:26 +01:00
parent 19c5679461
commit 3b43493bcd
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 5 additions and 5 deletions

View file

@ -3287,7 +3287,7 @@ register_module([
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
* @apiGroup Stats
* @apiPermission Anonymous
@ -3328,7 +3328,7 @@ register_module([
case "json":
$result = json_encode($recent_changes);
header("content-type: application/json");
header("content-length: $result");
header("content-length: " . strlen($result));
exit($result);
break;
}

View file

@ -86,7 +86,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds recent changes. Access through the 'recent-changes' action.",
"id": "feature-recent-changes",
"lastupdate": 1523987868,
"lastupdate": 1523988221,
"optional": false
},
{

View file

@ -15,7 +15,7 @@ register_module([
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
* @apiGroup Stats
* @apiPermission Anonymous
@ -56,7 +56,7 @@ register_module([
case "json":
$result = json_encode($recent_changes);
header("content-type: application/json");
header("content-length: $result");
header("content-length: " . strlen($result));
exit($result);
break;
}