Skip to content

Commit

Permalink
add X-LitCal-Startime and -Endtime headers
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Mar 25, 2024
1 parent 3631907 commit 870dd95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions includes/LitCalAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -2852,7 +2852,9 @@ private function generateResponse() {

$this->endTime = hrtime(true);
$executionTime = $this->endTime - $this->startTime;
header('X-LitCal-ExecutionTime: ' . $executionTime);
header('X-LitCal-Starttime: ' . $this->startTime);
header('X-LitCal-Endtime: ' . $this->endTime);
header('X-LitCal-Executiontime: ' . $executionTime);

header("Etag: \"{$responseHash}\"");
if (!empty( $_SERVER['HTTP_IF_NONE_MATCH'] ) && $_SERVER['HTTP_IF_NONE_MATCH'] === $responseHash) {
Expand Down Expand Up @@ -2932,7 +2934,9 @@ public function Init(){

$this->endTime = hrtime(true);
$executionTime = $this->endTime - $this->startTime;
header('X-LitCal-ExecutionTime: ' . $executionTime);
header('X-LitCal-Starttime: ' . $this->startTime);
header('X-LitCal-Endtime: ' . $this->endTime);
header('X-LitCal-Executiontime: ' . $executionTime);

header("Etag: \"{$responseHash}\"");
if (!empty( $_SERVER['HTTP_IF_NONE_MATCH'] ) && $_SERVER['HTTP_IF_NONE_MATCH'] === $responseHash) {
Expand Down

0 comments on commit 870dd95

Please sign in to comment.