You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Roy Fielding <fi...@hyperreal.com> on 1997/05/08 13:27:32 UTC
cvs commit: apache/src CHANGES http_protocol.c httpd.h mod_actions.c
fielding 97/05/08 04:27:31
Modified: src CHANGES http_protocol.c httpd.h mod_actions.c
Log:
Fixed a couple places where a check for the default Content-Type was
not properly checking both the value configured by the DefaultType
directive and the DEFAULT_TYPE symbol in httpd.h. Changed the value
of DEFAULT_TYPE to match the documented default (text/plain).
Submitted by: Dean Gaudet
Reviewed by: Roy Fielding, Jim Jagielski
Revision Changes Path
1.269 +6 -0 apache/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache/src/CHANGES,v
retrieving revision 1.268
retrieving revision 1.269
diff -C3 -r1.268 -r1.269
*** CHANGES 1997/05/08 08:23:30 1.268
--- CHANGES 1997/05/08 11:27:27 1.269
***************
*** 1,5 ****
--- 1,11 ----
Changes with Apache 1.2
+ *) Fixed a couple places where a check for the default Content-Type was
+ not properly checking both the value configured by the DefaultType
+ directive and the DEFAULT_TYPE symbol in httpd.h. Changed the value
+ of DEFAULT_TYPE to match the documented default (text/plain).
+ [Dean Gaudet]
+
*) Escape the HTML-sensitive characters in the Request-URI that is
output for each child by mod_status. [Dean Gaudet and Ken Coar] PR#501
1.119 +2 -5 apache/src/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -C3 -r1.118 -r1.119
*** http_protocol.c 1997/04/30 23:01:57 1.118
--- http_protocol.c 1997/05/08 11:27:28 1.119
***************
*** 1172,1180 ****
{
int i;
const long int zero = 0L;
- core_dir_config *dir_conf =
- (core_dir_config *)get_module_config(r->per_dir_config, &core_module);
- char *default_type = dir_conf->default_type;
if (r->assbackwards) {
if(!r->main)
--- 1172,1177 ----
***************
*** 1206,1213 ****
"byteranges; boundary=", r->boundary, NULL));
else if (r->content_type)
table_set(r->headers_out, "Content-Type", r->content_type);
! else if (default_type)
! table_set(r->headers_out, "Content-Type", default_type);
if (r->content_encoding)
table_set(r->headers_out, "Content-Encoding", r->content_encoding);
--- 1203,1210 ----
"byteranges; boundary=", r->boundary, NULL));
else if (r->content_type)
table_set(r->headers_out, "Content-Type", r->content_type);
! else
! table_set(r->headers_out, "Content-Type", default_type(r));
if (r->content_encoding)
table_set(r->headers_out, "Content-Encoding", r->content_encoding);
1.103 +1 -1 apache/src/httpd.h
Index: httpd.h
===================================================================
RCS file: /export/home/cvs/apache/src/httpd.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -C3 -r1.102 -r1.103
*** httpd.h 1997/04/29 05:18:53 1.102
--- httpd.h 1997/05/08 11:27:28 1.103
***************
*** 135,141 ****
/* Define this to be what type you'd like returned for files with unknown */
/* suffixes */
! #define DEFAULT_TYPE "text/html"
/* Define this to be what your per-directory security files are called */
#ifdef __EMX__
--- 135,141 ----
/* Define this to be what type you'd like returned for files with unknown */
/* suffixes */
! #define DEFAULT_TYPE "text/plain"
/* Define this to be what your per-directory security files are called */
#ifdef __EMX__
1.12 +1 -1 apache/src/mod_actions.c
Index: mod_actions.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_actions.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C3 -r1.11 -r1.12
*** mod_actions.c 1997/03/07 14:15:37 1.11
--- mod_actions.c 1997/05/08 11:27:29 1.12
***************
*** 177,183 ****
return DECLINED;
/* Second, check for actions (which override the method scripts) */
! if ((action || default_type(r)) && (t = table_get(conf->action_types,
action ? action : default_type(r)))) {
script = t;
if (r->finfo.st_mode == 0) {
--- 177,183 ----
return DECLINED;
/* Second, check for actions (which override the method scripts) */
! if ((t = table_get(conf->action_types,
action ? action : default_type(r)))) {
script = t;
if (r->finfo.st_mode == 0) {