fix(dav): render DAV exceptions as XML

This commit is contained in:
Francis Lachapelle committed 2022-02-01 14:20:32 -05:00
1 parent 348a79c795
commit 96bb8b4cc2
10 files changed
+87 -67

No files matched your search

+6 -6
View File
@@ -392,8 +392,8 @@ static SoSecurityManager *sm = nil;
error = nil;
}
else
error = [NSException exceptionWithHTTPStatus: 400
reason: @"The new folder could not be created"];
error = [self exceptionWithHTTPStatus: 400
reason: @"The new folder could not be created"];
}
return error;
@@ -491,7 +491,7 @@ static SoSecurityManager *sm = nil;
if (error)
{
[self errorWithFormat: @"a database error occured: %@", [error reason]];
obj = [NSException exceptionWithHTTPStatus: 503];
obj = [self exceptionWithHTTPStatus: 503];
}
else
obj = [subscribedSubFolders objectForKey: name];
@@ -511,7 +511,7 @@ static SoSecurityManager *sm = nil;
if (error)
{
[self errorWithFormat: @"a database error occured: %@", [error reason]];
obj = [NSException exceptionWithHTTPStatus: 503];
obj = [self exceptionWithHTTPStatus: 503];
}
else
{
@@ -638,7 +638,7 @@ static SoSecurityManager *sm = nil;
if (error)
{
[self errorWithFormat: @"a database error occured: %@", [error reason]];
return [NSException exceptionWithHTTPStatus: 503];
return [NSException exceptionWithDAVStatus: 503];
}
// We assume "personal" exists. In fact, if it doesn't, something
@@ -671,7 +671,7 @@ static SoSecurityManager *sm = nil;
if (!supported)
{
return [NSException exceptionWithHTTPStatus: 403];
return [NSException exceptionWithDAVStatus: 403];
}
}