Skip to content

Commit

Permalink
Fix loading page when the user clicks on a link in the webView on Mac
Browse files Browse the repository at this point in the history
Fix some spelling mistakes. One of these days it will be necessary to sit down and learn how to spell 'necessary'.
  • Loading branch information
pokeb committed Oct 3, 2010
1 parent 211f2d0 commit e50731f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Classes/ASIHTTPRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// Called on the delegate (if implemented) when the request receives response headers. Default is requestDidReceiveResponseHeaders:
SEL didReceiveResponseHeadersSelector;

// Called on the delegate (if implemented) when the request recieves a Location header and shouldRedirect is YES
// Called on the delegate (if implemented) when the request receives a Location header and shouldRedirect is YES
// The delegate can then change the url if needed, and can restart the request by calling [request resume], or simply cancel it
SEL willRedirectSelector;

Expand Down Expand Up @@ -461,9 +461,9 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
//
// When set to NO
// All requests will inflate the response as it comes in
// * If the request has no downloadDestinationPath set, the raw (compressed) response is disgarded and rawResponseData will contain the decompressed response
// * If the request has no downloadDestinationPath set, the raw (compressed) response is discarded and rawResponseData will contain the decompressed response
// * If the request has a downloadDestinationPath, the raw response will be stored in temporaryFileDownloadPath as normal, the inflated response will be stored in temporaryUncompressedDataDownloadPath
// Once the request completes suceessfully, the contents of temporaryUncompressedDataDownloadPath are moved into downloadDestinationPath
// Once the request completes successfully, the contents of temporaryUncompressedDataDownloadPath are moved into downloadDestinationPath
//
// 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
BOOL shouldWaitToInflateCompressedResponses;
Expand Down
8 changes: 4 additions & 4 deletions Classes/ASIHTTPRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#import "ASIDataCompressor.h"

// Automatically set on build
NSString *ASIHTTPRequestVersion = @"v1.7-98 2010-10-03";
NSString *ASIHTTPRequestVersion = @"v1.7-99 2010-10-03";

NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain";

Expand Down Expand Up @@ -112,7 +112,7 @@ static void ReadStreamClientCallBack(CFReadStreamRef readStream, CFStreamEventTy

// This lock ensures delegates only receive one notification that authentication is required at once
// When using ASIAuthenticationDialogs, it also ensures only one dialog is shown at once
// If a request can't aquire the lock immediately, it means a dialog is being shown or a delegate is handling the authentication challenge
// If a request can't acquire the lock immediately, it means a dialog is being shown or a delegate is handling the authentication challenge
// Once it gets the lock, it will try to look for existing credentials again rather than showing the dialog / notifying the delegate
// This is so it can make use of any credentials supplied for the other request, if they are appropriate
static NSRecursiveLock *delegateAuthenticationLock = nil;
Expand Down Expand Up @@ -991,7 +991,7 @@ - (void)startRequest
[self setReadStream:[(NSInputStream *)CFReadStreamCreateForStreamedHTTPRequest(kCFAllocatorDefault, request,(CFReadStreamRef)[self postBodyReadStream]) autorelease]];
} else {

// 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
// 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
if ([self postBody] && [[self postBody] length] > 0) {
if ([self shouldCompressRequestBody] && [self compressedPostBody]) {
[self setPostBodyReadStream:[ASIInputStream inputStreamWithData:[self compressedPostBody] request:self]];
Expand Down Expand Up @@ -1302,7 +1302,7 @@ - (void)performRedirect
}
}

// Called by delegate to resume loading with a new url after the delegate recieved request:willRedirectToURL:
// Called by delegate to resume loading with a new url after the delegate received request:willRedirectToURL:
- (void)redirectToURL:(NSURL *)newURL
{
[self setRedirectURL:newURL];
Expand Down
2 changes: 1 addition & 1 deletion Classes/ASIInputStream.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len

/*
* Implement NSInputStream mandatory methods to make sure they are implemented
* (necessary for MacRuby for example) and avoir the overhead of method
* (necessary for MacRuby for example) and avoid the overhead of method
* forwarding for these common methods.
*/
- (void)open
Expand Down
4 changes: 2 additions & 2 deletions Classes/ASIWebPageRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright 2010 All-Seeing Interactive. All rights reserved.
//
// This is an EXPERIMENTAL class - use at your own risk!
// It is strongly recommened to set a downloadDestinationPath when using ASIWebPageRequest
// It is strongly recommend to set a downloadDestinationPath when using ASIWebPageRequest
// Also, performance will be better if your ASIWebPageRequest has a downloadCache setup
// Known issue: You cannot use startSychronous with an ASIWebPageRequest

Expand Down Expand Up @@ -52,7 +52,7 @@ typedef enum _ASIWebContentType {

// Will return a data URI that contains a base64 version of the content at this url
// This is used when replacing urls in the html and css with actual data
// If you subclass ASIWebPageRequest, you can override this function to return different conten or a url pointing at another location
// If you subclass ASIWebPageRequest, you can override this function to return different content or a url pointing at another location
- (NSString *)contentForExternalURL:(NSString *)theURL;

// Returns the location that a downloaded external resource's content will be stored in
Expand Down
2 changes: 1 addition & 1 deletion Mac Sample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ - (void)webView:(WebView *)sender decidePolicyForNavigationAction:(NSDictionary
return;
}
// If the user clicked on a link, let's tell the webview to ignore it, and we'll load it ourselves
[self fetchURL:[request URL]];
[self fetchURL:[NSURL URLWithString:[[request URL] absoluteString] relativeToURL:[NSURL URLWithString:[urlField stringValue]]]];
[listener ignore];
}

Expand Down

0 comments on commit e50731f

Please sign in to comment.