cvs commit: apachen/src/modules/standard mod_autoindex.c mod_info.c mod_status.c
martin 98/01/26 10:24:40 Modified:.STATUS htdocs/manual/mod core.html directives.html src/main http_core.c http_core.h http_protocol.c httpd.h src/modules/proxy proxy_ftp.c src/modules/standard mod_autoindex.c mod_info.c mod_status.c Log: Server-generated pages can be server-signed now (new directive) Revision ChangesPath 1.130 +3 -4 apachen/STATUS Index: STATUS === RCS file: /home/cvs/apachen/STATUS,v retrieving revision 1.129 retrieving revision 1.130 diff -u -u -r1.129 -r1.130 --- STATUS1998/01/26 16:46:05 1.129 +++ STATUS1998/01/26 18:24:25 1.130 @@ -1,3 +1,5 @@ + + Apache 1.3 STATUS: Release: @@ -135,6 +137,7 @@ * more mod_mime_magic cleanup * Add more compile time diagnosis to main's -V switch * [Port] Fix CGI-Execution for EBCDIC hosts. +* Martin's [PATCH] Signing server generated pages Available Patches: @@ -142,10 +145,6 @@ * M.D.Parker's [PATCH] mod_status/1448: Status Information have version [EMAIL PROTECTED] Status: Dean +1, Martin +1, Alexei -1 (shared lib concerns) - -* Martin's [PATCH] Signing server generated pages - [EMAIL PROTECTED] - Status: Martin +1, Roy 0, Concepts: 1.93 +27 -0 apachen/htdocs/manual/mod/core.html Index: core.html === RCS file: /home/cvs/apachen/htdocs/manual/mod/core.html,v retrieving revision 1.92 retrieving revision 1.93 diff -u -u -r1.92 -r1.93 --- core.html 1998/01/26 16:54:02 1.92 +++ core.html 1998/01/26 18:24:26 1.93 @@ -74,6 +74,7 @@ LIA HREF=#servernameServerName/A LIA HREF=#serverpathServerPath/A LIA HREF=#serverrootServerRoot/A +LIA HREF=#serversignatureServerSignature/A LIA HREF=#servertypeServerType/A LIA HREF=#startserversStartServers/A LIA HREF=#threadsperchildThreadsPerChild/A @@ -1584,6 +1585,32 @@ See also A HREF=../invoking.htmlthe CODE-d/CODE option to httpd/A.P See also A HREF=../misc/security_tips.html#serverrootthe security tips/A for information on how to properly set permissions on the ServerRoot.P + +HR + +H2A name=serversignatureServerSignature directive/A/h2 +!--%plaintext lt;?INDEX {\tt ServerSignature} directivegt; -- +strongSyntax:/strong ServerSignature emOff | On | EMail/embr +strongDefault:/strong codeServerSignature Off/codebr +strongContext:/strong directory, .htaccessbr +strongStatus:/strong corep +strongCompatibility:/strong ServerSignature is only available in Apache +1.3 and later.p + +The ServerSignature directive allows the configuration of a trailing +footer line under server-generated documents (error messages, +mod_proxy ftp directory listings, mod_info output, ...). The reason +why you would want to enable such a footer line is that in a chain +of proxies, the user often has no possibility to tell which of the +chained servers actually produced a returned error message.br +The sampOff/samp setting, which is the default, suppresses the +error line (and is therefore compatible with the behavior of +Apache-1.2 and below). The sampOn/samp setting simply adds a +line with the server version number and A +HREF=#servernameServerName/A of the serving virtual host, and +the sampEMail/samp setting additionally creates a mailto:; +reference to the A HREF=#serveradminServerAdmin/A of the +referenced document. HR 1.37 +1 -0 apachen/htdocs/manual/mod/directives.html Index: directives.html === RCS file: /home/cvs/apachen/htdocs/manual/mod/directives.html,v retrieving revision 1.36 retrieving revision 1.37 diff -u -u -r1.36 -r1.37 --- directives.html 1998/01/26 16:54:02 1.36 +++ directives.html 1998/01/26 18:24:27 1.37 @@ -180,6 +180,7 @@ LIA HREF=core.html#servernameServerName/A LIA HREF=core.html#serverpathServerPath/A LIA HREF=core.html#serverrootServerRoot/A +LIA HREF=core.html#serversignatureServerSignature/A LIA HREF=core.html#servertypeServerType/A LIA HREF=mod_env.html#setenvSetEnv/A LIA HREF=mod_setenvif.html#setenvifSetEnvIf/A 1.149 +39 -0 apachen/src/main/http_core.c Index: http_core.c === RCS file: /home/cvs/apachen/src/main/http_core.c,v retrieving revision 1.148 retrieving revision 1.149 diff -u -u -r1.148 -r1.149 --- http_core.c 1998/01/26 16:46:09 1.148 +++ http_core.c 1998/01/26 18:24:31 1.149 @@ -1160,6 +1160,21 @@ return NULL; } +const char *set_signature_flag (cmd_parms *cmd, core_dir_config *d, char *arg) { +const char
cvs commit: apachen/src/modules/standard mod_autoindex.c
coar98/01/20 10:48:44 Modified:src/modules/standard mod_autoindex.c Log: Move the PRE prefix for plaintext header files to before the header file emission, rather than before the page preamble. PR: 1667 Submitted by: John Van Essen [EMAIL PROTECTED] Reviewed by: Dean Gaudet, Ken Coar, Jim Jagielski Revision ChangesPath 1.62 +1 -1 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.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- mod_autoindex.c 1998/01/07 16:46:45 1.61 +++ mod_autoindex.c 1998/01/20 18:48:42 1.62 @@ -544,7 +544,6 @@ plaintext = 1; if (hrule) rputs(HR\n, r); - rputs(PRE\n, r); } else if (hrule) rputs(HR\n, r); @@ -570,6 +569,7 @@ else { char buf[IOBUFSIZE + 1]; int i, n, c, ch; + rputs(PRE\n, r); while (!feof(f)) { do n = fread(buf, sizeof(char), IOBUFSIZE, f);
cvs commit: apachen/src/modules/standard mod_autoindex.c
dgaudet 97/12/22 17:50:03 Modified:.STATUS src CHANGES src/modules/standard mod_autoindex.c Log: AddIconByType (TXT,/icons/text.gif text/*, note the missing closing paren, does the wrong thing, and doesn't report an error. Don't fread() without testing for errors. Reviewed by: Jim Jagielski, Martin Kraemer Revision ChangesPath 1.16 +1 -4 apachen/STATUS Index: STATUS === RCS file: /export/home/cvs/apachen/STATUS,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- STATUS1997/12/22 21:52:59 1.15 +++ STATUS1997/12/23 01:49:58 1.16 @@ -48,6 +48,7 @@ * Dean's [PATCH] Re: problem with a .gif and v2.1.4 * Dean's [PATCH] util_date.c needless reinitialization * Martin's [PATCH] Gimme a break! (missing break;s in mod_include) +* Dean's [PATCH] two bugs in mod_autoindex Available: @@ -58,10 +59,6 @@ * Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs [EMAIL PROTECTED] Status: Dean +1, Martin +1 - -* Dean's [PATCH] two bugs in mod_autoindex - [EMAIL PROTECTED] - Status: Dean +1, Randy +1, Martin +1 * Dean's [PATCH] fix Rasmus' chunking error [EMAIL PROTECTED] 1.536 +4 -0 apachen/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apachen/src/CHANGES,v retrieving revision 1.535 retrieving revision 1.536 diff -u -r1.535 -r1.536 --- CHANGES 1997/12/21 08:18:14 1.535 +++ CHANGES 1997/12/23 01:50:00 1.536 @@ -1,4 +1,8 @@ Changes with Apache 1.3b4 + + *) mod_autoindex had an fread() without checking the result code. + It also wouldn't handle AddIconByType (TXT,/icons/text.gif text/* + (note the missing closing paren) properly. [Dean Gaudet] *) It appears the 257th byte bug (see htdocs/manual/misc/known_client_problems.html#257th-byte) can happen 1.60 +12 -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.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- mod_autoindex.c 1997/12/18 19:55:17 1.59 +++ mod_autoindex.c 1997/12/23 01:50:02 1.60 @@ -186,8 +186,14 @@ char *iconbak = pstrdup(cmd-pool, icon); if (icon[0] == '(') { - char *alt = getword_nc(cmd-pool, iconbak, ','); - iconbak[strlen(iconbak) - 1] = '\0';/* Lose closing paren */ + char *alt; + char *cl = strchr(iconbak, ')'); + + if (cl == NULL) { + return missing closing paren; + } + alt = getword_nc(cmd-pool, iconbak, ','); + *cl = '\0'; /* Lose closing paren */ add_alt(cmd, d, alt[1], to); } if (cmd-info == BY_PATH) @@ -612,6 +618,10 @@ if (!(thefile = pfopen(r-pool, r-filename, r))) return NULL; n = fread(titlebuf, sizeof(char), MAX_STRING_LEN - 1, thefile); + if (n = 0) { + pfclose(r-pool, thefile); + return NULL; + } titlebuf[n] = '\0'; for (x = 0, p = 0; titlebuf[x]; x++) { if (toupper(titlebuf[x]) == find[p]) {
cvs commit: apachen/src/modules/standard mod_autoindex.c
dgaudet 97/12/18 11:53:20 Modified:src/modules/standard mod_autoindex.c Log: yet more messed up indentation Revision ChangesPath 1.58 +5 -5 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.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- mod_autoindex.c 1997/12/18 19:49:40 1.57 +++ mod_autoindex.c 1997/12/18 19:53:18 1.58 @@ -923,20 +923,20 @@ */ switch ((*e1)-key) { case K_LAST_MOD: - s1 = (*e1)-lm_cmp; + s1 = (*e1)-lm_cmp; s2 = (*e2)-lm_cmp; break; case K_SIZE: - s1 = (*e1)-size_cmp; + s1 = (*e1)-size_cmp; s2 = (*e2)-size_cmp; break; case K_DESC: - s1 = (*e1)-desc; + s1 = (*e1)-desc; s2 = (*e2)-desc; break; case K_NAME: - default: - s1 = (*e1)-name; +default: + s1 = (*e1)-name; s2 = (*e2)-name; break; }
cvs commit: apachen/src/modules/standard mod_autoindex.c
coar97/11/12 13:37:46 Modified:src CHANGES src/modules/standard mod_autoindex.c Log: Fix mod_autoindex so it displays the ReadmeName file under all circumstances, as it already handled the HeaderName file that way. PR: 1373 Reviewed by: Dean Gaudet, Martin Kraemer Revision ChangesPath 1.506 +6 -0 apachen/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apachen/src/CHANGES,v retrieving revision 1.505 retrieving revision 1.506 diff -u -r1.505 -r1.506 --- CHANGES 1997/11/12 20:42:06 1.505 +++ CHANGES 1997/11/12 21:37:43 1.506 @@ -1,5 +1,11 @@ Changes with Apache 1.3b3 + *) mod_autoindex wasn't displaying the ReadmeName file at the bottom + unless it was also doing FancyIndexes, but it displayed the + HeaderName file at the top under all circumstances. It now shows + the ReadmeName file for simple indices, too, as it should. PR#1373 + [Ken Coar] + *) http_core was mmap()ing even in cases where it wasn't going to read the file. [Ben Hyde [EMAIL PROTECTED]] 1.56 +4 -6 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.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- mod_autoindex.c 1997/11/09 20:40:33 1.55 +++ mod_autoindex.c 1997/11/12 21:37:45 1.56 @@ -1100,12 +1100,10 @@ direction); pclosedir(r-pool, d); -if (autoindex_opts FANCY_INDEXING) { - if ((tmp = find_readme(autoindex_conf, r))) - insert_readme(name, tmp, , HRULE, END_MATTER, r); - else { - rputs(/UL, r); - } +if ((tmp = find_readme(autoindex_conf, r))) { + insert_readme(name, tmp, , + ((autoindex_opts FANCY_INDEXING) ? HRULE : NO_HRULE), + END_MATTER, r); } rputs(/BODY/HTML\n, r);
cvs commit: apachen/src/modules/standard mod_autoindex.c mod_include.c
coar97/11/09 12:40:36 Modified:htdocs/manual new_features_1_3.html src CHANGES src/modules/standard mod_autoindex.c mod_include.c Log: Make mod_autoindex and mod_include default date formats Y2K-safe. Also add the SuppressColumnSorting keyword to the new-features document. Reviewed by: Ben Laurie, Dean Gaudet Revision ChangesPath 1.30 +19 -0 apachen/htdocs/manual/new_features_1_3.html Index: new_features_1_3.html === RCS file: /export/home/cvs/apachen/htdocs/manual/new_features_1_3.html,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- new_features_1_3.html 1997/10/24 09:44:17 1.29 +++ new_features_1_3.html 1997/11/09 20:40:28 1.30 @@ -104,6 +104,11 @@ clicking on a column title will now sort the listing in order by the values in that column. Selecting the column repeatedly will toggle between ascending and descending order. + This feature can be disabled with the SAMPSuppressColumnSorting/SAMP + A + HREF=mod/mod_autoindex.html#indexoptions + IndexOptions/A + keyword. /LI LIA HREF=mod/mod_autoindex.html#indexoptions @@ -433,6 +438,20 @@ /ul + LISTRONGYear-2000 Improvements/STRONG + BR + The default SAMPtimefmt/SAMP string used by + A + HREF=mod/mod_include.html + SAMPmod_include/SAMP/A + has been modified todisplay the year using four digits rather than the + two-digit format used previously. The + A + HREF=mod/mod_autoindex.html + SAMPmod_autoindex/SAMP/A + module has also been modified to display years using four digits in + FancyIndexed directory listings. + /LI /ul !--#include virtual=footer.html -- 1.501 +3 -0 apachen/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apachen/src/CHANGES,v retrieving revision 1.500 retrieving revision 1.501 diff -u -r1.500 -r1.501 --- CHANGES 1997/11/09 05:49:24 1.500 +++ CHANGES 1997/11/09 20:40:30 1.501 @@ -1,5 +1,8 @@ Changes with Apache 1.3b3 + *) Change mod_include and mod_autoindex to use Y2K-safe date formats + by default. [Ken Coar] + *) Add a SuppressColumnSorting option to the IndexOptions list, which will keep the column heading from beling links for sorting the display. [Ken Coar, suggested by Brian Tiemann [EMAIL PROTECTED]] 1.55 +3 -3 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.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- mod_autoindex.c 1997/11/09 05:49:21 1.54 +++ mod_autoindex.c 1997/11/09 20:40:33 1.55 @@ -707,7 +707,7 @@ register int x; if (autoindex_opts SUPPRESS_LAST_MOD) - maxsize += 17; + maxsize += 19; if (autoindex_opts SUPPRESS_SIZE) maxsize += 7; @@ -800,7 +800,7 @@ if (!(autoindex_opts SUPPRESS_LAST_MOD)) { emit_link(r, Last modified, K_LAST_MOD, keyid, direction, static_columns); - rputs( , r); + rputs( , r); } if (!(autoindex_opts SUPPRESS_SIZE)) { emit_link(r, Size, K_SIZE, keyid, direction, static_columns); @@ -881,7 +881,7 @@ if (ar[x]-lm != -1) { char time_str[MAX_STRING_LEN]; struct tm *ts = localtime(ar[x]-lm); - strftime(time_str, MAX_STRING_LEN, %d-%b-%y %H:%M , ts); + strftime(time_str, MAX_STRING_LEN, %d-%b-%Y %H:%M , ts); rputs(time_str, r); } else { 1.58 +1 -1 apachen/src/modules/standard/mod_include.c Index: mod_include.c === RCS file: /export/home/cvs/apachen/src/modules/standard/mod_include.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- mod_include.c 1997/10/22 20:30:22 1.57 +++ mod_include.c 1997/11/09 20:40:34 1.58 @@ -92,7 +92,7 @@ #define STARTING_SEQUENCE !--# #define ENDING_SEQUENCE -- #define DEFAULT_ERROR_MSG [an error occurred while processing this directive] -#define DEFAULT_TIME_FORMAT %A, %d-%b-%y %H:%M:%S %Z +#define DEFAULT_TIME_FORMAT %A, %d-%b-%Y %H:%M:%S %Z #define SIZEFMT_BYTES 0 #define SIZEFMT_KMG 1
cvs commit: apachen/src/modules/standard mod_autoindex.c mod_dir.c
dgaudet 97/10/22 09:59:24 Modified:src/modules/standard mod_autoindex.c mod_dir.c Log: When method is not GET, just DECLINE rather than return NOT_IMPLEMENTED. PR: 1241 Reviewed by: Dean Gaudet, Jim Jagielski, Martin Kraemer Revision ChangesPath 1.52 +1 -1 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.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- mod_autoindex.c 1997/10/16 18:55:51 1.51 +++ mod_autoindex.c 1997/10/22 16:59:22 1.52 @@ -1104,7 +1104,7 @@ int allow_opts = allow_options(r); if (r-method_number != M_GET) - return NOT_IMPLEMENTED; + return DECLINED; /* OK, nothing easy. Trot out the heavy artillery... */ 1.42 +1 -1 apachen/src/modules/standard/mod_dir.c Index: mod_dir.c === RCS file: /export/home/cvs/apachen/src/modules/standard/mod_dir.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- mod_dir.c 1997/09/18 18:40:51 1.41 +++ mod_dir.c 1997/10/22 16:59:23 1.42 @@ -182,7 +182,7 @@ return error_notfound; if (r-method_number != M_GET) -return NOT_IMPLEMENTED; +return DECLINED; /* nothing for us to do, pass on through */
cvs commit: apachen/src/modules/standard mod_autoindex.c
dgaudet 97/09/25 19:59:11 Modified:src CHANGES src/modules/standard mod_autoindex.c Log: 1) Entity Names (like uuml;) are parsed and counted as having a width of one character. Until now, their length was taken in column counting, resulting in too early truncated description columns. 2) The last character of a description text which had the maximum allowed length (27?) was overwritten with the truncated character (''). This didn't make the string any shorter, but made it unreadable :-( Now the string is truncated only if it really exceeds the maximum length. Submitted by: Martin Kraemer Reviewed by: Dean Gaudet, Jim Jagielski, Roy Fielding Revision ChangesPath 1.446 +5 -0 apachen/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apachen/src/CHANGES,v retrieving revision 1.445 retrieving revision 1.446 diff -u -r1.445 -r1.446 --- CHANGES 1997/09/26 02:56:39 1.445 +++ CHANGES 1997/09/26 02:59:07 1.446 @@ -1,5 +1,10 @@ Changes with Apache 1.3b1 + *) mod_autoindex improperly counted escapes; as more than one + character in the description. It also improperly truncated + descriptions that were exactly the maximum length. + [Martin Kraemer] + *) RedirectMatch was not properly escaping the result (PR#1155). Also RedirectMatch /advertiser/(.*) $1 is now permitted. [Dean Gaudet] 1.49 +11 -1 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.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- mod_autoindex.c 1997/09/18 08:12:22 1.48 +++ mod_autoindex.c 1997/09/26 02:59:10 1.49 @@ -716,10 +716,20 @@ ++x; } } + else if (desc[x] == '') { + /* entities like auml; count as one character */ + --maxsize; + for ( ; desc[x] != ';'; ++x) { + if (desc[x] == '\0') { + maxsize = 0; + break; + } + } +} else --maxsize; } -if (!maxsize) { +if (!maxsize desc[x] != '\0') { desc[x - 1] = ''; /* Grump. */ desc[x] = '\0'; /* Double Grump! */ }
cvs commit: apachen/src/modules/standard mod_autoindex.c
randy 97/08/31 15:47:51 Modified:src/modules/standard mod_autoindex.c Log: Conver log_*() to aplog_error(). Style changes. One change to correct problems Emacs was having with formating. Revision ChangesPath 1.47 +14 -11apachen/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.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- mod_autoindex.c 1997/08/23 02:55:31 1.46 +++ mod_autoindex.c 1997/08/31 22:47:49 1.47 @@ -961,7 +961,8 @@ char direction; if (!(d = popendir(r-pool, name))) { -log_reason (Can't open directory for index, r-filename, r); +aplog_error(APLOG_MARK, APLOG_ERR, r-server, + Can't open directory for index: %s, r-filename); return HTTP_FORBIDDEN; } @@ -1037,10 +1038,10 @@ p = p-next; } -qsort((void *)ar, num_ent, sizeof(struct ent *), #ifdef ULTRIX_BRAIN_DEATH - (int (*))dsortf); +qsort((void *)ar, num_ent, sizeof(struct ent *), (int (*))dsortf); #else +qsort((void *)ar, num_ent, sizeof(struct ent *), (int (*)(const void *, const void *))dsortf); #endif } @@ -1048,13 +1049,13 @@ direction); pclosedir(r-pool, d); -if (autoindex_opts FANCY_INDEXING) +if (autoindex_opts FANCY_INDEXING) { if ((tmp = find_readme(autoindex_conf, r))) insert_readme(name, tmp, , HRULE, END_MATTER, r); -else { -rputs(/UL, r); + else { + rputs(/UL, r); + } } - rputs (/BODY/HTML\n, r); kill_timeout(r); @@ -1066,8 +1067,8 @@ static int handle_autoindex (request_rec *r) { autoindex_config_rec *d = - (autoindex_config_rec *)get_module_config (r-per_dir_config, - autoindex_module); + (autoindex_config_rec *)get_module_config(r-per_dir_config, + autoindex_module); int allow_opts = allow_options (r); if (r-method_number != M_GET) return NOT_IMPLEMENTED; @@ -1084,8 +1085,10 @@ r-filename = pstrcat (r-pool, r-filename, /, NULL); } return index_directory (r, d); -} else { -log_reason (Directory index forbidden by rule, r-filename, r); +} + else { +aplog_error(APLOG_MARK, APLOG_ERR, r-server, + Directory index forbidden by rule: %s, r-filename); return HTTP_FORBIDDEN; } }
cvs commit: apachen/src/modules/standard mod_autoindex.c
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 ChangesPath 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]); }