mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Add tests and modifications to pass them
This commit is contained in:
parent
86276f0c7f
commit
213344d862
2 changed files with 18 additions and 7 deletions
|
@ -2408,6 +2408,7 @@ GS_PRIVATE_INTERNAL(NSURLComponents)
|
|||
// Regenerate URL when components are changed...
|
||||
- (void) _regenerateURL
|
||||
{
|
||||
NSURL *u;
|
||||
NSMutableString *urlString;
|
||||
NSString *component;
|
||||
NSUInteger location;
|
||||
|
@ -2516,8 +2517,20 @@ GS_PRIVATE_INTERNAL(NSURLComponents)
|
|||
internal->_rangeOfFragment = NSMakeRange(location, len);
|
||||
location += len;
|
||||
}
|
||||
|
||||
u = [[NSURL alloc] initWithScheme: [self scheme]
|
||||
user: [self user]
|
||||
password: [self password]
|
||||
host: [self host]
|
||||
port: [self port]
|
||||
fullPath: [self path]
|
||||
parameterString: nil
|
||||
query: [self percentEncodedQuery]
|
||||
fragment: [self fragment]];
|
||||
ASSIGNCOPY(internal->_url, u);
|
||||
RELEASE(u);
|
||||
|
||||
ASSIGNCOPY(internal->_url, [NSURL URLWithString: urlString]);
|
||||
// ASSIGNCOPY(internal->_url, [NSURL URLWithString: urlString]);
|
||||
internal->_dirty = NO;
|
||||
RELEASE(urlString);
|
||||
}
|
||||
|
@ -2623,7 +2636,7 @@ GS_PRIVATE_INTERNAL(NSURLComponents)
|
|||
while ((item = (NSURLQueryItem *)[en nextObject]) != nil)
|
||||
{
|
||||
NSString *name = [item name];
|
||||
NSString *value = [[item value] _stringByAddingPercentEscapesForQuery];
|
||||
NSString *value = [item value];
|
||||
NSString *itemString = [NSString stringWithFormat: @"%@=%@",name,value];
|
||||
|
||||
if ([query length] > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue