only compare the first 9 chars, in case the content type is "text/html; charset=blah...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 25 Sep 2008 21:44:55 +0000 (21:44 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 25 Sep 2008 21:44:55 +0000 (21:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10707 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/apachemods/mod_xmlent.c

index fc74690..d1a88ad 100644 (file)
@@ -228,7 +228,7 @@ static void XMLCALL startElement(void *userData, const char *name, const char **
                        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 @@ static void XMLCALL endElement(void *userData, const char *name) {
        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;
        }