mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-26 15:20:16 +00:00
Use URL construction in PROPPATCH handling.
This commit is contained in:
parent
c0c8d2d19f
commit
96e579910b
@ -195,7 +195,8 @@ if ( count($failure) > 0 ) {
|
||||
));
|
||||
}
|
||||
|
||||
array_unshift( $failure, new XMLElement('href', $c->protocol_server_port_script . $request->path ) );
|
||||
$url = $request->ConstructURL($request->path);
|
||||
array_unshift( $failure, new XMLElement('href', $url ) );
|
||||
$failure[] = new XMLElement('responsedescription', translate("Some properties were not able to be changed.") );
|
||||
|
||||
$multistatus = new XMLElement( "multistatus", new XMLElement( 'response', $failure ), array('xmlns'=>'DAV:') );
|
||||
@ -209,7 +210,8 @@ if ( count($failure) > 0 ) {
|
||||
$sql .= "COMMIT;";
|
||||
$qry = new PgQuery( $sql );
|
||||
if ( $qry->Exec() ) {
|
||||
$href = new XMLElement('href', $c->protocol_server_port_script . $request->path );
|
||||
$url = $request->ConstructURL($request->path);
|
||||
$href = new XMLElement('href', $url );
|
||||
$desc = new XMLElement('responsedescription', translate("All requested changes were made.") );
|
||||
|
||||
$multistatus = new XMLElement( "multistatus", new XMLElement( 'response', array( $href, $desc ) ), array('xmlns'=>'DAV:') );
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
HTTP/1.1 200 OK
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
Content-Length: 239
|
||||
Content-Length: 224
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:">
|
||||
<response>
|
||||
<href>http://mycaldav/caldav.php/user1/home/</href>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<responsedescription>All requested changes were made.</responsedescription>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
Content-Length: 464
|
||||
Content-Length: 449
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:">
|
||||
<response>
|
||||
<href>http://mycaldav/caldav.php/user1/home/</href>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<DAV::RESOURCETYPE/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user