git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30296 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-05-05 13:43:42 +00:00
parent 1f6a6d8925
commit 235b75ed69
3 changed files with 14 additions and 4 deletions

View file

@ -1,4 +1,11 @@
2010-05-03 Richard Frith-Macdonald <rfm@gnu.org> 2010-05-05 Richard Frith-Macdonald <rfm@gnu.org>
* 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 <rfm@gnu.org>
* Source/Tools/gdomap.c: security updates. * Source/Tools/gdomap.c: security updates.
* Tools/Makefile.postamble: make warning messages a bit clearer and * Tools/Makefile.postamble: make warning messages a bit clearer and

View file

@ -900,7 +900,8 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
if (debug) if (debug)
NSLog(@"%@ %p %s", NSStringFromSelector(_cmd), self, keepalive?"K":""); NSLog(@"%@ %p %s", NSStringFromSelector(_cmd), self, keepalive?"K":"");
path = [[u fullPath] stringByTrimmingSpaces]; path = [[[u fullPath] stringByTrimmingSpaces]
stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
if ([path length] == 0) if ([path length] == 0)
{ {
path = @"/"; path = @"/";
@ -1487,7 +1488,8 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
method = @"GET"; method = @"GET";
} }
} }
path = [[u fullPath] stringByTrimmingSpaces]; path = [[[u fullPath] stringByTrimmingSpaces]
stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
if ([path length] == 0) if ([path length] == 0)
{ {
path = @"/"; path = @"/";

View file

@ -1275,7 +1275,8 @@ static NSURLProtocol *placeholder = nil;
[m appendString: [this->request HTTPMethod]]; [m appendString: [this->request HTTPMethod]];
[m appendString: @" "]; [m appendString: @" "];
u = [this->request URL]; u = [this->request URL];
s = [u fullPath]; s = [[u fullPath] stringByAddingPercentEscapesUsingEncoding:
NSUTF8StringEncoding];
if ([s hasPrefix: @"/"] == NO) if ([s hasPrefix: @"/"] == NO)
{ {
[m appendString: @"/"]; [m appendString: @"/"];