summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1998-05-09 20:50:37 +0000
committerwollman <wollman@FreeBSD.org>1998-05-09 20:50:37 +0000
commit845ecc3d6bfe0df4d65bcd77ea634fa6c143583d (patch)
treedb4b4a0e69c2117ee92e986c492de5398d640ef1 /usr.bin/fetch
parent0bee450feaf8a00c798459b0edd4cd68e44f58df (diff)
downloadFreeBSD-src-845ecc3d6bfe0df4d65bcd77ea634fa6c143583d.zip
FreeBSD-src-845ecc3d6bfe0df4d65bcd77ea634fa6c143583d.tar.gz
Documentation fix: delete references to T/TCP as they are not relevant
to the case in question. (Said case being quite clearly defined by the basic TCP specification, RFC 792.)
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/fetch.133
-rw-r--r--usr.bin/fetch/http.c15
2 files changed, 36 insertions, 12 deletions
diff --git a/usr.bin/fetch/fetch.1 b/usr.bin/fetch/fetch.1
index ee25412..71d2150 100644
--- a/usr.bin/fetch/fetch.1
+++ b/usr.bin/fetch/fetch.1
@@ -1,4 +1,4 @@
-.\" $Id: fetch.1,v 1.20 1998/03/23 07:43:02 charnier Exp $
+.\" $Id: fetch.1,v 1.21 1998/05/09 07:33:09 fenner Exp $
.Dd July 2, 1996
.Dt FETCH 1
.Os FreeBSD 2.2
@@ -100,9 +100,9 @@ under any circumstances, even if the transfer failed or was incomplete.
.It Fl r
Restart a previously interrupted transfer.
.It Fl t
-Ensure that the use of T/TCP is not attempted for connections. This is
-used to workaround bugs in some remote OS stacks that give improper
-replies to T/TCP connections.
+Work around a different set of buggy
+.Tn TCP
+implementations.
.It Fl T Ar seconds
Set timeout value to
.Ar seconds.
@@ -198,7 +198,7 @@ realm is specified as
.Sq Li \&* ,
then it will match all realms not specified otherwise.
.Pp
-For the
+The
.Li basic
authentication scheme uses two additional optional parameters; the
first is a user name, and the second is the password associated with
@@ -328,6 +328,27 @@ authentication mode is implemented for
.Tn HTTP .
This should be replaced by digest authentication.
.Pp
+Some
+.Tn TCP
+implementations (other than
+.Fx )
+fail to correctly implement cases where the
+.Dv SYN
+and/or
+.Dv FIN
+control flags are specified in packets which also contain data.
The
+.Sq Fl t
+flag works around the latter deficiency and the
+.Sq Fl b
+flag works around the former. Since these are errors of the server's
+.Tn TCP
+stack, the best we can do is provide these workarounds. Given a correct
+server, an optimal
+.Tn HTTP
+transfer without
+.Fl t
+and
.Fl b
-flag should not be necessary.
+involves a minimum of two round trips (for small replies), one less than
+other implementations.
diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c
index 0c87209..7b9cb50 100644
--- a/usr.bin/fetch/http.c
+++ b/usr.bin/fetch/http.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: http.c,v 1.16 1997/11/22 01:00:42 fenner Exp $
+ * $Id: http.c,v 1.17 1998/02/20 05:11:40 jb Exp $
*/
#include <sys/types.h>
@@ -594,11 +594,14 @@ retry:
setup_sigalrm();
alarm(timo);
- /* some hosts do not properly handle T/TCP connections. If
- * sendmsg() is used to establish the connection, the OS may
- * choose to try to use one which could cause the transfer
- * to fail. Doing a connect() first ensures that the OS
- * does not attempt T/TCP.
+ /*
+ * Some hosts do not correctly handle data in SYN segments.
+ * If no connect(2) is done, the TCP stack will send our
+ * initial request as such a segment. fs_use_connect works
+ * around these broken server TCPs by avoiding this case.
+ * It is not the default because we want to exercise this
+ * code path, and in any case the majority of hosts handle
+ * our default correctly.
*/
if (fs->fs_use_connect && (connect(s, (struct sockaddr *)&sin,
sizeof(struct sockaddr_in)) < 0)) {
OpenPOWER on IntegriCloud