1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Test server tweak

This commit is contained in:
J. King 2017-12-07 17:27:42 -05:00
parent 3adfe8742f
commit 9f4095f00d
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,4 @@
<?php return [ <?php return [
'code' => 200, 'code' => 200,
'content' => "I'm up!", 'content' => getmypid(),
]; ];

View file

@ -58,7 +58,7 @@ if (!file_exists($test)) {
// set the response code // set the response code
http_response_code((int) $response['code']); http_response_code((int) $response['code']);
// if the response has a body, set the content type and (possibly) the ETag. // if the response has a body, set the content type and (possibly) the ETag.
if (strlen($response['content'])) { if (strlen((string) $response['content'])) {
header("Content-Type: ".$response['mime']); header("Content-Type: ".$response['mime']);
if ($response['cache']) { if ($response['cache']) {
header('ETag: "'.md5($response['content']).'"'); header('ETag: "'.md5($response['content']).'"');