mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
fix #31153
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31454 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5c568fd7bb
commit
4cfbd4b8c6
3 changed files with 46 additions and 14 deletions
|
@ -670,8 +670,11 @@ static unsigned urlAlign;
|
|||
{
|
||||
/* RFC 2396 'reserved' characters ...
|
||||
* as modified by RFC2732
|
||||
* static const char *reserved = ";/?:@&=+$,[]";
|
||||
*/
|
||||
static const char *reserved = ";/?:@&=+$,[]";
|
||||
/* Same as reserved set but allow the hash character in a path too.
|
||||
*/
|
||||
static const char *filepath = ";/?:@&=+$,[]#";
|
||||
|
||||
if ([aUrlString isKindOfClass: [NSString class]] == NO)
|
||||
{
|
||||
|
@ -990,7 +993,7 @@ static unsigned urlAlign;
|
|||
if (buf->fragment == 0 && base != 0)
|
||||
{
|
||||
buf->fragment = base->fragment;
|
||||
if (legal(buf->fragment, reserved) == NO)
|
||||
if (legal(buf->fragment, filepath) == NO)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"[%@ %@](%@, %@) "
|
||||
|
@ -1019,7 +1022,7 @@ static unsigned urlAlign;
|
|||
if (buf->query == 0 && base != 0)
|
||||
{
|
||||
buf->query = base->query;
|
||||
if (legal(buf->query, reserved) == NO)
|
||||
if (legal(buf->query, filepath) == NO)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"[%@ %@](%@, %@) "
|
||||
|
@ -1048,7 +1051,7 @@ static unsigned urlAlign;
|
|||
if (buf->parameters == 0 && base != 0)
|
||||
{
|
||||
buf->parameters = base->parameters;
|
||||
if (legal(buf->parameters, reserved) == NO)
|
||||
if (legal(buf->parameters, filepath) == NO)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"[%@ %@](%@, %@) "
|
||||
|
@ -1086,7 +1089,7 @@ static unsigned urlAlign;
|
|||
{
|
||||
buf->hasNoPath = YES;
|
||||
}
|
||||
if (legal(buf->path, reserved) == NO)
|
||||
if (legal(buf->path, filepath) == NO)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"[%@ %@](%@, %@) "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue