#include "SoObject+SoDAV.h"
#include "SoObject.h"
#include "EOFetchSpecification+SoDAV.h"
+#include <NGObjWeb/WEClientCapabilities.h>
+#include <NGObjWeb/WOContext.h>
#include <EOControl/EOQualifier.h>
#include <EOControl/EOSortOrdering.h>
#include "common.h"
NSArray *queriedAttrNames;
NSArray *orderings;
NSString *childKey;
- NSString *tmp;
+ BOOL doEscape;
+ NSString *entityURL;
BOOL isBrief = YES; // do not encode "sub-errors", just omit the item
[self debugWithFormat:@"performing flat query: %@", _fs];
+
+ /* base URL */
+
+ entityURL = [_fs entityName];
+ if (![entityURL hasSuffix:@"/"])
+ entityURL = [entityURL stringByAppendingString:@"/"];
+
+ doEscape = YES;
+
+ /* retrieve child names (calls -toOneRelationshipKeys and -toManyRel...) */
childKeys = [self->object davChildKeysInContext:_ctx];
Note: we cannot use NSPathUtilities, those will reformat the string on
Cocoa Foundation! (eg http://a => http:/a, remove double slashes)
*/
- childHref = [childKey stringByEscapingURL];
- tmp = [_fs entityName];
- if (![tmp hasSuffix:@"/"])
- tmp = [tmp stringByAppendingString:@"/"];
- childHref = [tmp stringByAppendingString:childHref];
+ childHref = doEscape ? [childKey stringByEscapingURL] : childKey;
+ childHref = [entityURL stringByAppendingString:childHref];
if (debugOn) {
// TODO: this happens if we access using Goliath