Mod Cplusplus CVS committal
Author : johnksterling
Project : mod_cplusplus
Module : src
Dir : mod_cplusplus/src
Modified Files:
apache_output_buffer.cpp
Log Message:
fix bug in the defaulting logic of the request_env output buffer which caused it to over-write the request content type sometimes. reported by Dmitriy Gorbenko <ba...@ag...>
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/src/apache_output_buffer.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- apache_output_buffer.cpp 18 Aug 2003 01:23:36 -0000 1.6
+++ apache_output_buffer.cpp 31 Mar 2007 12:15:22 -0000 1.7
@@ -9,6 +9,7 @@
buffer_(buffer)
{
output_anything_=false;
+ update_content_type_ = false;
content_type_="text/html";
}
@@ -70,12 +71,15 @@
void
apache_output_buffer::send_http_header(){
+ if( update_content_type_ ) {
ap_set_content_type(r_,content_type_.c_str() );
+ }
}
bool
apache_output_buffer::set_content_type(const std::string& type){
content_type_=type;
+ update_content_type_ = true;
return ! output_anything_;
}
#endif
|