Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2212
Modified Files:
index.php NEWS serendipity_functions_installer.inc.php
Log Message:
Better auto-detection for installation to check for availibility of the
ErrorDocument directive within apache. Previously we only checked for a
200 header, but it was possible that per-host 404-redirection already emits
a customized HTTP/200 document.
Now our index.php uses an X-Blog header which the installation script checks
for.
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -d -r1.248 -r1.249
--- NEWS 2 Nov 2004 16:00:32 -0000 1.248
+++ NEWS 3 Nov 2004 10:00:16 -0000 1.249
@@ -3,6 +3,9 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Better detection if Apache ErrorDocument can be used
+ (garvinhicking)
+
* Fixed PostgreSQL index key names (names are now unique, and
combined indizes on the entries text-columns are no longer set)
(jtate, garvinhicking)
Index: serendipity_functions_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions_installer.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- serendipity_functions_installer.inc.php 30 Aug 2004 09:29:23 -0000 1.35
+++ serendipity_functions_installer.inc.php 3 Nov 2004 10:00:16 -0000 1.36
@@ -297,7 +297,7 @@
fclose($sock);
}
- if (preg_match('@^HTTP/\d\.\d 200@', $response)) {
+ if (preg_match('@^HTTP/\d\.\d 200@', $response) && preg_match('@X\-Blog: Serendipity@', $response)) {
$serendipity['rewrite_default'] = 'errordocs';
} else {
$serendipity['rewrite_default'] = 'none';
Index: index.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/index.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- index.php 16 Oct 2004 09:09:46 -0000 1.52
+++ index.php 3 Nov 2004 10:00:16 -0000 1.53
@@ -3,6 +3,7 @@
// We need to set this to return a 200 since we use .htaccess ErrorDocument
// rules to handle archives.
header('HTTP/1.0 200\r\n');
+header('X-Blog: Serendipity'); // Used for installer detection
// Session and serendipity_login() are needed to also remember an autologin
// user on the frontend
|