[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.193 and 1.194

version 1.193, 2020/02/22 00:58:28 version 1.194, 2020/02/22 01:00:07
Line 730 
Line 730 
                                 restart_point = 0;                                  restart_point = 0;
                 }                  }
 #endif  /* SMALL */  #endif  /* SMALL */
                 if (credentials) {                  ftp_printf(fin,
                         ftp_printf(fin,                      "GET /%s HTTP/1.1\r\n"
                             "GET /%s HTTP/1.1\r\n"                      "Connection: close\r\n"
                             "Connection: close\r\n"                      "Host: ", epath);
                             "Authorization: Basic %s\r\n"  
                             "Host: ", epath, credentials);  
                         free(credentials);  
                         credentials = NULL;  
                 } else  
                         ftp_printf(fin,  
                             "GET /%s HTTP/1.1\r\n"  
                             "Connection: close\r\n"  
                             "Host: ", epath);  
                 if (proxyhost) {                  if (proxyhost) {
                         ftp_printf(fin, "%s", proxyhost);                          ftp_printf(fin, "%s", proxyhost);
                         port = NULL;                          port = NULL;
Line 776 
Line 767 
                 if (port && strcmp(port, "80") != 0)                  if (port && strcmp(port, "80") != 0)
                         ftp_printf(fin, ":%s", port);                          ftp_printf(fin, ":%s", port);
 #endif /* !NOSSL */  #endif /* !NOSSL */
                 ftp_printf(fin, "\r\n%s%s\r\n\r\n",                  ftp_printf(fin, "\r\n%s%s\r\n",
                     buf ? buf : "", httpuseragent);                      buf ? buf : "", httpuseragent);
                   if (credentials)
                           ftp_printf(fin, "Authorization: Basic %s\r\n",
                               credentials);
                   ftp_printf(fin, "\r\n");
         }          }
         free(epath);          free(epath);
   

Legend:
Removed from v.1.193  
changed lines
  Added in v.1.194