[BACK]Return to fetch.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/fetch.c between version 1.8 and 1.9

version 1.8, 1997/04/16 05:02:48 version 1.9, 1997/04/18 18:56:49
Line 244 
Line 244 
         }          }
         buf[buflen - 1] = '\0';         /* sanity */          buf[buflen - 1] = '\0';         /* sanity */
   
         /*          /* Look for the "Content-length: " header.  */
          * Look for the "Content-length: " header.  
          */  
 #define CONTENTLEN "Content-Length: "  #define CONTENTLEN "Content-Length: "
         for (cp = buf; *cp != '\0'; cp++) {          for (cp = buf; *cp != '\0'; cp++) {
                 if (tolower(*cp) == 'c' &&                  if (tolower(*cp) == 'c' &&
Line 433 
Line 431 
                         /* Look for [user:pass@]host[:port] */                          /* Look for [user:pass@]host[:port] */
                         user = host;                          user = host;
                         pass = strpbrk(user, ":@/");                          pass = strpbrk(user, ":@/");
                         if (pass == NULL || *pass == '/')                          if (pass == NULL || *pass == '/') {
                                   user = pass = NULL;
                                 goto parsed_url;                                  goto parsed_url;
                           }
                         if (*pass == '@') {                          if (*pass == '@') {
                                 warnx("Bad ftp URL: %s", argv[argpos]);                                  warnx("Bad ftp URL: %s", argv[argpos]);
                                 rval = argpos + 1;                                  rval = argpos + 1;
Line 467 
Line 467 
                 }                  }
   
                 /*                  /*
                  * If cp is NULL, the file wasn't specified                   * If dir is NULL, the file wasn't specified
                  * (URL looked something like ftp://host)                   * (URL looked something like ftp://host)
                  */                   */
                 if (dir != NULL)                  if (dir != NULL)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9