|
@@ -261,7 +261,10 @@ static inline BOOL _IsMacFinder(GCDWebServerRequest* request) {
|
|
if ((dstRelativePath == nil) || (range.location == NSNotFound)) {
|
|
if ((dstRelativePath == nil) || (range.location == NSNotFound)) {
|
|
return [GCDWebServerErrorResponse responseWithClientError:kGCDWebServerHTTPStatusCode_BadRequest message:@"Malformed 'Destination' header: %@", dstRelativePath];
|
|
return [GCDWebServerErrorResponse responseWithClientError:kGCDWebServerHTTPStatusCode_BadRequest message:@"Malformed 'Destination' header: %@", dstRelativePath];
|
|
}
|
|
}
|
|
|
|
+#pragma clang diagnostic push
|
|
|
|
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
dstRelativePath = [[dstRelativePath substringFromIndex:(range.location + range.length)] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
|
dstRelativePath = [[dstRelativePath substringFromIndex:(range.location + range.length)] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
|
|
|
+#pragma clang diagnostic pop
|
|
NSString* dstAbsolutePath = [_uploadDirectory stringByAppendingPathComponent:dstRelativePath];
|
|
NSString* dstAbsolutePath = [_uploadDirectory stringByAppendingPathComponent:dstRelativePath];
|
|
if (![self _checkSandboxedPath:dstAbsolutePath]) {
|
|
if (![self _checkSandboxedPath:dstAbsolutePath]) {
|
|
return [GCDWebServerErrorResponse responseWithClientError:kGCDWebServerHTTPStatusCode_NotFound message:@"\"%@\" does not exist", srcRelativePath];
|
|
return [GCDWebServerErrorResponse responseWithClientError:kGCDWebServerHTTPStatusCode_NotFound message:@"\"%@\" does not exist", srcRelativePath];
|
|
@@ -333,7 +336,10 @@ static inline xmlNodePtr _XMLChildWithName(xmlNodePtr child, const xmlChar* name
|
|
}
|
|
}
|
|
|
|
|
|
- (void)_addPropertyResponseForItem:(NSString*)itemPath resource:(NSString*)resourcePath properties:(DAVProperties)properties xmlString:(NSMutableString*)xmlString {
|
|
- (void)_addPropertyResponseForItem:(NSString*)itemPath resource:(NSString*)resourcePath properties:(DAVProperties)properties xmlString:(NSMutableString*)xmlString {
|
|
|
|
+#pragma clang diagnostic push
|
|
|
|
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
CFStringRef escapedPath = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)resourcePath, NULL, CFSTR("<&>?+"), kCFStringEncodingUTF8);
|
|
CFStringRef escapedPath = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)resourcePath, NULL, CFSTR("<&>?+"), kCFStringEncodingUTF8);
|
|
|
|
+#pragma clang diagnostic pop
|
|
if (escapedPath) {
|
|
if (escapedPath) {
|
|
NSDictionary* attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:itemPath error:NULL];
|
|
NSDictionary* attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:itemPath error:NULL];
|
|
NSString* type = [attributes objectForKey:NSFileType];
|
|
NSString* type = [attributes objectForKey:NSFileType];
|