[open-ils-commits] [GIT] Evergreen ILS branch rel_3_2 updated. 24fd99b4e29cd34e79642441d5d908fb038d54cb

Evergreen Git git at git.evergreen-ils.org
Tue Oct 1 17:06:18 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_2 has been updated
       via  24fd99b4e29cd34e79642441d5d908fb038d54cb (commit)
      from  57c5f0ba4a71d04d398d5e6398c753f6b853ea1b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 24fd99b4e29cd34e79642441d5d908fb038d54cb
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Tue Sep 24 13:48:08 2019 -0400

    LP#1845050: fix issue where reports interface was partially loaded
    
    This patch adjusts mod_xmlent to not free its XML parser
    prematurely in the face of an EOS bucket received while processing
    a sub-request.
    
    To test
    -------
    [1] Test on a platform that has Apache 2.4.25 or later, such as
        Debian Stretch.
    [2] Note that when loading the reports interface that the source
        of the frame containing oils_rpt.xhtml is incomplete and that
        actions like creating a template or folder do not work in the
        interface.
    [3] Apply the patch and repeat step 2. This time, oils_rpt.xhtml
        should be fully loaded and the interface fuctional.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Jason Boyer <jboyer at equinoxinitiative.org>

diff --git a/Open-ILS/src/apachemods/mod_xmlent.c b/Open-ILS/src/apachemods/mod_xmlent.c
index d1a88ad6d9..1a57e8277d 100644
--- a/Open-ILS/src/apachemods/mod_xmlent.c
+++ b/Open-ILS/src/apachemods/mod_xmlent.c
@@ -323,6 +323,8 @@ static int xmlEntHandler( ap_filter_t *f, apr_bucket_brigade *brigade ) {
 	if( parser == NULL ) {
 		firstrun = 1;
 		parser = XML_ParserCreate("UTF-8");
+		ap_log_rerror( APLOG_MARK, APLOG_DEBUG, 0, f->r,
+				"XMLENT: created XML parser");
 		XML_SetUserData(parser, f);
 		XML_SetElementHandler(parser, startElement, endElement);
 		XML_SetCharacterDataHandler(parser, charHandler);
@@ -364,8 +366,16 @@ static int xmlEntHandler( ap_filter_t *f, apr_bucket_brigade *brigade ) {
     	  	APR_BUCKET_REMOVE(currentBucket);
 			APR_BRIGADE_INSERT_TAIL(ctx->brigade, currentBucket);
 			ap_pass_brigade(f->next, ctx->brigade);
-			XML_ParserFree(parser);
-			parser = NULL;
+			if (f->r->main == NULL) {
+				// free the XML parser only if we've seen the end
+				// for the main request; we'll keep it around if
+				// the EOS was for a sub-request, as we may get
+				// more to process.
+				XML_ParserFree(parser);
+				parser = NULL;
+				ap_log_rerror( APLOG_MARK, APLOG_DEBUG, 0, f->r,
+					"XMLENT: freed XML parser");
+			}
 		  	return APR_SUCCESS;
     	}
 

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/apachemods/mod_xmlent.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list