this is sitting in my tree, any ok's or should I drop it? (actually I will remove the line 'This is at least the case with Apache 1.3.29.' which is inaccurate).
----- Forwarded message from Stuart Henderson <s...@spacehopper.org> ----- From: Stuart Henderson <s...@spacehopper.org> Date: Thu, 21 Jan 2010 22:34:32 +0000 To: Matthew Mulrooney <openbsd-2010.01...@matthew.mulrooney.ca> Cc: b...@openbsd.org User-Agent: slrn/0.9.9p1 (OpenBSD) Subject: Re: /usr/bin/ftp bug? In gmane.os.openbsd.misc, you wrote: >> In this case instead of ''ftp: File is already fully retrieved." the >> file from the server is appended to the already fully retrieved file. > > This sounds like bug 6289: > > http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6289 > > And there is a patch posted, but I've had no bites on that patch yet. > > Can you try applying this patch: > > http://marc.info/?l=openbsd-tech&m=126334218910936&w=4 We're a bit close to the 4.7 release to change to HTTP/1.1 now. I think we're at least as likely to hit a server or proxy that has trouble with 1.1 as we are to hit one which is confused at seeing a Host: header with 1.0, and there's not enough time to get a good breadth of testing amongst different servers. The bug fix for partial files makes sense to go in now I think. I've hit that before (while downloading multi-gig videos of slackathon talks ;-) I think the other parts of your diff could be revisited after release.. Here's a diff with the partial files fix from your diff with a few changes: fix ramdisk build, spaces->tabs, KNF comment formatting, use var != 0 rather than 0 != var in keeping with standard use in OpenBSD, use simpler English for the error. Index: fetch.c =================================================================== RCS file: /cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.97 diff -u -p -r1.97 fetch.c --- fetch.c 16 Oct 2009 12:28:04 -0000 1.97 +++ fetch.c 21 Jan 2010 22:30:04 -0000 @@ -671,6 +671,18 @@ again: switch (status) { case 200: /* OK */ #ifndef SMALL + /* + * When we request a partial file, and we receive an HTTP 200 + * it is a good indication that the server doesn't support + * range requests, and is about to send us the entire file. + * This is at least the case with Apache 1.3.29. + * If the restart_point == 0, then we are not actually + * a partial file, and an HTTP 200 is appropriate. + */ + if (resume && restart_point != 0) { + warnx("Server does not support resume."); + goto cleanup_url_get; + } case 206: /* Partial Content */ #endif /* !SMALL */ break; ----- End forwarded message -----