Skip to content

Commit b7974a4

Browse files
committed
update css for 404 pages to not look like we are in 1995 and have a consistent layout across browsers
highlight the ressource that is 404 in the error message use lowercase HEX values in CSS
1 parent 30588d8 commit b7974a4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sapi/cli/php_cli_server.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static php_cli_server_http_reponse_status_code_pair status_map[] = {
246246

247247
static php_cli_server_http_reponse_status_code_pair template_map[] = {
248248
{ 400, "<h1>%s</h1><p>Your browser sent a request that this server could not understand.</p>" },
249-
{ 404, "<h1>%s</h1><p>The requested resource %s was not found on this server.</p>" },
249+
{ 404, "<h1>%s</h1><p>The requested resource <code class=\"url\">%s</code> was not found on this server.</p>" },
250250
{ 500, "<h1>%s</h1><p>The server is temporarily unavailable.</p>" },
251251
{ 501, "<h1>%s</h1><p>Request method not supported.</p>" }
252252
};
@@ -283,8 +283,10 @@ ZEND_DECLARE_MODULE_GLOBALS(cli_server);
283283
* copied from ext/standard/info.c
284284
*/
285285
static const char php_cli_server_css[] = "<style>\n" \
286-
"body { background-color: #ffffff; color: #000000; }\n" \
287-
"h1 { font-family: sans-serif; font-size: 150%; background-color: #9999cc; font-weight: bold; color: #000000; margin-top: 0;}\n" \
286+
"body { background-color: #fcfcfc; color: #333333; margin: 0; padding:0; }\n" \
287+
"h1 { font-size: 1.5em; font-weight: normal; background-color: #9999cc; min-height:2em; line-height:2em; border-bottom: 1px inset black; margin: 0; }\n" \
288+
"h1, p { padding-left: 10px; }\n" \
289+
"code.url { background-color: #eeeeee; font-family:monospace; padding:0 2px;}\n" \
288290
"</style>\n";
289291
/* }}} */
290292

0 commit comments

Comments
 (0)