diff --git a/ChangeLog b/ChangeLog index 40701ac59..7562c923b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ -2010-05-03 Richard Frith-Macdonald +2010-05-05 Richard Frith-Macdonald + + * Source/GSHTTPURLHandle.m: + * Source/NSURLProtocol.m: + Fix for bug #29764 ... add percent escapes to the path when generating + the URI in the HTTP request. + +2010-05-05 Richard Frith-Macdonald * Source/Tools/gdomap.c: security updates. * Tools/Makefile.postamble: make warning messages a bit clearer and diff --git a/Source/GSHTTPURLHandle.m b/Source/GSHTTPURLHandle.m index ee2924160..4ec4146f5 100644 --- a/Source/GSHTTPURLHandle.m +++ b/Source/GSHTTPURLHandle.m @@ -900,7 +900,8 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data) if (debug) NSLog(@"%@ %p %s", NSStringFromSelector(_cmd), self, keepalive?"K":""); - path = [[u fullPath] stringByTrimmingSpaces]; + path = [[[u fullPath] stringByTrimmingSpaces] + stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; if ([path length] == 0) { path = @"/"; @@ -1487,7 +1488,8 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data) method = @"GET"; } } - path = [[u fullPath] stringByTrimmingSpaces]; + path = [[[u fullPath] stringByTrimmingSpaces] + stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; if ([path length] == 0) { path = @"/"; diff --git a/Source/NSURLProtocol.m b/Source/NSURLProtocol.m index 8aa3585a5..04e31c488 100644 --- a/Source/NSURLProtocol.m +++ b/Source/NSURLProtocol.m @@ -1275,7 +1275,8 @@ static NSURLProtocol *placeholder = nil; [m appendString: [this->request HTTPMethod]]; [m appendString: @" "]; u = [this->request URL]; - s = [u fullPath]; + s = [[u fullPath] stringByAddingPercentEscapesUsingEncoding: + NSUTF8StringEncoding]; if ([s hasPrefix: @"/"] == NO) { [m appendString: @"/"];