[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.170 and 1.171

version 1.170, 2019/06/28 13:35:01 version 1.171, 2019/10/05 20:54:20
Line 97 
Line 97 
 jmp_buf httpabort;  jmp_buf httpabort;
   
 static int      redirect_loop;  static int      redirect_loop;
   static int      retried;
   
 /*  /*
  * Determine whether the character needs encoding, per RFC1738:   * Determine whether the character needs encoding, per RFC1738:
Line 782 
Line 783 
                 cp++;                  cp++;
   
         strlcpy(ststr, cp, sizeof(ststr));          strlcpy(ststr, cp, sizeof(ststr));
         status = strtonum(ststr, 200, 416, &errstr);          status = strtonum(ststr, 200, 503, &errstr);
         if (errstr) {          if (errstr) {
                 warnx("Error retrieving file: %s", cp);                  warnx("Error retrieving file: %s", cp);
                 goto cleanup_url_get;                  goto cleanup_url_get;
Line 821 
Line 822 
                 warnx("File is already fully retrieved.");                  warnx("File is already fully retrieved.");
                 goto cleanup_url_get;                  goto cleanup_url_get;
 #endif /* !SMALL */  #endif /* !SMALL */
           case 503:
                   if (retried++) {
                           warnx("Error retrieving file: %s", cp);
                           goto cleanup_url_get;
                   }
                   if (verbose)
                           fprintf(ttyout, "Retrying %s\n", origline);
                   rval = url_get(origline, proxyenv, savefile, lastfile);
                   goto cleanup_url_get;
         default:          default:
                 warnx("Error retrieving file: %s", cp);                  warnx("Error retrieving file: %s", cp);
                 goto cleanup_url_get;                  goto cleanup_url_get;
Line 1166 
Line 1176 
 #endif /* !NOSSL */  #endif /* !NOSSL */
                     strncasecmp(url, FILE_URL, sizeof(FILE_URL) - 1) == 0) {                      strncasecmp(url, FILE_URL, sizeof(FILE_URL) - 1) == 0) {
                         redirect_loop = 0;                          redirect_loop = 0;
                           retried = 0;
                         if (url_get(url, httpproxy, outfile, lastfile) == -1)                          if (url_get(url, httpproxy, outfile, lastfile) == -1)
                                 rval = argpos + 1;                                  rval = argpos + 1;
                         continue;                          continue;

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.171