Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp work around bug in apache 1.3.9 which incorrectl...
details: https://anonhg.NetBSD.org/src/rev/79d23709a022
branches: trunk
changeset: 481249:79d23709a022
user: lukem <lukem%NetBSD.org@localhost>
date: Tue Jan 25 07:13:45 2000 +0000
description:
work around bug in apache 1.3.9 which incorrectly puts a trailing
space after the chunksize.
noted by Jun-ichiro itojun Hagino <itojun%itojun.org@localhost> in [bin/9096]
diffstat:
usr.bin/ftp/fetch.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r da280cb9b819 -r 79d23709a022 usr.bin/ftp/fetch.c
--- a/usr.bin/ftp/fetch.c Tue Jan 25 06:53:26 2000 +0000
+++ b/usr.bin/ftp/fetch.c Tue Jan 25 07:13:45 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.102 1999/12/21 13:00:18 lukem Exp $ */
+/* $NetBSD: fetch.c,v 1.103 2000/01/25 07:13:45 lukem Exp $ */
/*-
* Copyright (c) 1997-1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.102 1999/12/21 13:00:18 lukem Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.103 2000/01/25 07:13:45 lukem Exp $");
#endif /* not lint */
/*
@@ -376,7 +376,7 @@
thost, desc, origurl);
goto cleanup_parse_url;
}
- len = ep - cp; /* change `[xxx]' -> `xxx' */
+ len = ep - cp; /* change `[xyz]' -> `xyz' */
memmove(thost, thost + 1, len);
thost[len] = '\0';
if (! isipv6addr(thost)) {
@@ -1182,6 +1182,15 @@
goto cleanup_fetch_url;
}
chunksize = strtol(xferbuf, &ep, 16);
+
+ /*
+ * XXX: Work around bug in Apache 1.3.9, which
+ * incorrectly puts a trailing space after
+ * the chunksize.
+ */
+ if (*ep == ' ')
+ ep++;
+
if (strcmp(ep, "\r\n") != 0) {
warnx("Unexpected data following chunksize");
goto cleanup_fetch_url;
Home |
Main Index |
Thread Index |
Old Index