summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/fetch.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-08-20 14:46:40 +0000
committerBrian Somers <brian@FreeBSD.org>2001-08-20 14:46:40 +0000
commitcbe1d3b6307020778153ec838f67bbcd9f5b46b0 (patch)
treee5d043e9d5f4a4d826f6abc4af426f8e7b4410a0 /usr.bin/ftp/fetch.c
parent5f32890558c65f1b0e7a68ed17b2ce5f50058864 (diff)
Notes
Diffstat (limited to 'usr.bin/ftp/fetch.c')
-rw-r--r--usr.bin/ftp/fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c
index 2fc48eed4d9a..870c3ff54575 100644
--- a/usr.bin/ftp/fetch.c
+++ b/usr.bin/ftp/fetch.c
@@ -282,7 +282,7 @@ url_get(origline, proxyenv)
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) {
+ if (len < 0 || write(s, buf, len) < len) {
warn("Writing HTTP request");
goto cleanup_url_get;
}