[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.73 and 1.74

version 1.73, 2007/04/17 14:58:51 version 1.74, 2007/06/13 13:52:26
Line 448 
Line 448 
         /*          /*
          * Construct and send the request. Proxy requests don't want leading /.           * Construct and send the request. Proxy requests don't want leading /.
          */           */
   #ifndef SMALL
           cookie_get(host, path, ishttpsurl, &buf);
   #endif
         if (proxyurl) {          if (proxyurl) {
                 if (verbose)                  if (verbose)
                         fprintf(ttyout, " (via %s)\n", proxyenv);                          fprintf(ttyout, " (via %s)\n", proxyenv);
Line 457 
Line 460 
                  */                   */
                 if (cookie)                  if (cookie)
                         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\r\n%s\r\n\r\n",                              "Proxy-Authorization: Basic %s%s\r\n%s\r\n\r\n",
                             path, cookie, HTTP_USER_AGENT);                              path, cookie, buf ? buf : "", HTTP_USER_AGENT);
                 else                  else
                         ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n%s\r\n\r\n",                          ftp_printf(fin, ssl, "GET %s HTTP/1.0\r\n%s%s\r\n\r\n",
                             path, HTTP_USER_AGENT);                              path, buf ? buf : "", HTTP_USER_AGENT);
   
         } else {          } else {
                 ftp_printf(fin, ssl, "GET /%s HTTP/1.0\r\nHost: ", path);                  ftp_printf(fin, ssl, "GET /%s HTTP/1.0\r\nHost: ", path);
Line 494 
Line 497 
                 if (port && strcmp(port, "80") != 0)                  if (port && strcmp(port, "80") != 0)
                         ftp_printf(fin, ssl, ":%s", port);                          ftp_printf(fin, ssl, ":%s", port);
 #endif  #endif
                 ftp_printf(fin, ssl, "\r\n%s\r\n\r\n", HTTP_USER_AGENT);                  ftp_printf(fin, ssl, "\r\n%s%s\r\n\r\n",
                       buf ? buf : "", HTTP_USER_AGENT);
                 if (verbose)                  if (verbose)
                         fprintf(ttyout, "\n");                          fprintf(ttyout, "\n");
         }          }
   
   
   #ifndef SMALL
           free(buf);
   #endif
           buf = NULL;
   
         if (fin != NULL && fflush(fin) == EOF) {          if (fin != NULL && fflush(fin) == EOF) {
                 warn("Writing HTTP request");                  warn("Writing HTTP request");
                 goto cleanup_url_get;                  goto cleanup_url_get;

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74