Bug 26566

Summary: man.cgi fails to retrieve manpages with '.'
Product: Base System Reporter: clee <clee>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   

Description clee 2001-04-14 11:00:01 UTC
&man.sectionname.page in docbook/sgml converts to a hyperlink to
http://www.freebsd.org/cgi/man.cgi?sectionname(page) in HTML.

If sectionname has a period in it, man.cgi fails to retrieve the
manpage.  Normal queries to man.cgi through man.cgi?query=sectionname
works fine with '.'s.

See the named.conf(5) link in http://www.freebsd.org/handbook/dns.html for
an example.

Fix: 

Checked out www/en/cgi/man.cgi to attempt to fix problem, only to find:
#!/usr/bin/perl -T
# Copyright (c) Wolfram Schneider, Berlin. Sep 1997.
#
# FreeBSD man script
#
# $FreeBSD: www/en/cgi/man.cgi,v 1.5 2000/12/28 13:26:48 wosch Exp $

require '/usr/local/www/bsddoc/bin/man.cgi';

Drats.
How-To-Repeat: 
Try to get:
http://www.freebsd.org/cgi/man.cgi?named.conf(5)
Comment 1 dima 2001-04-14 22:51:24 UTC
clee@serenivision.com writes:
> 
> >Number:         26566
> >Category:       misc
> >Synopsis:       man.cgi fails to retrieve manpages with '.'
> 
> require '/usr/local/www/bsddoc/bin/man.cgi';

That script is over 1000 lines with umpteen references to external
sites and sources.  Not to mention that it's not in CVS.  I don't
think you want to touch it. :-)

That said, this is trivial to fix by making the stylesheets use the
correct interface to man.cgi.  Patch attached below.

Nik (cc'd), any objections to me checking this in?

					Dima Dorfman
					dima@unixfreak.org


Index: freebsd.dsl
===================================================================
RCS file: /st/src/FreeBSD/doc/en_US.ISO_8859-1/share/sgml/freebsd.dsl,v
retrieving revision 1.6
diff -u -r1.6 freebsd.dsl
--- freebsd.dsl	2001/03/24 09:42:02	1.6
+++ freebsd.dsl	2001/04/14 21:48:56
@@ -53,11 +53,8 @@
 
         <!-- Specify how to generate the man page link HREF -->
         (define ($create-refentry-xref-link$ refentrytitle manvolnum)
-          (string-append "http://www.FreeBSD.org/cgi/man.cgi?"
-                          refentrytitle
-                         "("
-                         manvolnum
-                         ")"))
+	  (string-append "http://www.FreeBSD.org/cgi/man.cgi?query="
+			 refentrytitle "&" "sektion=" manvolnum))
       ]]>
     </style-specification-body>
   </style-specification>
Comment 2 nik freebsd_committer freebsd_triage 2001-04-15 02:43:44 UTC
On Sat, Apr 14, 2001 at 02:51:24PM -0700, Dima Dorfman wrote:
> clee@serenivision.com writes:
> > 
> > >Number:         26566
> > >Category:       misc
> > >Synopsis:       man.cgi fails to retrieve manpages with '.'
> > 
> > require '/usr/local/www/bsddoc/bin/man.cgi';
> 
> That script is over 1000 lines with umpteen references to external
> sites and sources.  


Bug.

> Not to mention that it's not in CVS.  I don't


Ditto.

> think you want to touch it. :-)


Also true :-(

> That said, this is trivial to fix by making the stylesheets use the
> correct interface to man.cgi.  Patch attached below.
> 
> Nik (cc'd), any objections to me checking this in?


Nope, looks fine.  Can you send a heads up to the German translation
team, who have a similar entry for German man pages.

Thanks,

N
-- 
FreeBSD: The Power to Serve             http://www.freebsd.org/
FreeBSD Documentation Project           http://www.freebsd.org/docproj/

          --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---
Comment 3 dd freebsd_committer freebsd_triage 2001-04-15 20:22:21 UTC
State Changed
From-To: open->closed

Fixed, thanks!