mirror of
https://github.com/wu736139669/ASHWebURLProtocol.git
synced 2026-08-05 05:54:56 +00:00
fix bug
This commit is contained in:
BIN
Binary file not shown.
+15
-15
@@ -90,11 +90,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "ASHWebURLProtocol/ASHWebNSURLProtocol.m"
|
||||
timestampString = "501062432.910644"
|
||||
timestampString = "501412242.54296"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "125"
|
||||
endingLineNumber = "125"
|
||||
startingLineNumber = "124"
|
||||
endingLineNumber = "124"
|
||||
landmarkName = "-connection:didReceiveResponse:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -106,11 +106,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "ASHWebURLProtocol/ASHWebNSURLProtocol.m"
|
||||
timestampString = "501062434.247891"
|
||||
timestampString = "501412242.54296"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "129"
|
||||
endingLineNumber = "129"
|
||||
startingLineNumber = "128"
|
||||
endingLineNumber = "128"
|
||||
landmarkName = "-connection:didReceiveData:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -122,11 +122,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "ASHWebURLProtocol/ASHWebNSURLProtocol.m"
|
||||
timestampString = "501062436.390585"
|
||||
timestampString = "501412242.54296"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "136"
|
||||
endingLineNumber = "136"
|
||||
startingLineNumber = "135"
|
||||
endingLineNumber = "135"
|
||||
landmarkName = "-connectionDidFinishLoading:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -138,11 +138,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "ASHWebURLProtocol/ASHWebNSURLProtocol.m"
|
||||
timestampString = "501062440.37441"
|
||||
timestampString = "501412242.54296"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "147"
|
||||
endingLineNumber = "147"
|
||||
startingLineNumber = "146"
|
||||
endingLineNumber = "146"
|
||||
landmarkName = "-connection:didFailWithError:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -186,11 +186,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "ASHWebURLProtocol/ASHWebNSURLProtocol.m"
|
||||
timestampString = "501062634.280876"
|
||||
timestampString = "501412242.54296"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "135"
|
||||
endingLineNumber = "135"
|
||||
startingLineNumber = "134"
|
||||
endingLineNumber = "134"
|
||||
landmarkName = "-connectionDidFinishLoading:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
|
||||
@@ -95,14 +95,14 @@ static NSString *const kHTTPHeaderField = @"ASH-WebView-Caching";
|
||||
NSString *cachesPath = [self cachePathForRequest:[self request]];
|
||||
ASHCachedData *cache = [NSKeyedUnarchiver unarchiveObjectWithFile:cachesPath];
|
||||
|
||||
// if (cache) {
|
||||
// NSData *data = cache.data;
|
||||
//
|
||||
// [[self client] URLProtocol:self didReceiveResponse:cache.response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
|
||||
// [[self client] URLProtocol:self didLoadData:data];
|
||||
// [[self client] URLProtocolDidFinishLoading:self];
|
||||
if (cache) {
|
||||
NSData *data = cache.data;
|
||||
|
||||
[[self client] URLProtocol:self didReceiveResponse:cache.response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
|
||||
[[self client] URLProtocol:self didLoadData:data];
|
||||
[[self client] URLProtocolDidFinishLoading:self];
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
NSMutableURLRequest *newRequest = [self.request mutableCopy];
|
||||
@@ -113,7 +113,6 @@ static NSString *const kHTTPHeaderField = @"ASH-WebView-Caching";
|
||||
self.connection = [NSURLConnection connectionWithRequest:newRequest
|
||||
delegate:self];
|
||||
|
||||
[self.connection start];
|
||||
}
|
||||
- (void)stopLoading
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user