bugGNUstep - Bugs: bug #26348, NSURL and GSFTPURLHandle problems...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #26348: NSURL and GSFTPURLHandle problems with spaces and banners

Submitted by:  Manuel Guesdon <mguesdon>
Submitted on:  Sun 26 Apr 2009 12:04:40 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 29 Apr 2009 09:55:43 AM UTC, comment #2:

Thank you. It's ok now for Banner handling.
For space in URL, I'll escape it before :-)

This functionality works as expected, this is not a bug.

Manuel Guesdon <mguesdon>
Project Member
Sun 26 Apr 2009 01:50:59 PM UTC, comment #1:

I added code which should support the full multiline response syntax, which should fix the problem with the banner. please test and let me know.

As far as the exception is concerned, the text 'ftp://ppftpuser:welcome@ftp01.penguingroup.com/Booksellers and Media/Covers/Covers/0143058436.jpg' is not a URL (according to RFC-1738, which says 'The space character is unsafe' and 'All unsafe characters must always be encoded within a URL'
So the exception seems to be correct.

Of course, it may be the case that MacOS-X behaves differently ... if so we might want to alter behavior to match for compatibility.

Richard Frith-Macdonald <CaS>
Project Member
Sun 26 Apr 2009 12:04:40 PM UTC, original submission:

NSURL throw an exception for url with spaces like:
ftp://ppftpuser:welcome@ftp01.penguingroup.com/Booksellers and Media/Covers/Covers/0143058436.jpg
("illegal character in path part")

GSFTPURLHandle doesn't not handle FTP Banner connect answer like the following one (I used the same URL):
<<
220-

Welcome to the Pearson ftp server ftp01.penguinputnam.com.

Please note that file times are based on GMT.

THE USE OF THIS SERVER IS RESTRICTED TO PEARSON ACTIVITIES ONLY.
ALL ACTIVITY ON THIS SERVER IS LOGGED. IF YOU DISAGREE WITH
THIS POLICY, PLEASE DISCONNECT NOW.

All unauthorized activity involving this server is subject to
criminal investigation.

You are permitted to use the materials posted on this site only
to market and promote the books identified. You may not license
these materials to or otherwise authorize use by third parties,
or incorporate any part of these materials in any new or different
work. Any use in breach of these restrictions is copyright
infringement.

The publisher has provided these materials without charge for
promotional purposes only. It is a violation of copyright to
alter or manipulate these materials in any way, or to charge
for their use.

220 165.193.130.66 FTP server ready

>>


A quick and dirty fix is replacing
<<
while ((line = [enumerator nextObject]) != nil)
{
if ([line length] > 4 && [line characterAtIndex: 3] != '-')
{
break;
}
}

>>

by
<<
while ((line = [enumerator nextObject]) != nil)
{
if ([line length] > 4 && [line characterAtIndex: 3] != '-')
{
if (state == cConnect && [line hasPrefix:@" "])
{
}
else
break;
}
}

>>

in -_control:
but the problem may come for server answers during other states.

Manuel Guesdon <mguesdon>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by mguesdon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 29 Apr 2009 09:55:43 AM UTCmguesdonOpen/ClosedIn Test=>Closed
    Sun 26 Apr 2009 01:50:59 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1