From owner-freebsd-cvsweb@FreeBSD.ORG Thu Apr 28 22:17:06 2005 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 214E816A4CE for ; Thu, 28 Apr 2005 22:17:06 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0F1B43D4C for ; Thu, 28 Apr 2005 22:17:03 +0000 (GMT) (envelope-from ubercoderus@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so434055rnf for ; Thu, 28 Apr 2005 15:17:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=TjPTiJeD7EOZdory4OigjSrnMpQ9aydk9jkh51g8hz104DJp3IhxfYax+9HrN9IgkuFy/HPBoyhu5kpMAgKtYJy/OfNyFdYq2/FQoEitFRFESW+P1tGiWx7xerYJp1Rc9fPPhYFwVSZp1FYJ09KzFNe/znsCkm3v5YA+yezIGTs= Received: by 10.38.97.4 with SMTP id u4mr2513997rnb; Thu, 28 Apr 2005 15:17:03 -0700 (PDT) Received: by 10.38.88.53 with HTTP; Thu, 28 Apr 2005 15:17:03 -0700 (PDT) Message-ID: Date: Thu, 28 Apr 2005 15:17:03 -0700 From: Allen Reese To: freebsd-cvsweb@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3319_13475196.1114726623379" Subject: Patch to add html download link. X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Allen Reese List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2005 22:17:06 -0000 ------=_Part_3319_13475196.1114726623379 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello I store html files in a cvs repository that we access via cvsweb. I find myself downloading the html file to open it in a web browser, or changing the link that I clicked on so I can just display the html file straight from cvsweb. I got sick of it and wrote a patch to get around this today. ;) The patch adds a html link between text & markup that passes the mimetype as text/html. ------=_Part_3319_13475196.1114726623379 Content-Type: application/octet-stream; name=cvsweb.cgi.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cvsweb.cgi.patch" --- cvsweb.cgi 2005-04-27 15:46:21.172132600 -0700 +++ cvsweb.cgi.new.pl 2005-04-27 15:46:15.875189800 -0700 @@ -2925,6 +2925,8 @@ my @vlinks = (); push(@vlinks, display_link($fileurl, $_, 'text', 'text/plain')) unless $isbin; + push(@vlinks, display_link($fileurl, $_, 'html', 'text/html')) + unless $isbin; push(@vlinks, display_link($fileurl, $_, 'markup', 'text/x-cvsweb-markup')) if ($allow_markup && $inlogview && (!$isbin || viewable($mimetype))); if (!$isbin && $allow_annotate) { ------=_Part_3319_13475196.1114726623379--