httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: [PATCH] (updated) Adding <[/]HTML> to server-generated HTML
Date Tue, 18 Feb 1997 02:48:08 GMT
+1.  

On Mon, 17 Feb 1997, Rodent of Unusual Size wrote:

>     Okey, here's the updated patch, which adds <HTML> and </HTML> tags
>     to the server-generated HTML segments that don't already include
>     them.  No DOCTYPEs this time, erroneous or otherwise.
> 
>     #ken    :-)}
> 
> Index: http_protocol.c
> ===================================================================
> RCS file: /usr/users/coar/myApache/repository/apache/src/http_protocol.c,v
> retrieving revision 1.101
> diff -c -r1.101 http_protocol.c
> *** 1.101	1997/02/17 06:05:01
> --- http_protocol.c	1997/02/18 00:26:00
> ***************
> *** 1620,1627 ****
>   	char *h1 = 4 + status_lines[idx];
>   	BUFF *fd = c->client;
>   	
> !         bvputs(fd,"<HEAD><TITLE>", title, "</TITLE></HEAD>\n<BODY><H1>",
h1,
> ! 	       "</H1>\n", NULL);
>   	
>           switch (status) {
>   	case REDIRECT:
> --- 1620,1635 ----
>   	char *h1 = 4 + status_lines[idx];
>   	BUFF *fd = c->client;
>   	
> !         bvputs
> ! 	    (
> ! 		fd,
> ! 		"<HTML>\n<HEAD>\n<TITLE>",
> ! 		title,
> ! 		"</TITLE>\n</HEAD>\n<BODY>\n<H1>",
> ! 		h1,
> ! 	       "</H1>\n",
> ! 	       NULL
> ! 	    );
>   	
>           switch (status) {
>   	case REDIRECT:
> ***************
> *** 1754,1760 ****
>   	    bputs("while trying to use an ErrorDocument to\n", fd);
>   	    bputs("handle the request.\n", fd);
>   	}
> ! 	bputs("</BODY>\n", fd);
>       }
>           
>   }
> --- 1762,1768 ----
>   	    bputs("while trying to use an ErrorDocument to\n", fd);
>   	    bputs("handle the request.\n", fd);
>   	}
> ! 	bputs("</BODY>\n</HTML>\n", fd);
>       }
>           
>   }
> 
> Index: mod_dir.c
> ===================================================================
> RCS file: /usr/users/coar/myApache/repository/apache/src/mod_dir.c,v
> retrieving revision 1.21
> diff -c -r1.21 mod_dir.c
> *** 1.21	1997/02/08 00:39:22
> --- mod_dir.c	1997/02/18 00:27:22
> ***************
> *** 715,722 ****
>       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);
> --- 715,728 ----
>       while (title_endp > title_name && *title_endp == '/')
>   	*title_endp-- = '\0';
>       
> !     rvputs
> ! 	(
> ! 	    r,
> ! 	    "<HTML>\n<HEAD>\n<TITLE>Index of ",
> ! 	    title_name,
> ! 	    "</TITLE>\n</HEAD>\n<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);
> ***************
> *** 759,765 ****
>           rputs("</UL>", r);
>       }
>   
> !     rputs("</BODY>", r);
>       return 0;
>   }
>   
> --- 765,771 ----
>           rputs("</UL>", r);
>       }
>   
> !     rputs ("</BODY>\n</HTML>\n", r);
>       return 0;
>   }
>   
> 
> Index: mod_status.c
> ===================================================================
> RCS file: /usr/users/coar/myApache/repository/apache/src/mod_status.c,v
> retrieving revision 1.42
> diff -c -r1.42 mod_status.c
> *** 1.42	1997/02/10 12:07:21
> --- mod_status.c	1997/02/18 00:31:32
> ***************
> *** 306,314 ****
>   
>       if (!short_report)
>       {
> !         rputs("<html><head><title>Apache Status</title></head><body>\n",r);
> !         rputs("<h1>Apache Server Status for ",r);
> ! 	rvputs(r,server->server_hostname,"</h1>\n\n",NULL);
>   	rvputs(r,"Current Time: ",asctime(localtime(&nowtime)),"<br>\n",NULL);
>   	rvputs(r,"Restart Time: ",asctime(localtime(&restart_time)),"<br>\n",
>   	       NULL);
> --- 306,314 ----
>   
>       if (!short_report)
>       {
> !         rputs("<HTML>\n<HEAD>\n<TITLE>Apache Status</TITLE>\n</HEAD>\n<BODY>\n",r);
> !         rputs("<H1>Apache Server Status for ",r);
> ! 	rvputs(r,server->server_hostname,"</H1>\n\n",NULL);
>   	rvputs(r,"Current Time: ",asctime(localtime(&nowtime)),"<br>\n",NULL);
>   	rvputs(r,"Restart Time: ",asctime(localtime(&restart_time)),"<br>\n",
>   	       NULL);
> ***************
> *** 585,591 ****
>   #endif /* STATUS */
>   
>       if (!short_report)
> !         rputs("</body></html>",r);
>       return 0;
>   }
>   
> --- 585,591 ----
>   #endif /* STATUS */
>   
>       if (!short_report)
> !         rputs("</BODY>\n</HTML>\n",r);
>       return 0;
>   }
>   
> 


Mime
View raw message