source@mandoc.bsd.lv
 help / color / Atom feed
* cvsweb: Enforce our global policy of "UTF-8 only".
@ 2019-11-29 19:30 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-11-29 19:30 UTC (permalink / raw)
  To: source

Log Message:
-----------
Enforce our global policy of "UTF-8 only".  This is 2019.

Modified Files:
--------------
    cvsweb:
        README
        TODO
        cvsweb.cgi
        cvsweb.conf

Revision Data
-------------
Index: cvsweb.conf
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/cvsweb.conf,v
retrieving revision 4.25
retrieving revision 4.26
diff -Lcvsweb.conf -Lcvsweb.conf -u -p -r4.25 -r4.26
--- cvsweb.conf
+++ cvsweb.conf
@@ -210,28 +210,6 @@ $hr_ignkeysubst = 1;
 #
 $mime_types = '/conf/mime.types';
 
-# Charset appended to the Content-Type HTTP header for text/* MIME types.
-# Note that the web server may default to some charset which may take effect
-# if you leave this parameter empty or unset.
-# For Apache, see also the AddDefaultCharset directive.
-#
-$charset = '';
-
-# e.g.
-#$charset = $where =~ m,/ru[/_-], ? 'koi8-r'
-#  : $where =~ m,/zh[/_-], ? 'big5'
-#  : $where =~ m,/ja[/_-], ? 'x-euc-jp'
-#  : $where =~ m,/ko[/_-], ? 'x-euc-kr'
-#  : 'iso-8859-1';
-
-# Output filter
-#
-$output_filter = '';
-
-# e.g.
-## unify/convert Japanese code into EUC-JP
-#$output_filter= '/usr/local/bin/nkf -e';
-
 ##############
 # Misc
 ##############
Index: TODO
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/TODO,v
retrieving revision 4.4
retrieving revision 4.5
diff -LTODO -LTODO -u -p -r4.4 -r4.5
--- TODO
+++ TODO
@@ -31,6 +31,3 @@ o Find out if it is feasible to provide 
 o Recursive diffs, including support for tags/branches/dates.
 
 o Support for dates in tarballs/zips (in addition to tags/branches).
-
-o Make it possible to pass media type parameters with the content-type
-  query string parameter, for example "Content-Type: text/html; charset=utf-8".
Index: README
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/README,v
retrieving revision 4.8
retrieving revision 4.9
diff -LREADME -LREADME -u -p -r4.8 -r4.9
--- README
+++ README
@@ -67,8 +67,6 @@ o Customizable repository entry order.
 
 o Location text field.
 
-o Support for the use of localized charsets.
-
 o Workaround for buggy web servers.
 
 o Numerous bugfixes regarding URI/filename manipulation.
Index: cvsweb.cgi
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/cvsweb.cgi,v
retrieving revision 4.37
retrieving revision 4.38
diff -Lcvsweb.cgi -Lcvsweb.cgi -u -p -r4.37 -r4.38
--- cvsweb.cgi
+++ cvsweb.cgi
@@ -66,7 +66,7 @@ use vars qw (
   $is_links $is_lynx $is_w3m $is_msie $is_mozilla3 $is_textbased
   %input $query $barequery $sortby $bydate $byrev $byauthor
   $bylog $byfile $defaultDiffType $logsort $cvstree $cvsroot
-  $charset $output_filter %CMD $allow_compress $backicon $diricon $fileicon
+  %CMD $allow_compress $backicon $diricon $fileicon
   $fullname $logo $defaulttitle $address $binfileicon $iconsdir
   $shortLogLen $show_author $hr_breakable $hr_ignwhite $hr_ignkeysubst
   $mime_types $allow_annotate $allow_markup $allow_mailtos
@@ -149,7 +149,6 @@ sub search_path($);
 sub getMimeType($;$);
 sub head($;$);
 sub scan_directives(@);
-sub openOutputFilter();
 sub doAnnotate($$);
 sub doCheckout($$$);
 sub cvswebMarkup($$$$$$;$);
@@ -1630,18 +1629,6 @@ sub scan_directives(@)
 }
 
 
-sub openOutputFilter()
-{
-  return unless $output_filter;
-
-  open(STDOUT, "|-") and return;
-
-  # child of child
-  open(STDERR, '>', devnull()) unless $DEBUG;
-  exec($output_filter) or exit -1;
-}
-
-
 ###############################
 # show Annotation
 ###############################
@@ -2081,7 +2068,6 @@ sub doDiff($$$$$$)
   my $fh = do { local (*FH); };
   if (!open($fh, "-|")) {    # child
     open(STDERR, ">&STDOUT");    # Redirect stderr to stdout
-    openOutputFilter();
     exec($CMD{rcsdiff}, @rcsdiff_options, @difftype, "-r$rev1", "-r$rev2",
          $fullname) or exit -1;
   }
@@ -2188,7 +2174,6 @@ sub getDirLogs($$@)
   my $fh = do { local (*FH); };
   if (!open($fh, '-|')) {                       # Child
     open(STDERR, '>', devnull()) unless $DEBUG; # Ignore rlog's complaints.
-    openOutputFilter();
     if ($file_list_len && $file_list_len > 1) {
       while (scalar(@files) > $file_list_len) {  # Process files in chunks.
         system(@cmd, splice(@files, 0, $file_list_len)) == 0 or exit -1;
@@ -2366,7 +2351,6 @@ sub readLog($;$)
 
   my $fh = do { local (*FH); };
   if (!open($fh, "-|")) {    # child
-    openOutputFilter();
     $revision = defined($revision) ? "-r$revision" : '';
     if ($revision =~ /\./) {
       # Normal revision, not a branch/tag name.
@@ -3579,9 +3563,7 @@ sub http_header(;$$)
 {
   my ($content_type, $moddate) = @_;
   $content_type ||= 'text/html';
-
-  $content_type .= "; charset=$charset"
-    if ($charset && $content_type =~ m,^text/,);
+  $content_type .= '; charset="UTF-8"' if $content_type =~ /^text\//;
 
   # Note that in the following, we explicitly join() and concatenate the
   # headers instead of printing them as an array.  This is because some
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 19:30 cvsweb: Enforce our global policy of "UTF-8 only" schwarze

source@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-source

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.source


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git