Ben Copsey

Fix loading page when the user clicks on a link in the webView on Mac

Fix some spelling mistakes. One of these days it will be necessary to sit down and learn how to spell 'necessary'.
@@ -278,7 +278,7 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; @@ -278,7 +278,7 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
278 // Called on the delegate (if implemented) when the request receives response headers. Default is requestDidReceiveResponseHeaders: 278 // Called on the delegate (if implemented) when the request receives response headers. Default is requestDidReceiveResponseHeaders:
279 SEL didReceiveResponseHeadersSelector; 279 SEL didReceiveResponseHeadersSelector;
280 280
281 - // Called on the delegate (if implemented) when the request recieves a Location header and shouldRedirect is YES 281 + // Called on the delegate (if implemented) when the request receives a Location header and shouldRedirect is YES
282 // The delegate can then change the url if needed, and can restart the request by calling [request resume], or simply cancel it 282 // The delegate can then change the url if needed, and can restart the request by calling [request resume], or simply cancel it
283 SEL willRedirectSelector; 283 SEL willRedirectSelector;
284 284
@@ -461,9 +461,9 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; @@ -461,9 +461,9 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
461 // 461 //
462 // When set to NO 462 // When set to NO
463 // All requests will inflate the response as it comes in 463 // All requests will inflate the response as it comes in
464 - // * If the request has no downloadDestinationPath set, the raw (compressed) response is disgarded and rawResponseData will contain the decompressed response 464 + // * If the request has no downloadDestinationPath set, the raw (compressed) response is discarded and rawResponseData will contain the decompressed response
465 // * If the request has a downloadDestinationPath, the raw response will be stored in temporaryFileDownloadPath as normal, the inflated response will be stored in temporaryUncompressedDataDownloadPath 465 // * If the request has a downloadDestinationPath, the raw response will be stored in temporaryFileDownloadPath as normal, the inflated response will be stored in temporaryUncompressedDataDownloadPath
466 - // Once the request completes suceessfully, the contents of temporaryUncompressedDataDownloadPath are moved into downloadDestinationPath 466 + // Once the request completes successfully, the contents of temporaryUncompressedDataDownloadPath are moved into downloadDestinationPath
467 // 467 //
468 // Setting this to NO may be especially useful for users using ASIHTTPRequest in conjunction with a streaming parser, as it will allow partial gzipped responses to be inflated and passed on to the parser while the request is still running 468 // Setting this to NO may be especially useful for users using ASIHTTPRequest in conjunction with a streaming parser, as it will allow partial gzipped responses to be inflated and passed on to the parser while the request is still running
469 BOOL shouldWaitToInflateCompressedResponses; 469 BOOL shouldWaitToInflateCompressedResponses;
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 #import "ASIDataCompressor.h" 24 #import "ASIDataCompressor.h"
25 25
26 // Automatically set on build 26 // Automatically set on build
27 -NSString *ASIHTTPRequestVersion = @"v1.7-98 2010-10-03"; 27 +NSString *ASIHTTPRequestVersion = @"v1.7-99 2010-10-03";
28 28
29 NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain"; 29 NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain";
30 30
@@ -112,7 +112,7 @@ static NSRecursiveLock *sessionCookiesLock = nil; @@ -112,7 +112,7 @@ static NSRecursiveLock *sessionCookiesLock = nil;
112 112
113 // This lock ensures delegates only receive one notification that authentication is required at once 113 // This lock ensures delegates only receive one notification that authentication is required at once
114 // When using ASIAuthenticationDialogs, it also ensures only one dialog is shown at once 114 // When using ASIAuthenticationDialogs, it also ensures only one dialog is shown at once
115 -// If a request can't aquire the lock immediately, it means a dialog is being shown or a delegate is handling the authentication challenge 115 +// If a request can't acquire the lock immediately, it means a dialog is being shown or a delegate is handling the authentication challenge
116 // Once it gets the lock, it will try to look for existing credentials again rather than showing the dialog / notifying the delegate 116 // Once it gets the lock, it will try to look for existing credentials again rather than showing the dialog / notifying the delegate
117 // This is so it can make use of any credentials supplied for the other request, if they are appropriate 117 // This is so it can make use of any credentials supplied for the other request, if they are appropriate
118 static NSRecursiveLock *delegateAuthenticationLock = nil; 118 static NSRecursiveLock *delegateAuthenticationLock = nil;
@@ -991,7 +991,7 @@ static NSOperationQueue *sharedQueue = nil; @@ -991,7 +991,7 @@ static NSOperationQueue *sharedQueue = nil;
991 [self setReadStream:[(NSInputStream *)CFReadStreamCreateForStreamedHTTPRequest(kCFAllocatorDefault, request,(CFReadStreamRef)[self postBodyReadStream]) autorelease]]; 991 [self setReadStream:[(NSInputStream *)CFReadStreamCreateForStreamedHTTPRequest(kCFAllocatorDefault, request,(CFReadStreamRef)[self postBodyReadStream]) autorelease]];
992 } else { 992 } else {
993 993
994 - // If we have a request body, we'll stream it from memory using our custom stream, so that we can measure bandwidth use and it can be bandwidth-throttled if nescessary 994 + // If we have a request body, we'll stream it from memory using our custom stream, so that we can measure bandwidth use and it can be bandwidth-throttled if necessary
995 if ([self postBody] && [[self postBody] length] > 0) { 995 if ([self postBody] && [[self postBody] length] > 0) {
996 if ([self shouldCompressRequestBody] && [self compressedPostBody]) { 996 if ([self shouldCompressRequestBody] && [self compressedPostBody]) {
997 [self setPostBodyReadStream:[ASIInputStream inputStreamWithData:[self compressedPostBody] request:self]]; 997 [self setPostBodyReadStream:[ASIInputStream inputStreamWithData:[self compressedPostBody] request:self]];
@@ -1302,7 +1302,7 @@ static NSOperationQueue *sharedQueue = nil; @@ -1302,7 +1302,7 @@ static NSOperationQueue *sharedQueue = nil;
1302 } 1302 }
1303 } 1303 }
1304 1304
1305 -// Called by delegate to resume loading with a new url after the delegate recieved request:willRedirectToURL: 1305 +// Called by delegate to resume loading with a new url after the delegate received request:willRedirectToURL:
1306 - (void)redirectToURL:(NSURL *)newURL 1306 - (void)redirectToURL:(NSURL *)newURL
1307 { 1307 {
1308 [self setRedirectURL:newURL]; 1308 [self setRedirectURL:newURL];
@@ -65,7 +65,7 @@ static NSLock *readLock = nil; @@ -65,7 +65,7 @@ static NSLock *readLock = nil;
65 65
66 /* 66 /*
67 * Implement NSInputStream mandatory methods to make sure they are implemented 67 * Implement NSInputStream mandatory methods to make sure they are implemented
68 - * (necessary for MacRuby for example) and avoir the overhead of method 68 + * (necessary for MacRuby for example) and avoid the overhead of method
69 * forwarding for these common methods. 69 * forwarding for these common methods.
70 */ 70 */
71 - (void)open 71 - (void)open
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 // Copyright 2010 All-Seeing Interactive. All rights reserved. 6 // Copyright 2010 All-Seeing Interactive. All rights reserved.
7 // 7 //
8 // This is an EXPERIMENTAL class - use at your own risk! 8 // This is an EXPERIMENTAL class - use at your own risk!
9 -// It is strongly recommened to set a downloadDestinationPath when using ASIWebPageRequest 9 +// It is strongly recommend to set a downloadDestinationPath when using ASIWebPageRequest
10 // Also, performance will be better if your ASIWebPageRequest has a downloadCache setup 10 // Also, performance will be better if your ASIWebPageRequest has a downloadCache setup
11 // Known issue: You cannot use startSychronous with an ASIWebPageRequest 11 // Known issue: You cannot use startSychronous with an ASIWebPageRequest
12 12
@@ -52,7 +52,7 @@ typedef enum _ASIWebContentType { @@ -52,7 +52,7 @@ typedef enum _ASIWebContentType {
52 52
53 // Will return a data URI that contains a base64 version of the content at this url 53 // Will return a data URI that contains a base64 version of the content at this url
54 // This is used when replacing urls in the html and css with actual data 54 // This is used when replacing urls in the html and css with actual data
55 -// If you subclass ASIWebPageRequest, you can override this function to return different conten or a url pointing at another location 55 +// If you subclass ASIWebPageRequest, you can override this function to return different content or a url pointing at another location
56 - (NSString *)contentForExternalURL:(NSString *)theURL; 56 - (NSString *)contentForExternalURL:(NSString *)theURL;
57 57
58 // Returns the location that a downloaded external resource's content will be stored in 58 // Returns the location that a downloaded external resource's content will be stored in
@@ -394,7 +394,7 @@ @@ -394,7 +394,7 @@
394 return; 394 return;
395 } 395 }
396 // If the user clicked on a link, let's tell the webview to ignore it, and we'll load it ourselves 396 // If the user clicked on a link, let's tell the webview to ignore it, and we'll load it ourselves
397 - [self fetchURL:[request URL]]; 397 + [self fetchURL:[NSURL URLWithString:[[request URL] absoluteString] relativeToURL:[NSURL URLWithString:[urlField stringValue]]]];
398 [listener ignore]; 398 [listener ignore];
399 } 399 }
400 400