summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-03 00:43:37 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-03 00:46:51 +0200
commit3c986b75f5705b37833d15353aad9a8db6d7b65b (patch)
tree02a264905a4aa14ed76cb2ac340b42722c8525f2
parent83bcd0b895016c058807e71e102c54d2fab44339 (diff)
downloadgnu-guix-3c986b75f5705b37833d15353aad9a8db6d7b65b.tar
gnu-guix-3c986b75f5705b37833d15353aad9a8db6d7b65b.tar.gz
ftp-client: Add missing CR in "USER" command.
* guix/ftp-client.scm (%ftp-login): Add #\return before #\newline. Fixes access to some FTP servers, such as ftp://invisible-island.net ("ProFTPD 1.3.4a Server").
-rw-r--r--guix/ftp-client.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm
index dd9135e95a..761980ac8f 100644
--- a/guix/ftp-client.scm
+++ b/guix/ftp-client.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2010, 2011, 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2010, 2011, 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -73,7 +73,8 @@
(throw 'ftp-error port command code message))))
(define (%ftp-login user pass port)
- (let ((command (string-append "USER " user (string #\newline))))
+ (let ((command (string-append "USER " user
+ (string #\return) (string #\newline))))
(display command port)
(let-values (((code message) (%ftp-listen port)))
(case code