From nobody@FreeBSD.org  Sat Oct 22 12:44:58 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 10F2F16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 22 Oct 2005 12:44:58 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D378143D46
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 22 Oct 2005 12:44:57 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9MCivJs045129
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 22 Oct 2005 12:44:57 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9MCivrk045118;
	Sat, 22 Oct 2005 12:44:57 GMT
	(envelope-from nobody)
Message-Id: <200510221244.j9MCivrk045118@www.freebsd.org>
Date: Sat, 22 Oct 2005 12:44:57 GMT
From: "Jukka A. Ukkonen" <jau@iki.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: fetch should have options to set http "if-modified-since"
X-Send-Pr-Version: www-2.3

>Number:         87841
>Category:       bin
>Synopsis:       fetch(1) should have options to set http "if-modified-since"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 22 12:50:12 GMT 2005
>Closed-Date:    Wed Aug 04 02:36:13 UTC 2010
>Last-Modified:  Wed Aug 04 02:36:13 UTC 2010
>Originator:     Jukka A. Ukkonen
>Release:        4.11-STABLE
>Organization:
provate citizen
>Environment:
FreeBSD mjolnir 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed Sep 21 07:56:19 EET DST 2005     jau@mjolnir:/home/src/sys/compile/Mjolnir  i386
>Description:
              Quite often there is a need to fetch a new copy of a file only when
the source file to be copied over has changed since the local version was last
updated.
To avoid an unnecessary fetch over http(s) it would be useful to add two new
command line options to fetch.
- One to specify the time to use in the if-modified-since header of the request
directly from the command line.
- Another to specify a reference file whose modify time to use as the content
of the if-modified-since request header.

None of this of course would work for ftp, but for http and https it would be
a major benefit to be able to avoid pointless downloads when the local data
is already as fresh as the data that would be pulled in.
When fetching with http or https over a long distance connection the amount of
time saved could be huge.

>How-To-Repeat:
              Just copy a few large files over a long distance connection using
fetch when your local copy is already as fresh as the one you receive, and you
should instantly understand why I am proposing this.

>Fix:
              The only known fix is to add the if-modified-since header and
ability to parse to the potential "not modified" response.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sat Jun 23 15:58:48 UTC 2007 
Responsible-Changed-Why:  

Over to fetch(1) maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87841 

From: "Murray Stokely" <murray.stokely@gmail.com>
To: bug-followup@freebsd.org, jau@iki.fi
Cc:  
Subject: Re: bin/87841: fetch(1) should have options to set http "if-modified-since"
Date: Tue, 9 Dec 2008 23:24:11 -0800

 Jukka, if you are still interested in this, please try this patch
 against FreeBSD 6.4.  Apply from /usr/src, then cd
 /usr/src/lib/libfetch; make all install; cd /usr/src/usr.bin/fetch;
 make all install
 
 http://people.freebsd.org/~murray/patches/fetch-if-modified-since-6.4.diff
 
        - Murray
State-Changed-From-To: open->patched 
State-Changed-By: murray 
State-Changed-When: Mon Dec 15 08:28:00 UTC 2008 
State-Changed-Why:  
This change has been committed to HEAD.  Will MFC to 7.x after 7.1 is 
released. 



Responsible-Changed-From-To: des->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Mon Dec 15 08:28:00 UTC 2008 
Responsible-Changed-Why:  
This change has been committed to HEAD.  Will MFC to 7.x after 7.1 is 
released. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=87841 

From: "Murray Stokely" <murray.stokely@gmail.com>
To: bug-followup@freebsd.org, jau@iki.fi
Cc:  
Subject: Re: bin/87841: fetch(1) should have options to set http "if-modified-since"
Date: Sat, 10 Jan 2009 17:47:01 -0800

 This has been merged to FreeBSD 7.x-STABLE.  Will also merge it soon to 6.x.
 
 Murray
State-Changed-From-To: patched->closed 
State-Changed-By: linimon 
State-Changed-When: Wed Aug 4 02:34:31 UTC 2010 
State-Changed-Why:  
Murray has returned his src bit for safekeeping. 

With the EOL of 6.x rapidly approaching, I'm just going to go ahead and 
close this with my bugmeister's hat on. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87841 
>Unformatted:
