bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #26348] NSURL and GSFTPURLHandle problems with spaces and banners


From: Manuel Guesdon
Subject: [bug #26348] NSURL and GSFTPURLHandle problems with spaces and banners
Date: Sun, 26 Apr 2009 12:04:42 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5

URL:
  <http://savannah.gnu.org/bugs/?26348>

                 Summary: NSURL and GSFTPURLHandle problems with spaces and
banners
                 Project: GNUstep
            Submitted by: mguesdon
            Submitted on: dim 26 avr 2009 14:04:40 CEST
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?26348>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]