diff --git a/Frameworks/OakCommand/src/OakCommand.mm b/Frameworks/OakCommand/src/OakCommand.mm index 93a4d84f..8ba8d90d 100644 --- a/Frameworks/OakCommand/src/OakCommand.mm +++ b/Frameworks/OakCommand/src/OakCommand.mm @@ -8,6 +8,7 @@ #import #import #import +#import #import // bundle_command_t, fix_shebang #import #import @@ -226,7 +227,7 @@ static pid_t run_command (dispatch_group_t rootGroup, std::string const& cmd, in static NSInteger UniqueKey = 0; // Make each URL unique to avoid caching - _urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@://job/%@/%ld", kOakFileHandleURLScheme, [to_ns(_bundleCommand.name) stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], ++UniqueKey]] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:6000]; + _urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@://job/%@/%ld", kOakFileHandleURLScheme, to_ns(encode::url_part(_bundleCommand.name)), ++UniqueKey]] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:6000]; [NSURLProtocol setProperty:self.identifier forKey:@"commandIdentifier" inRequest:_urlRequest]; [NSURLProtocol setProperty:pipe.fileHandleForReading forKey:@"fileHandle" inRequest:_urlRequest]; [NSURLProtocol setProperty:@(_processIdentifier) forKey:@"processIdentifier" inRequest:_urlRequest];