diff options
Diffstat (limited to 'usr.bin/ftp/fetch.c')
-rw-r--r-- | usr.bin/ftp/fetch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index 2fc48ee..870c3ff 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; } |