Pierre-Olivier Latour 11 жил өмнө
parent
commit
fb02b9f9d1
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      README.md

+ 2 - 2
README.md

@@ -67,7 +67,7 @@ int main(int argc, const char* argv[]) {
   @autoreleasepool {
     
     GCDWebServer* webServer = [[GCDWebServer alloc] init];
-    [webServer addHandlerForBasePath:@"/" localPath:NSHomeDirectory() indexFilename:nil cacheAge:3600];
+    [webServer addHandlerForBasePath:@"/" localPath:NSHomeDirectory() indexFilename:nil cacheAge:3600 allowRangeRequests:YES];
     [webServer runWithPort:8080];
     [webServer release];
     
@@ -171,7 +171,7 @@ Assuming you have a website directory in your app containing HTML template files
 NSString* websitePath = [[NSBundle mainBundle] pathForResource:@"Website" ofType:nil];
 
 // Add a default handler to serve static files (i.e. anything other than HTML files)
-[self addHandlerForBasePath:@"/" localPath:websitePath indexFilename:nil cacheAge:3600];
+[self addHandlerForBasePath:@"/" localPath:websitePath indexFilename:nil cacheAge:3600 allowRangeRequests:YES];
 
 // Add an override handler for all requests to "*.html" URLs to do the special HTML templatization
 [self addHandlerForMethod:@"GET"