mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-28 03:04:15 +00:00
CalDAVRequest: make content-type match non-greedy
this fixes a warning when the client doesn't include a space between content-type and charset: LOG: WARNING:Application sent content-type of "text/vcard;charset=utf-8" instead of "text/vcard"
This commit is contained in:
parent
22e0e4aa38
commit
b4a1e39d6d
@ -218,7 +218,7 @@ class CalDAVRequest
|
||||
}
|
||||
$this->method = $_SERVER['REQUEST_METHOD'];
|
||||
$this->content_type = (isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null);
|
||||
if ( preg_match( '{^(\S+/\S+)\s*(;.*)?$}', $this->content_type, $matches ) ) {
|
||||
if ( preg_match( '{^(\S+/\S+?)\s*(;.*)?$}', $this->content_type, $matches ) ) {
|
||||
$this->content_type = $matches[1];
|
||||
}
|
||||
if ( strlen($c->raw_post) > 0 ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user