mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-06-10 05:10:19 +00:00
Change to use 422 when we have an unsupported, but syntactically correct,
request.
This commit is contained in:
parent
d937c7988e
commit
6c50015eef
@ -98,7 +98,7 @@ if ( count($unsupported) > 0 ) {
|
||||
}
|
||||
$error = new XMLElement("error", new XMLElement( "LOCK",$badprops), array("xmlns" => "DAV:") );
|
||||
|
||||
$request->DoResponse( 403, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
||||
$request->DoResponse( 422, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -318,7 +318,7 @@ if ( count($unsupported) > 0 ) {
|
||||
}
|
||||
$error = new XMLElement("error", new XMLElement( "propfind",$badprops), array("xmlns" => "DAV:") );
|
||||
|
||||
$request->DoResponse( 403, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
||||
$request->DoResponse( 422, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
||||
}
|
||||
elseif ( $request->AllowedTo('read') ) {
|
||||
|
||||
|
||||
@ -214,7 +214,7 @@ if ( isset($unsupported) && count($unsupported) > 0 ) {
|
||||
}
|
||||
$error = new XMLElement("error", new XMLElement( "propfind",$badprops), array("xmlns" => "DAV:") );
|
||||
|
||||
$request->DoResponse( 403, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
||||
$request->DoResponse( 422, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user