-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFLTRRequestListener.m
35 lines (31 loc) · 1.12 KB
/
FLTRRequestListener.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// FLTRRequestListener.m
// Filtra
//
// Created by José Signanini on 5/10/14.
// Copyright (c) 2014 José María Signanini. All rights reserved.
//
#import "FLTRRequestListener.h"
@implementation FLTRRequestListener
- (NSCachedURLResponse*)cachedResponseForRequest:(NSURLRequest*)request
{
// NSURL *url = [request URL];
// BOOL blockURL = [[FilterMgr sharedFilterMgr] shouldBlockURL:url];
// if (blockURL) {
// NSURLResponse *response =
// [[NSURLResponse alloc] initWithURL:url
// MIMEType:@"text/plain"
// expectedContentLength:1
// textEncodingName:nil];
//
// NSCachedURLResponse *cachedResponse =
// [[NSCachedURLResponse alloc] initWithResponse:response
// data:[NSData dataWithBytes:" " length:1]];
//
// [super storeCachedResponse:cachedResponse forRequest:request];
//
// }
// NSLog(@"Request: %@", request.URL.absoluteString);
return [super cachedResponseForRequest:request];
}
@end