|
|
@ -185,14 +185,15 @@ class Content |
|
|
|
$request->getResponse() |
|
|
|
$request->getResponse() |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Process codes |
|
|
|
// Route status codes |
|
|
|
|
|
|
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-codes |
|
|
|
switch ($response->getCode()) |
|
|
|
switch ($response->getCode()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case 10: // response expected |
|
|
|
case 10: // response expected |
|
|
|
|
|
|
|
|
|
|
|
$this->page->title->setValue( |
|
|
|
$this->page->title->setValue( |
|
|
|
$address->getHost(), |
|
|
|
$address->getHost(), |
|
|
|
sprintf( |
|
|
|
$response->getMeta() ? $response->getMeta() : sprintf( |
|
|
|
'response expected (code %d)', |
|
|
|
'response expected (code %d)', |
|
|
|
intval( |
|
|
|
intval( |
|
|
|
$response->getCode() |
|
|
|
$response->getCode() |
|
|
@ -200,7 +201,9 @@ class Content |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
$this->page->response->show(); |
|
|
|
$this->page->response->show( |
|
|
|
|
|
|
|
$response->getMeta() // pass to placeholder |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|