[open-ils-commits] r10707 - trunk/Open-ILS/src/apachemods

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Sep 25 17:44:59 EDT 2008


Author: erickson
Date: 2008-09-25 17:44:55 -0400 (Thu, 25 Sep 2008)
New Revision: 10707

Modified:
   trunk/Open-ILS/src/apachemods/mod_xmlent.c
Log:
only compare the first 9 chars, in case the content type is "text/html; charset=blah", or similar.

Modified: trunk/Open-ILS/src/apachemods/mod_xmlent.c
===================================================================
--- trunk/Open-ILS/src/apachemods/mod_xmlent.c	2008-09-25 21:33:04 UTC (rev 10706)
+++ trunk/Open-ILS/src/apachemods/mod_xmlent.c	2008-09-25 21:44:55 UTC (rev 10707)
@@ -228,7 +228,7 @@
 			filter->r->per_dir_config, &xmlent_module );
 	_fwrite(filter, "<%s", name );
 	printAttr( filter, atts );
-	if (!strcmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT)
+	if (!strncmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT, 9)
 		&& isEmptyElement(name)) {
 		_fwrite(filter, " />", name );
 	} else {
@@ -272,7 +272,7 @@
 	ap_filter_t* filter = (ap_filter_t*) userData;
 	xmlEntConfig* config = ap_get_module_config( 
 			filter->r->per_dir_config, &xmlent_module );
-	if (!strcmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT)
+	if (!strncmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT, 9)
 			&& isEmptyElement(name)) { 
 		return;
 	}



More information about the open-ils-commits mailing list