[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.35 and 1.36

version 1.35, 2001/10/03 18:49:39 version 1.36, 2001/10/27 10:31:27
Line 349 
Line 349 
                 if (verbose)                  if (verbose)
                         fprintf(ttyout, "Requesting %s (via %s)\n",                          fprintf(ttyout, "Requesting %s (via %s)\n",
                             origline, proxyenv);                              origline, proxyenv);
                 snprintf(buf, sizeof(buf), "GET %s HTTP/1.0\r\n\r\n", path);                  snprintf(buf, sizeof(buf), "GET %s HTTP/1.0\r\n%s\r\n\r\n", path, HTTP_USER_AGENT);
         } else {          } else {
                 if (verbose)                  if (verbose)
                         fprintf(ttyout, "Requesting %s\n", origline);                          fprintf(ttyout, "Requesting %s\n", origline);
Line 369 
Line 369 
                          */                           */
                         if (port && strcmp(port, "80") != 0)                          if (port && strcmp(port, "80") != 0)
                                 snprintf(buf, sizeof(buf),                                  snprintf(buf, sizeof(buf),
                                     "GET /%s HTTP/1.0\r\nHost: [%s]:%s\r\n\r\n",                                      "GET /%s HTTP/1.0\r\nHost: [%s]:%s\r\n%s\r\n\r\n",
                                     path, h, port);                                      path, h, port, HTTP_USER_AGENT);
                         else                          else
                                 snprintf(buf, sizeof(buf),                                  snprintf(buf, sizeof(buf),
                                     "GET /%s HTTP/1.0\r\nHost: [%s]\r\n\r\n",                                      "GET /%s HTTP/1.0\r\nHost: [%s]\r\n%s\r\n\r\n",
                                     path, h);                                      path, h, HTTP_USER_AGENT);
                         free(h);                          free(h);
                 } else {                  } else {
                         if (port && strcmp(port, "80") != 0)                          if (port && strcmp(port, "80") != 0)
                                 snprintf(buf, sizeof(buf),                                  snprintf(buf, sizeof(buf),
                                     "GET /%s HTTP/1.0\r\nHost: %s:%s\r\n\r\n",                                      "GET /%s HTTP/1.0\r\nHost: %s:%s\r\n%s\r\n\r\n",
                                     path, host, port);                                      path, host, port, HTTP_USER_AGENT);
                         else                          else
                                 snprintf(buf, sizeof(buf),                                  snprintf(buf, sizeof(buf),
                                     "GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n",                                      "GET /%s HTTP/1.0\r\nHost: %s\r\n%s\r\n\r\n",
                                     path, host);                                      path, host, HTTP_USER_AGENT);
                 }                  }
         }          }
         len = strlen(buf);          len = strlen(buf);

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36