httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject apache 1.0.3 ScanHTMLTitles improvement (fwd)
Date Tue, 02 Apr 1996 14:58:40 GMT

I'll ack this..


Date: Tue, 2 Apr 1996 09:52:24 -0500
Message-Id: <JAA25958.199604021452@catapult.va.pubnix.com>
From: "David J. MacKenzie" <djm@va.pubnix.com>
To: apache-bugs@apache.org
cc: djm@va.pubnix.com
Subject: apache 1.0.3 ScanHTMLTitles improvement
X-Quote: 
   Just once, I wish we would encounter an alien menace that wasn't
   immune to bullets -- The Brigader in Dr Who

From: David MacKenzie <djm@va.pubnix.com>
Subject: ScanHTMLTitles handles newlines suboptimally
Affects: mod_dir.c
ChangeLog: Ignore leading newlines and returns in titles
Comments: A common format for title directives is
<title>
This Document's Title
</title>
Stock apache 1.0.3 replaces the newline after <title> with a space,
causing the title to be misaligned in the listing.  This patch handles
that case better by skipping leading newlines and returns.

*** 1.2	1996/04/01 18:57:31
--- mod_dir.c	1996/04/02 14:42:00
***************
*** 477,483 ****
                      /* Scan for line breaks for Tanmoy's secretary */
                      for(y=x;titlebuf[y];y++)
                          if((titlebuf[y] == CR) || (titlebuf[y] == LF))
!                             titlebuf[y] = ' ';
  		    pfclose (r->pool, thefile);
                      return pstrdup(r->pool, &titlebuf[x]);
                  }
--- 477,486 ----
                      /* Scan for line breaks for Tanmoy's secretary */
                      for(y=x;titlebuf[y];y++)
                          if((titlebuf[y] == CR) || (titlebuf[y] == LF))
! 			    if (y==x)
! 			      x++;
! 			    else
! 			      titlebuf[y] = ' ';
  		    pfclose (r->pool, thefile);
                      return pstrdup(r->pool, &titlebuf[x]);
                  }


Mime
View raw message