Assume / for path if none is present in a url.

CQTexperiment
vspader 2009-03-13 23:33:11 -07:00
parent 26d44d6f37
commit 5422a1cddd
1 changed files with 6 additions and 1 deletions

View File

@ -175,8 +175,13 @@
{
NSURL *url = [self URL];
NSString *path = [url path];
if (nil == path || [path isEqualToString:@""]) {
path = @"/";
}
// The initial GET
NSMutableString *requestString = [[NSMutableString alloc] initWithFormat:@"GET %@ HTTP/1.0\r\n", [url path]];
NSMutableString *requestString = [[NSMutableString alloc] initWithFormat:@"GET %@ HTTP/1.0\r\n", path];
// Make sure there is a Host entry
NSString *host = [url host];