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:
parent
19c5679461
commit
3b43493bcd
3 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue