[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.123 and 1.124

version 1.123, 2014/07/05 09:20:54 version 1.124, 2014/07/11 03:31:52
Line 884 
Line 884 
                         ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n"                          ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n"
                             "Proxy-Authorization: Basic %s%s\r\n%s\r\n\r\n",                              "Proxy-Authorization: Basic %s%s\r\n%s\r\n\r\n",
                             epath, credentials, buf ? buf : "",                              epath, credentials, buf ? buf : "",
                             HTTP_USER_AGENT);                              httpuseragent);
                 else                  else
                         ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n%s%s\r\n\r\n",                          ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n%s%s\r\n\r\n",
                             epath, buf ? buf : "", HTTP_USER_AGENT);                              epath, buf ? buf : "", httpuseragent);
   
         } else {          } else {
 #ifndef SMALL  #ifndef SMALL
Line 945 
Line 945 
                         ftp_printf(fin, ssl, ":%s", port);                          ftp_printf(fin, ssl, ":%s", port);
 #endif /* !SMALL */  #endif /* !SMALL */
                 ftp_printf(fin, ssl, "\r\n%s%s\r\n\r\n",                  ftp_printf(fin, ssl, "\r\n%s%s\r\n\r\n",
                     buf ? buf : "", HTTP_USER_AGENT);                      buf ? buf : "", httpuseragent);
                 if (verbose)                  if (verbose)
                         fprintf(ttyout, "\n");                          fprintf(ttyout, "\n");
         }          }
Line 1284 
Line 1284 
         char *cp, *url, *host, *dir, *file, *portnum;          char *cp, *url, *host, *dir, *file, *portnum;
         char *username, *pass, *pathstart;          char *username, *pass, *pathstart;
         char *ftpproxy, *httpproxy;          char *ftpproxy, *httpproxy;
   #ifndef SMALL
           char *uagent = NULL;
   #endif /* !SMALL */
         int rval, xargc;          int rval, xargc;
         volatile int argpos;          volatile int argpos;
         int dirhasglob, filehasglob, oautologin;          int dirhasglob, filehasglob, oautologin;
Line 1304 
Line 1307 
         if ((httpproxy = getenv(HTTP_PROXY)) != NULL && *httpproxy == '\0')          if ((httpproxy = getenv(HTTP_PROXY)) != NULL && *httpproxy == '\0')
                 httpproxy = NULL;                  httpproxy = NULL;
   
           if (httpuseragent == NULL)
                   httpuseragent = HTTP_USER_AGENT;
   #ifndef SMALL
           else
                   uagent = httpuseragent;
   #endif /* !SMALL */
   
         /*          /*
          * Loop through as long as there's files to fetch.           * Loop through as long as there's files to fetch.
          */           */
Line 1580 
Line 1590 
         }          }
         if (connected && rval != -1)          if (connected && rval != -1)
                 disconnect(0, NULL);                  disconnect(0, NULL);
   #ifndef SMALL
           free(uagent);
   #endif /* !SMALL */
         return (rval);          return (rval);
 }  }
   

Legend:
Removed from v.1.123  
changed lines
  Added in v.1.124