mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-19 14:10:14 +00:00
Fix raw_post handling for other front-ends.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
parent
ba1e80d185
commit
d83d7a0ef2
@ -41,13 +41,14 @@ function logRequestHeaders() {
|
||||
dbg_error_log( "LOG ", "******************** Request ********************" );
|
||||
|
||||
// Log the request in all it's gory detail.
|
||||
$lines = preg_split( '#[\r\n]+#', file_get_contents( 'php://input'));
|
||||
$lines = preg_split( '#[\r\n]+#', $c->raw_post );
|
||||
foreach( $lines AS $v ) {
|
||||
dbg_error_log( "LOG request", "-->%s", $v );
|
||||
}
|
||||
unset($lines);
|
||||
}
|
||||
|
||||
if ( !isset($c->raw_post) ) $c->raw_post = file_get_contents( 'php://input');
|
||||
if ( (isset($c->dbg['ALL']) && $c->dbg['ALL']) || (isset($c->dbg['request']) && $c->dbg['request']) )
|
||||
logRequestHeaders();
|
||||
|
||||
|
||||
@ -109,7 +109,8 @@ class CalDAVRequest
|
||||
$this->options = $options;
|
||||
if ( !isset($this->options['allow_by_email']) ) $this->options['allow_by_email'] = false;
|
||||
|
||||
$this->raw_post = file_get_contents( 'php://input');
|
||||
if ( !isset($c->raw_post) ) $c->raw_post = file_get_contents( 'php://input');
|
||||
$this->raw_post = $c->raw_post;
|
||||
|
||||
if ( isset($debugging) && isset($_GET['method']) ) {
|
||||
$_SERVER['REQUEST_METHOD'] = $_GET['method'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user