summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/locale/isspace.36
-rw-r--r--lib/libfetch/common.c2
-rw-r--r--lib/libfetch/common.h2
-rw-r--r--lib/libfetch/fetch.324
-rw-r--r--lib/libfetch/fetch.c2
-rw-r--r--lib/libfetch/fetch.h2
-rw-r--r--lib/libfetch/file.c2
-rw-r--r--lib/libfetch/ftp.c9
-rw-r--r--lib/libfetch/http.c2
9 files changed, 31 insertions, 20 deletions
diff --git a/lib/libc/locale/isspace.3 b/lib/libc/locale/isspace.3
index f1e08d6..eab6cfc 100644
--- a/lib/libc/locale/isspace.3
+++ b/lib/libc/locale/isspace.3
@@ -47,16 +47,16 @@
.Sh DESCRIPTION
The
.Fn isspace
-function tests for the white-space characters.
+function tests for white-space characters.
For any locale, this includes the following standard characters:
.Pp
.Bl -column \&`\et''___ \&``\et''___ \&``\et''___ \&``\et''___ \&``\et''___ \&``\et''___
.It "\&``\et''\t``\en''\t``\ev''\t``\ef''\t``\er''\t`` ''"
.El
.Pp
-In the "C" locale
+In the "C" locale,
.Fn isspace
-successful test is limited to this characters only.
+returns non-zero for these characters only.
The value of the argument must be representable as an
.Vt "unsigned char"
or the value of
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index fefc4c5..f43ed0c 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libfetch/common.h b/lib/libfetch/common.h
index 05bee03..a353758 100644
--- a/lib/libfetch/common.h
+++ b/lib/libfetch/common.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3
index aaf1a8d..c5a7b31 100644
--- a/lib/libfetch/fetch.3
+++ b/lib/libfetch/fetch.3
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 1998-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 26, 2010
+.Dd September 27, 2011
.Dt FETCH 3
.Os
.Sh NAME
@@ -318,9 +318,19 @@ and
implement the FTP protocol as described in RFC959.
.Pp
If the
+.Ql P
+(not passive) flag is specified, an active (rather than passive)
+connection will be attempted.
+.Pp
+The
.Ql p
-(passive) flag is specified, a passive (rather than active) connection
-will be attempted.
+flag is supported for compatibility with earlier versions where active
+connections were the default.
+It has precedence over the
+.Ql P
+flag, so if both are specified,
+.Nm
+will use a passive connection.
.Pp
If the
.Ql l
@@ -475,9 +485,11 @@ connections will be bound.
.It Ev FTP_LOGIN
Default FTP login if none was provided in the URL.
.It Ev FTP_PASSIVE_MODE
-If set to anything but
+If set to
.Ql no ,
-forces the FTP code to use passive mode.
+forces the FTP code to use active mode.
+If set to any other value, forces passive mode even if the application
+requested active mode.
.It Ev FTP_PASSWORD
Default FTP password if the remote server requests one and none was
provided in the URL.
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c
index 5044fe3..9463df9 100644
--- a/lib/libfetch/fetch.c
+++ b/lib/libfetch/fetch.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998-2004 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libfetch/fetch.h b/lib/libfetch/fetch.h
index e620a01..277524c 100644
--- a/lib/libfetch/fetch.h
+++ b/lib/libfetch/fetch.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998-2004 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libfetch/file.c b/lib/libfetch/file.c
index dffaad8..cdf804c 100644
--- a/lib/libfetch/file.c
+++ b/lib/libfetch/file.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index 04ae07e..cf5ec09 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -633,13 +633,12 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file,
/* check flags */
low = CHECK_FLAG('l');
- pasv = CHECK_FLAG('p');
+ pasv = CHECK_FLAG('p') || !CHECK_FLAG('P');
verbose = CHECK_FLAG('v');
/* passive mode */
- if (!pasv)
- pasv = ((s = getenv("FTP_PASSIVE_MODE")) != NULL &&
- strncasecmp(s, "no", 2) != 0);
+ if ((s = getenv("FTP_PASSIVE_MODE")) != NULL)
+ pasv = (strncasecmp(s, "no", 2) != 0);
/* isolate filename */
filename = ftp_filename(file, &filenamelen, &type);
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index 309cbf2..a839c1b 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2000-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
OpenPOWER on IntegriCloud