This commit is contained in:
Pierre-Olivier Latour
2014-04-06 10:10:25 -07:00
parent 1315c0e965
commit 7506f9c9a2
2 changed files with 2 additions and 10 deletions
+1 -5
View File
@@ -585,11 +585,7 @@ static void _NetServiceClientCallBack(CFNetServiceRef service, CFStreamError* er
- (void)addGETHandlerForBasePath:(NSString*)basePath directoryPath:(NSString*)directoryPath indexFilename:(NSString*)indexFilename cacheAge:(NSUInteger)cacheAge allowRangeRequests:(BOOL)allowRangeRequests {
if ([basePath hasPrefix:@"/"] && [basePath hasSuffix:@"/"]) {
#if __has_feature(objc_arc)
__unsafe_unretained GCDWebServer* server = self;
#else
__block GCDWebServer* server = self;
#endif
GCDWebServer* __unsafe_unretained server = self;
[self addHandlerWithMatchBlock:^GCDWebServerRequest *(NSString* requestMethod, NSURL* requestURL, NSDictionary* requestHeaders, NSString* urlPath, NSDictionary* urlQuery) {
if (![requestMethod isEqualToString:@"GET"]) {