More robust handing of string passed to CPURLRequest instead of CPURLs.

This commit is contained in:
Tom Robinson
2010-01-13 01:57:04 -08:00
parent 345f5e14de
commit 093c6cdca3
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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)];
}
/*!