mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Ensure RSCDS version is always reported in the server headers.
This commit is contained in:
parent
3019312acd
commit
7d78b939c3
@ -80,12 +80,13 @@ $c->code_version = 0;
|
|||||||
$c->version_string = '0.8.0+1'; // The actual version # is replaced into that during the build /release process
|
$c->version_string = '0.8.0+1'; // The actual version # is replaced into that during the build /release process
|
||||||
if ( isset($c->version_string) && preg_match( '/(\d+)\.(\d+)\.(\d+)(.*)/', $c->version_string, $matches) ) {
|
if ( isset($c->version_string) && preg_match( '/(\d+)\.(\d+)\.(\d+)(.*)/', $c->version_string, $matches) ) {
|
||||||
$c->code_major = $matches[1];
|
$c->code_major = $matches[1];
|
||||||
$c->code_minor = $matches[1];
|
$c->code_minor = $matches[2];
|
||||||
$c->code_patch = $matches[1];
|
$c->code_patch = $matches[3];
|
||||||
$c->code_version = (($c->code_major * 1000) + $c->code_minor).".".$c->code_patch;
|
$c->code_version = (($c->code_major * 1000) + $c->code_minor).".".intval($c->code_patch);
|
||||||
}
|
}
|
||||||
dbg_error_log("caldav", "Version %s (%d.%d.%d) == %s", $c->code_pkgver, $c->code_major, $c->code_minor, $c->code_patch, $c->code_version);
|
dbg_error_log("caldav", "Version %s (%d.%d.%d) == %s", $c->code_pkgver, $c->code_major, $c->code_minor, $c->code_patch, $c->code_version);
|
||||||
header( sprintf("Server: %s/%d.%d", $c->code_pkgver, $c->code_major, $c->code_minor) );
|
// header( sprintf("Server: %s/%d.%d", $c->code_pkgver, $c->code_major, $c->code_minor) );
|
||||||
|
header( sprintf('X-RSCDS-Version: RSCDS/%d.%d.%d; DB/%d.%d.%d', $c->code_major, $c->code_minor, $c->code_patch, $c->schema_major, $c->schema_minor, $c->schema_patch) );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force the domain name to what was in the configuration file
|
* Force the domain name to what was in the configuration file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user