Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Apr 2005 15:17:03 -0700
From:      Allen Reese <ubercoderus@gmail.com>
To:        freebsd-cvsweb@freebsd.org
Subject:   Patch to add html download link.
Message-ID:  <a7ae16fa05042815173f25c1ad@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
------=_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--


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a7ae16fa05042815173f25c1ad>