randy       97/08/22 19:55:33

  Modified:    src      CHANGES
               src/modules/standard mod_autoindex.c
  Log:
  Check for titles in server-parsed HTML files.
  Ignore leading newlines and returns in titles.  The old behavior
  of replacing a newline after <title> with a space causes the
  title to be misaligned in the listing.
  Submitted by: David J. MacKenzie <[EMAIL PROTECTED]>
  Reviewed by:  Dean Gaudet, Brian Behlendorf, Randy Terbush
  
  Revision  Changes    Path
  1.409     +5 -0      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.408
  retrieving revision 1.409
  diff -u -r1.408 -r1.409
  --- CHANGES   1997/08/23 02:23:34     1.408
  +++ CHANGES   1997/08/23 02:55:22     1.409
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3a2
   
  +  *) Check for titles in server-parsed HTML files.
  +     Ignore leading newlines and returns in titles.  The old behavior
  +     of replacing a newline after <title> with a space causes the
  +     title to be misaligned in the listing. [David J. MacKenzie]
  +
     *) Change mod_cern_meta to be configurable on a per-directory basis.
        [David J. MacKenzie]
   
  
  
  
  1.46      +9 -2      apachen/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- mod_autoindex.c   1997/08/18 13:12:10     1.45
  +++ mod_autoindex.c   1997/08/23 02:55:31     1.46
  @@ -583,7 +583,11 @@
       if (r->status != HTTP_OK) {
           return NULL;
       }
  -    if (r->content_type && !strcmp(r->content_type, "text/html") && 
!r->content_encoding) {
  +    if (r->content_type
  +     && (!strcmp(r->content_type,"text/html")
  +         || !strcmp(r->content_type,INCLUDES_MAGIC_TYPE))
  +     && !r->content_encoding)
  +    {
           if (!(thefile = pfopen(r->pool, r->filename, "r")))
               return NULL;
           n = fread(titlebuf, sizeof(char), MAX_STRING_LEN - 1, thefile);
  @@ -596,7 +600,10 @@
                       /* Scan for line breaks for Tanmoy's secretary */
                       for (y = x; titlebuf[y]; y++)
                           if ((titlebuf[y] == CR) || (titlebuf[y] == LF))
  -                            titlebuf[y] = ' ';
  +                         if (y==x)
  +                             x++;
  +                         else
  +                             titlebuf[y] = ' ';
                       pfclose (r->pool, thefile);
                       return pstrdup(r->pool, &titlebuf[x]);
                   }
  
  
  

Reply via email to