FreeBSD Bugzilla – Attachment 16388 Details for
Bug 30054
ftp(1)'s fetch.c could easily have vhost support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.32 KB, created by
Joseph Mallett
on 2001-08-24 21:00:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Joseph Mallett
Created:
2001-08-24 21:00:00 UTC
Size:
1.32 KB
patch
obsolete
>--- /usr/src/usr.bin/ftp/fetch.c Wed Jan 31 08:24:39 2001 >+++ fetch.c Fri Aug 24 19:49:29 2001 >@@ -104,7 +104,7 @@ > char *port; > volatile int s; > size_t len; >- char c, *cp, *ep, *portnum, *path, buf[4096]; >+ char c, *cp, *ep, *http_buffer, *portnum, *path, buf[4096]; > const char *savefile; > char *line, *proxy, *host; > volatile sig_t oldintr; >@@ -280,12 +280,19 @@ > printf("Requesting %s\n", origline); > else > printf("Requesting %s (via %s)\n", origline, proxyenv); >- len = snprintf(buf, sizeof(buf), "GET %s%s HTTP/1.0\r\n\r\n", >- proxy ? "" : "/", path); >- if (write(s, buf, len) < len) { >+ len = asprintf(&http_buffer, "GET %s%s HTTP/1.0\r\nHost: %s\r\n\r\n", >+ proxy ? "" : "/", path, host); >+ if (len == -1) { >+ warn("Allocating space for HTTP request"); >+ goto cleanup_url_get; >+ } >+ if (write(s, http_buffer, len) < len) { > warn("Writing HTTP request"); >+ if (http_buffer != NULL) >+ free(http_buffer); > goto cleanup_url_get; > } >+ free(http_buffer); > memset(buf, 0, sizeof(buf)); > for (cp = buf; cp < buf + sizeof(buf); ) { > if (read(s, cp, 1) != 1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 30054
: 16388