summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-11-04 04:32:48 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-11-04 04:32:48 +0000
commit289bc4ac18ddb210a0e178417ef5072318ae6875 (patch)
tree2a637f55d21f5710a84abd4316e83db53796edb2 /www
parentImport of Shisen-sho puzzle game for X11 (diff)
Situation:
It is impossible to suppress initial HTML preamble for directories, i.e. <HEAD><TITLE>Index of dir</TITLE></HEAD><BODY> It means that it is impossible to change <TITLE> or add any <META HTTP-EQUIV...> tags to <HEAD> section or change <BODY> attributes without HTML syntax violation (.asis, cern_meta, etc. not helps here too). Fix: I add "SuppressHTMLPreamble" option to "IndexOptions". When this option is set _and_ HEADER.html (or what you set as it) is present and readable, standard <HEAD><TITLE>Index of dir</TITLE></HEAD><BODY> preamble will be suppressed assuming you have right HTML preamble in your HEADER.html. It solves all problems mentioned above.
Notes
Notes: svn path=/head/; revision=4286
Diffstat (limited to 'www')
-rw-r--r--www/apache13/files/patch-ag127
-rw-r--r--www/apache2/files/patch-ag127
-rw-r--r--www/apache20/files/patch-ag127
-rw-r--r--www/apache21/files/patch-ag127
-rw-r--r--www/apache22/files/patch-ag127
5 files changed, 635 insertions, 0 deletions
diff --git a/www/apache13/files/patch-ag b/www/apache13/files/patch-ag
new file mode 100644
index 000000000000..48d05fff51c2
--- /dev/null
+++ b/www/apache13/files/patch-ag
@@ -0,0 +1,127 @@
+*** src/mod_dir.c.orig Sat Jun 22 00:12:07 1996
+--- src/mod_dir.c Sun Nov 3 08:33:16 1996
+***************
+*** 83,88 ****
+--- 83,89 ----
+ #define SUPPRESS_LAST_MOD 8
+ #define SUPPRESS_SIZE 16
+ #define SUPPRESS_DESC 32
++ #define SUPPRESS_HTML_PREAMBLE 64
+
+ struct item {
+ char *type;
+***************
+*** 205,210 ****
+--- 206,213 ----
+ opts |= SUPPRESS_SIZE;
+ else if(!strcasecmp(w,"SuppressDescription"))
+ opts |= SUPPRESS_DESC;
++ else if(!strcasecmp(w,"SuppressHTMLPreamble"))
++ opts |= SUPPRESS_HTML_PREAMBLE;
+ else if(!strcasecmp(w,"None"))
+ opts = 0;
+ else
+***************
+*** 404,411 ****
+ * Actually generating output
+ */
+
+
+! int insert_readme(char *name, char *readme_fname, int rule, request_rec *r) {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+--- 407,421 ----
+ * Actually generating output
+ */
+
++ void put_html_preamble(char *title_name, request_rec *r)
++ {
++ rvputs(r, "<HEAD><TITLE>Index of ", title_name,
++ "</TITLE></HEAD><BODY>\n", NULL);
++ }
+
+! int insert_readme(char *name, char *readme_fname, int rule,
+! char *title_name, request_rec *r)
+! {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+***************
+*** 419,430 ****
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+- if(rule) rputs("<HR>\n", r);
+- rputs("<PRE>\n", r);
+ }
+- else if (rule) rputs("<HR>\n", r);
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
+ if (!plaintext)
+ send_fd(f, r);
+ else
+--- 429,442 ----
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+ }
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
++ if(!rule && plaintext && title_name != NULL)
++ put_html_preamble(title_name, r);
++ if(rule) rputs("<HR>\n", r);
++ if(plaintext) rputs("<PRE>\n", r);
++
+ if (!plaintext)
+ send_fd(f, r);
+ else
+***************
+*** 714,724 ****
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! rvputs(r, "<HEAD><TITLE>Index of ", title_name, "</TITLE></HEAD><BODY>\n",
+! NULL);
+
+! if((!(tmp = find_header(dir_conf,r))) || (!(insert_readme(name,tmp,0,r))))
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+--- 726,743 ----
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! if(!(dir_opts & SUPPRESS_HTML_PREAMBLE))
+! put_html_preamble(title_name, r);
+
+! if((!(tmp = find_header(dir_conf,r))) ||
+! (!(insert_readme(name, tmp, 0,
+! ((dir_opts & SUPPRESS_HTML_PREAMBLE) ?
+! title_name : NULL), r))))
+! {
+! if(dir_opts & SUPPRESS_HTML_PREAMBLE)
+! put_html_preamble(title_name, r);
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
++ }
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+***************
+*** 751,757 ****
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,r);
+ else {
+ rputs("</UL>", r);
+ }
+--- 770,776 ----
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,NULL,r);
+ else {
+ rputs("</UL>", r);
+ }
diff --git a/www/apache2/files/patch-ag b/www/apache2/files/patch-ag
new file mode 100644
index 000000000000..48d05fff51c2
--- /dev/null
+++ b/www/apache2/files/patch-ag
@@ -0,0 +1,127 @@
+*** src/mod_dir.c.orig Sat Jun 22 00:12:07 1996
+--- src/mod_dir.c Sun Nov 3 08:33:16 1996
+***************
+*** 83,88 ****
+--- 83,89 ----
+ #define SUPPRESS_LAST_MOD 8
+ #define SUPPRESS_SIZE 16
+ #define SUPPRESS_DESC 32
++ #define SUPPRESS_HTML_PREAMBLE 64
+
+ struct item {
+ char *type;
+***************
+*** 205,210 ****
+--- 206,213 ----
+ opts |= SUPPRESS_SIZE;
+ else if(!strcasecmp(w,"SuppressDescription"))
+ opts |= SUPPRESS_DESC;
++ else if(!strcasecmp(w,"SuppressHTMLPreamble"))
++ opts |= SUPPRESS_HTML_PREAMBLE;
+ else if(!strcasecmp(w,"None"))
+ opts = 0;
+ else
+***************
+*** 404,411 ****
+ * Actually generating output
+ */
+
+
+! int insert_readme(char *name, char *readme_fname, int rule, request_rec *r) {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+--- 407,421 ----
+ * Actually generating output
+ */
+
++ void put_html_preamble(char *title_name, request_rec *r)
++ {
++ rvputs(r, "<HEAD><TITLE>Index of ", title_name,
++ "</TITLE></HEAD><BODY>\n", NULL);
++ }
+
+! int insert_readme(char *name, char *readme_fname, int rule,
+! char *title_name, request_rec *r)
+! {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+***************
+*** 419,430 ****
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+- if(rule) rputs("<HR>\n", r);
+- rputs("<PRE>\n", r);
+ }
+- else if (rule) rputs("<HR>\n", r);
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
+ if (!plaintext)
+ send_fd(f, r);
+ else
+--- 429,442 ----
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+ }
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
++ if(!rule && plaintext && title_name != NULL)
++ put_html_preamble(title_name, r);
++ if(rule) rputs("<HR>\n", r);
++ if(plaintext) rputs("<PRE>\n", r);
++
+ if (!plaintext)
+ send_fd(f, r);
+ else
+***************
+*** 714,724 ****
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! rvputs(r, "<HEAD><TITLE>Index of ", title_name, "</TITLE></HEAD><BODY>\n",
+! NULL);
+
+! if((!(tmp = find_header(dir_conf,r))) || (!(insert_readme(name,tmp,0,r))))
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+--- 726,743 ----
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! if(!(dir_opts & SUPPRESS_HTML_PREAMBLE))
+! put_html_preamble(title_name, r);
+
+! if((!(tmp = find_header(dir_conf,r))) ||
+! (!(insert_readme(name, tmp, 0,
+! ((dir_opts & SUPPRESS_HTML_PREAMBLE) ?
+! title_name : NULL), r))))
+! {
+! if(dir_opts & SUPPRESS_HTML_PREAMBLE)
+! put_html_preamble(title_name, r);
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
++ }
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+***************
+*** 751,757 ****
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,r);
+ else {
+ rputs("</UL>", r);
+ }
+--- 770,776 ----
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,NULL,r);
+ else {
+ rputs("</UL>", r);
+ }
diff --git a/www/apache20/files/patch-ag b/www/apache20/files/patch-ag
new file mode 100644
index 000000000000..48d05fff51c2
--- /dev/null
+++ b/www/apache20/files/patch-ag
@@ -0,0 +1,127 @@
+*** src/mod_dir.c.orig Sat Jun 22 00:12:07 1996
+--- src/mod_dir.c Sun Nov 3 08:33:16 1996
+***************
+*** 83,88 ****
+--- 83,89 ----
+ #define SUPPRESS_LAST_MOD 8
+ #define SUPPRESS_SIZE 16
+ #define SUPPRESS_DESC 32
++ #define SUPPRESS_HTML_PREAMBLE 64
+
+ struct item {
+ char *type;
+***************
+*** 205,210 ****
+--- 206,213 ----
+ opts |= SUPPRESS_SIZE;
+ else if(!strcasecmp(w,"SuppressDescription"))
+ opts |= SUPPRESS_DESC;
++ else if(!strcasecmp(w,"SuppressHTMLPreamble"))
++ opts |= SUPPRESS_HTML_PREAMBLE;
+ else if(!strcasecmp(w,"None"))
+ opts = 0;
+ else
+***************
+*** 404,411 ****
+ * Actually generating output
+ */
+
+
+! int insert_readme(char *name, char *readme_fname, int rule, request_rec *r) {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+--- 407,421 ----
+ * Actually generating output
+ */
+
++ void put_html_preamble(char *title_name, request_rec *r)
++ {
++ rvputs(r, "<HEAD><TITLE>Index of ", title_name,
++ "</TITLE></HEAD><BODY>\n", NULL);
++ }
+
+! int insert_readme(char *name, char *readme_fname, int rule,
+! char *title_name, request_rec *r)
+! {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+***************
+*** 419,430 ****
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+- if(rule) rputs("<HR>\n", r);
+- rputs("<PRE>\n", r);
+ }
+- else if (rule) rputs("<HR>\n", r);
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
+ if (!plaintext)
+ send_fd(f, r);
+ else
+--- 429,442 ----
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+ }
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
++ if(!rule && plaintext && title_name != NULL)
++ put_html_preamble(title_name, r);
++ if(rule) rputs("<HR>\n", r);
++ if(plaintext) rputs("<PRE>\n", r);
++
+ if (!plaintext)
+ send_fd(f, r);
+ else
+***************
+*** 714,724 ****
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! rvputs(r, "<HEAD><TITLE>Index of ", title_name, "</TITLE></HEAD><BODY>\n",
+! NULL);
+
+! if((!(tmp = find_header(dir_conf,r))) || (!(insert_readme(name,tmp,0,r))))
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+--- 726,743 ----
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! if(!(dir_opts & SUPPRESS_HTML_PREAMBLE))
+! put_html_preamble(title_name, r);
+
+! if((!(tmp = find_header(dir_conf,r))) ||
+! (!(insert_readme(name, tmp, 0,
+! ((dir_opts & SUPPRESS_HTML_PREAMBLE) ?
+! title_name : NULL), r))))
+! {
+! if(dir_opts & SUPPRESS_HTML_PREAMBLE)
+! put_html_preamble(title_name, r);
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
++ }
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+***************
+*** 751,757 ****
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,r);
+ else {
+ rputs("</UL>", r);
+ }
+--- 770,776 ----
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,NULL,r);
+ else {
+ rputs("</UL>", r);
+ }
diff --git a/www/apache21/files/patch-ag b/www/apache21/files/patch-ag
new file mode 100644
index 000000000000..48d05fff51c2
--- /dev/null
+++ b/www/apache21/files/patch-ag
@@ -0,0 +1,127 @@
+*** src/mod_dir.c.orig Sat Jun 22 00:12:07 1996
+--- src/mod_dir.c Sun Nov 3 08:33:16 1996
+***************
+*** 83,88 ****
+--- 83,89 ----
+ #define SUPPRESS_LAST_MOD 8
+ #define SUPPRESS_SIZE 16
+ #define SUPPRESS_DESC 32
++ #define SUPPRESS_HTML_PREAMBLE 64
+
+ struct item {
+ char *type;
+***************
+*** 205,210 ****
+--- 206,213 ----
+ opts |= SUPPRESS_SIZE;
+ else if(!strcasecmp(w,"SuppressDescription"))
+ opts |= SUPPRESS_DESC;
++ else if(!strcasecmp(w,"SuppressHTMLPreamble"))
++ opts |= SUPPRESS_HTML_PREAMBLE;
+ else if(!strcasecmp(w,"None"))
+ opts = 0;
+ else
+***************
+*** 404,411 ****
+ * Actually generating output
+ */
+
+
+! int insert_readme(char *name, char *readme_fname, int rule, request_rec *r) {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+--- 407,421 ----
+ * Actually generating output
+ */
+
++ void put_html_preamble(char *title_name, request_rec *r)
++ {
++ rvputs(r, "<HEAD><TITLE>Index of ", title_name,
++ "</TITLE></HEAD><BODY>\n", NULL);
++ }
+
+! int insert_readme(char *name, char *readme_fname, int rule,
+! char *title_name, request_rec *r)
+! {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+***************
+*** 419,430 ****
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+- if(rule) rputs("<HR>\n", r);
+- rputs("<PRE>\n", r);
+ }
+- else if (rule) rputs("<HR>\n", r);
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
+ if (!plaintext)
+ send_fd(f, r);
+ else
+--- 429,442 ----
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+ }
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
++ if(!rule && plaintext && title_name != NULL)
++ put_html_preamble(title_name, r);
++ if(rule) rputs("<HR>\n", r);
++ if(plaintext) rputs("<PRE>\n", r);
++
+ if (!plaintext)
+ send_fd(f, r);
+ else
+***************
+*** 714,724 ****
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! rvputs(r, "<HEAD><TITLE>Index of ", title_name, "</TITLE></HEAD><BODY>\n",
+! NULL);
+
+! if((!(tmp = find_header(dir_conf,r))) || (!(insert_readme(name,tmp,0,r))))
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+--- 726,743 ----
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! if(!(dir_opts & SUPPRESS_HTML_PREAMBLE))
+! put_html_preamble(title_name, r);
+
+! if((!(tmp = find_header(dir_conf,r))) ||
+! (!(insert_readme(name, tmp, 0,
+! ((dir_opts & SUPPRESS_HTML_PREAMBLE) ?
+! title_name : NULL), r))))
+! {
+! if(dir_opts & SUPPRESS_HTML_PREAMBLE)
+! put_html_preamble(title_name, r);
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
++ }
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+***************
+*** 751,757 ****
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,r);
+ else {
+ rputs("</UL>", r);
+ }
+--- 770,776 ----
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,NULL,r);
+ else {
+ rputs("</UL>", r);
+ }
diff --git a/www/apache22/files/patch-ag b/www/apache22/files/patch-ag
new file mode 100644
index 000000000000..48d05fff51c2
--- /dev/null
+++ b/www/apache22/files/patch-ag
@@ -0,0 +1,127 @@
+*** src/mod_dir.c.orig Sat Jun 22 00:12:07 1996
+--- src/mod_dir.c Sun Nov 3 08:33:16 1996
+***************
+*** 83,88 ****
+--- 83,89 ----
+ #define SUPPRESS_LAST_MOD 8
+ #define SUPPRESS_SIZE 16
+ #define SUPPRESS_DESC 32
++ #define SUPPRESS_HTML_PREAMBLE 64
+
+ struct item {
+ char *type;
+***************
+*** 205,210 ****
+--- 206,213 ----
+ opts |= SUPPRESS_SIZE;
+ else if(!strcasecmp(w,"SuppressDescription"))
+ opts |= SUPPRESS_DESC;
++ else if(!strcasecmp(w,"SuppressHTMLPreamble"))
++ opts |= SUPPRESS_HTML_PREAMBLE;
+ else if(!strcasecmp(w,"None"))
+ opts = 0;
+ else
+***************
+*** 404,411 ****
+ * Actually generating output
+ */
+
+
+! int insert_readme(char *name, char *readme_fname, int rule, request_rec *r) {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+--- 407,421 ----
+ * Actually generating output
+ */
+
++ void put_html_preamble(char *title_name, request_rec *r)
++ {
++ rvputs(r, "<HEAD><TITLE>Index of ", title_name,
++ "</TITLE></HEAD><BODY>\n", NULL);
++ }
+
+! int insert_readme(char *name, char *readme_fname, int rule,
+! char *title_name, request_rec *r)
+! {
+ char *fn;
+ FILE *f;
+ struct stat finfo;
+***************
+*** 419,430 ****
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+- if(rule) rputs("<HR>\n", r);
+- rputs("<PRE>\n", r);
+ }
+- else if (rule) rputs("<HR>\n", r);
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
+ if (!plaintext)
+ send_fd(f, r);
+ else
+--- 429,442 ----
+ if(stat(fn,&finfo) == -1)
+ return 0;
+ plaintext=1;
+ }
+ if(!(f = pfopen(r->pool,fn,"r")))
+ return 0;
++ if(!rule && plaintext && title_name != NULL)
++ put_html_preamble(title_name, r);
++ if(rule) rputs("<HR>\n", r);
++ if(plaintext) rputs("<PRE>\n", r);
++
+ if (!plaintext)
+ send_fd(f, r);
+ else
+***************
+*** 714,724 ****
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! rvputs(r, "<HEAD><TITLE>Index of ", title_name, "</TITLE></HEAD><BODY>\n",
+! NULL);
+
+! if((!(tmp = find_header(dir_conf,r))) || (!(insert_readme(name,tmp,0,r))))
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+--- 726,743 ----
+ while (title_endp > title_name && *title_endp == '/')
+ *title_endp-- = '\0';
+
+! if(!(dir_opts & SUPPRESS_HTML_PREAMBLE))
+! put_html_preamble(title_name, r);
+
+! if((!(tmp = find_header(dir_conf,r))) ||
+! (!(insert_readme(name, tmp, 0,
+! ((dir_opts & SUPPRESS_HTML_PREAMBLE) ?
+! title_name : NULL), r))))
+! {
+! if(dir_opts & SUPPRESS_HTML_PREAMBLE)
+! put_html_preamble(title_name, r);
+ rvputs(r, "<H1>Index of ", title_name, "</H1>\n", NULL);
++ }
+
+ /*
+ * Since we don't know how many dir. entries there are, put them into a
+***************
+*** 751,757 ****
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,r);
+ else {
+ rputs("</UL>", r);
+ }
+--- 770,776 ----
+
+ if (dir_opts & FANCY_INDEXING)
+ if((tmp = find_readme(dir_conf, r)))
+! insert_readme(name,tmp,1,NULL,r);
+ else {
+ rputs("</UL>", r);
+ }