You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2002/04/02 00:26:09 UTC
cvs commit: httpd-2.0/modules/http http_protocol.c
jerenkrantz 02/04/01 14:26:09
Modified: . CHANGES
modules/http http_protocol.c
Log:
Prevent ap_add_output_filters_by_type from being called in
ap_set_content_type if the content-type hasn't changed.
Reviewed by: Ryan Bloom
Revision Changes Path
1.678 +4 -0 httpd-2.0/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-2.0/CHANGES,v
retrieving revision 1.677
retrieving revision 1.678
diff -u -r1.677 -r1.678
--- CHANGES 1 Apr 2002 21:19:41 -0000 1.677
+++ CHANGES 1 Apr 2002 22:26:08 -0000 1.678
@@ -1,5 +1,9 @@
Changes with Apache 2.0.35
+ *) Prevent ap_add_output_filters_by_type from being called in
+ ap_set_content_type if the content-type hasn't changed.
+ [Justin Erenkrantz]
+
*) Performance: implemented the bucket allocator made possible by the
API change in 2.0.34. [Cliff Woolley]
1.407 +9 -7 httpd-2.0/modules/http/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
retrieving revision 1.406
retrieving revision 1.407
diff -u -r1.406 -r1.407
--- http_protocol.c 29 Mar 2002 08:17:22 -0000 1.406
+++ http_protocol.c 1 Apr 2002 22:26:09 -0000 1.407
@@ -1272,14 +1272,16 @@
AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct)
{
- r->content_type = ct;
+ if (!r->content_type || strcmp(r->content_type, ct)) {
+ r->content_type = ct;
- /* Insert filters requested by the AddOutputFiltersByType
- * configuration directive. Content-type filters must be
- * inserted after the content handlers have run because
- * only then, do we reliably know the content-type.
- */
- ap_add_output_filters_by_type(r);
+ /* Insert filters requested by the AddOutputFiltersByType
+ * configuration directive. Content-type filters must be
+ * inserted after the content handlers have run because
+ * only then, do we reliably know the content-type.
+ */
+ ap_add_output_filters_by_type(r);
+ }
}
typedef struct header_filter_ctx {