* Added header('Status:...') calls so that some CGI installations
of apache emit proper headers (garvinhicking)
This commit is contained in:
parent
26f4a0edef
commit
30160420a8
@ -3,6 +3,9 @@
|
||||
Version 1.4 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Added header('Status:...') calls so that some CGI installations
|
||||
of apache emit proper headers (garvinhicking)
|
||||
|
||||
* Add a "Configure this plugin" link to the frontend output for
|
||||
every sidebar plugin, not only HTML nuggets. (garvinhicking)
|
||||
|
||||
|
1
exit.php
1
exit.php
@ -27,6 +27,7 @@ if (isset($_GET['url_id']) && !empty($_GET['url_id']) && isset($_GET['entry_id']
|
||||
|
||||
if (serendipity_isResponseClean($url)) {
|
||||
header('HTTP/1.0 301 Moved Permanently');
|
||||
header('Status: 301 Moved Permanently');
|
||||
header('Location: ' . $url);
|
||||
}
|
||||
exit;
|
||||
|
@ -54,6 +54,7 @@ if ($serendipity['smarty_raw_mode']) {
|
||||
$serendipity['smarty']->assign('head_subtitle', $serendipity['head_subtitle']);
|
||||
$serendipity['view'] = '404';
|
||||
serendipity_header('HTTP/1.0 404 Not found');
|
||||
serendipity_header('Status: 404 Not found');
|
||||
}
|
||||
|
||||
serendipity_printEntries($entry, 1);
|
||||
|
@ -849,7 +849,7 @@ class serendipity_plugin_api
|
||||
ob_end_clean();
|
||||
|
||||
if ($loggedin) {
|
||||
$content .= '<div class="serendipity_edit_nugget"><a href="' . $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($plugin->instance) . '">' . ADMIN . ': ' . EDIT . '</a></div>';
|
||||
$content .= '<div class="serendipity_edit_nugget"><a href="' . $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($plugin->instance) . '">' . EDIT . '</a></div>';
|
||||
}
|
||||
|
||||
if ($show_plugin !== false) {
|
||||
|
@ -18,6 +18,7 @@ if ($global_debug) {
|
||||
// We need to set this to return a 200 since we use .htaccess ErrorDocument
|
||||
// rules to handle archives.
|
||||
header('HTTP/1.0 200');
|
||||
header('Status: 200 OK');
|
||||
|
||||
// Session are needed to also remember an autologin user on the frontend
|
||||
ob_start();
|
||||
@ -306,6 +307,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
} else {
|
||||
$serendipity['view'] = '404';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
}
|
||||
|
||||
ob_start();
|
||||
@ -447,6 +449,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
if (!is_array($cInfo)) {
|
||||
$serendipity['view'] = '404';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
} else {
|
||||
$serendipity['head_title'] = $cInfo['category_name'];
|
||||
$serendipity['head_subtitle'] = $serendipity['blogTitle'];
|
||||
@ -492,6 +495,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
if (!is_array($uInfo)) {
|
||||
$serendipity['view'] = '404';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
} else {
|
||||
$serendipity['head_title'] = sprintf(ENTRIES_BY, $uInfo[0]['realname']);
|
||||
$serendipity['head_subtitle'] = $serendipity['blogTitle'];
|
||||
@ -604,6 +608,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
} else {
|
||||
$serendipity['view'] = '404';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
|
||||
// printf('<div class="serendipity_msg_important">' . DOCUMENT_NOT_FOUND . '</div>', $uri);
|
||||
}
|
||||
|
1
rss.php
1
rss.php
@ -74,6 +74,7 @@ if (!isset($_GET['nocache'])) {
|
||||
(!$none_match && $modified_since == $last_modified) ||
|
||||
(!$modified_since && $none_match == $last_modified)) {
|
||||
header('HTTP/1.0 304 Not Modified');
|
||||
header('Status: 304 Not Modified');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -287,6 +287,7 @@ if (IS_installed === true) {
|
||||
if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
header("WWW-Authenticate: Basic realm=\"Feed Login\"");
|
||||
header("HTTP/1.0 401 Unauthorized");
|
||||
header("Status: 401 Unauthorized");
|
||||
exit;
|
||||
} else {
|
||||
if (!isset($serendipity['POST']['user'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user