File tree 1 file changed +17
-7
lines changed
1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -46,17 +46,27 @@ + (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b {
46
46
- (void )startLoading
47
47
{
48
48
NSURL * url = self.request .URL ;
49
-
50
- if ([[self class ] checkCryptFile: url]) {
51
- NSString *mimeType = [self getMimeType: url];
52
-
49
+
50
+ wwwPath = [[NSBundle mainBundle ].resourcePath stringByAppendingString: @" /www" ];
51
+ NSString *urling = [@" file://" stringByAppendingString:wwwPath];
52
+ NSString *urlings = [urling stringByAppendingString: checkPath];
53
+ NSString *finalUrl = [urlings stringByReplacingOccurrencesOfString: @" " withString: @" %20" ];
54
+
55
+ NSURL *urls = [[NSURL alloc ] initWithString: finalUrl];
56
+ url = urls;
57
+
58
+ // if ([[self class] checkCryptFile:url]) {
59
+ NSString *mimeType = [self getMimeType: url];
53
60
NSError * error;
54
61
NSString * content = [[NSString alloc ] initWithContentsOfFile: url.path encoding: NSUTF8StringEncoding error: &error];
55
62
if (!error) {
56
- NSData * data = [self decryptAES256WithKey: kCryptKey iv: kCryptIv data: content];
63
+ NSLog (@" Decrypt: %@ " ,url);
64
+ NSData * data = [self decryptAES256WithKey: kCryptKey iv: kCryptIv data: content];
57
65
[self sendResponseWithResponseCode: 200 data: data mimeType: mimeType];
58
- }
59
- }
66
+ } else {
67
+ NSLog (@" The error while loading: %@ " ,error);
68
+ }
69
+ // }
60
70
61
71
[super startLoading ];
62
72
}
You can’t perform that action at this time.
0 commit comments