mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
fix(dav): render DAV exceptions as XML
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* SOGoObject.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
* Copyright (C) 2006-2015 Inverse inc.
|
||||
* Copyright (C) 2006-2022 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1594,4 +1594,23 @@
|
||||
return [self labelForKey: key inContext: context];
|
||||
}
|
||||
|
||||
- (id) exceptionWithHTTPStatus: (unsigned short) theStatus
|
||||
{
|
||||
if ([[context request] handledByDefaultHandler])
|
||||
return [NSException exceptionWithHTTPStatus: theStatus];
|
||||
else
|
||||
return [NSException exceptionWithDAVStatus: theStatus];
|
||||
}
|
||||
|
||||
- (id) exceptionWithHTTPStatus: (unsigned short) theStatus
|
||||
reason: (NSString *) theReason
|
||||
{
|
||||
if ([[context request] handledByDefaultHandler])
|
||||
return [NSException exceptionWithHTTPStatus: theStatus
|
||||
reason: theReason];
|
||||
else
|
||||
return [NSException exceptionWithDAVStatus: theStatus
|
||||
reason: theReason];
|
||||
}
|
||||
|
||||
@end /* SOGoObject */
|
||||
|
||||
Reference in New Issue
Block a user