mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-06 10:53:42 +00:00
More robust handing of string passed to CPURLRequest instead of CPURLs.
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
- (void)loadWithDelegate:(id)aDelegate
|
||||
{
|
||||
self._delegate = aDelegate;
|
||||
self._infoConnection = [CPURLConnection connectionWithRequest:[CPURLRequest requestWithURL:[self bundlePath] + "/Info.plist"] delegate:self];
|
||||
self._infoConnection = [CPURLConnection connectionWithRequest:[CPURLRequest requestWithURL:[CPURL URLWithString:[self bundlePath] + "/Info.plist"]] delegate:self];
|
||||
}
|
||||
|
||||
- (CPArray)supportedEnvironments
|
||||
|
||||
@@ -62,10 +62,7 @@
|
||||
|
||||
if (self)
|
||||
{
|
||||
if ([aURL isKindOfClass:[CPString class]])
|
||||
_URL = [CPURL URLWithString:aURL];
|
||||
else
|
||||
_URL = aURL;
|
||||
[self setURL:aURL];
|
||||
|
||||
_HTTPBody = @"";
|
||||
_HTTPMethod = @"GET";
|
||||
@@ -93,7 +90,10 @@
|
||||
*/
|
||||
- (void)setURL:(CPURL)aURL
|
||||
{
|
||||
_URL = aURL;
|
||||
if ([aURL isKindOfClass:[CPURL class]])
|
||||
_URL = aURL;
|
||||
else
|
||||
_URL = [CPURL URLWithString:String(aURL)];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user