@@ -1574,11 +1574,11 @@ static char *process_dump(request_rec *r, int *errtype)
15741574    (void )errtype ;
15751575
15761576    if  (accept_header  &&  strstr ((char  * )accept_header , "text/xml" ) !=  NULL ) {
1577-         ap_set_content_type (r , "text/xml" );
1577+         ap_set_content_type_ex (r , "text/xml" ,  1 );
15781578        type  =  TEXT_XML ;
15791579        ap_rprintf (r , "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" );
15801580    } else  {
1581-         ap_set_content_type (r , "text/plain" );
1581+         ap_set_content_type_ex (r , "text/plain" ,  1 );
15821582        type  =  TEXT_PLAIN ;
15831583    }
15841584
@@ -1773,11 +1773,11 @@ static char *process_info(request_rec *r, int *errtype)
17731773    (void )errtype ;
17741774
17751775    if  (accept_header  &&  strstr ((char  * )accept_header , "text/xml" ) !=  NULL ) {
1776-         ap_set_content_type (r , "text/xml" );
1776+         ap_set_content_type_ex (r , "text/xml" ,  1 );
17771777        type  =  TEXT_XML ;
17781778        ap_rprintf (r , "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" );
17791779    } else  {
1780-         ap_set_content_type (r , "text/plain" );
1780+         ap_set_content_type_ex (r , "text/plain" ,  1 );
17811781        type  =  TEXT_PLAIN ;
17821782    }
17831783
@@ -2254,7 +2254,7 @@ static char *process_appl_cmd(request_rec *r, char **ptr, int status, int *errty
22542254            ap_log_error (APLOG_MARK , APLOG_DEBUG , 0 , r -> server , "process_appl_cmd: STOP-APP nbrequests %d" ,
22552255                         ou -> nbrequests );
22562256            if  (fromnode ) {
2257-                 ap_set_content_type (r , "text/plain" );
2257+                 ap_set_content_type_ex (r , "text/plain" ,  1 );
22582258                ap_rprintf (r , "Type=STOP-APP-RSP&JvmRoute=%.*s&Alias=%.*s&Context=%.*s&Requests=%d" ,
22592259                           (int )sizeof (nodeinfo .mess .JVMRoute ), nodeinfo .mess .JVMRoute , (int )sizeof (vhost -> host ),
22602260                           vhost -> host , (int )sizeof (vhost -> context ), vhost -> context , ou -> nbrequests );
@@ -2352,7 +2352,7 @@ static char *process_status(request_rec *r, const char *const *ptr, int *errtype
23522352     * If the node is usualable do a ping/pong to prevent Split-Brain Syndrome 
23532353     * and update the worker status and load factor acccording to the test result. 
23542354     */ 
2355-     ap_set_content_type (r , "text/plain" );
2355+     ap_set_content_type_ex (r , "text/plain" ,  1 );
23562356    ap_rprintf (r , "Type=STATUS-RSP&JVMRoute=%.*s" , (int )sizeof (nodeinfo .mess .JVMRoute ), nodeinfo .mess .JVMRoute );
23572357
23582358    ap_rprintf (r , isnode_up (r , node -> mess .id , Load ) !=  OK  ? "&State=NOTOK"  : "&State=OK" );
@@ -2373,12 +2373,12 @@ static char *process_version(request_rec *r, const char *const *const ptr, int *
23732373    (void )errtype ;
23742374
23752375    if  (accept_header  &&  strstr ((char  * )accept_header , "text/xml" ) !=  NULL ) {
2376-         ap_set_content_type (r , "text/xml" );
2376+         ap_set_content_type_ex (r , "text/xml" ,  1 );
23772377        ap_rprintf (r , "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" );
23782378        ap_rprintf (r , "<version><release>%s</release><protocol>%s</protocol></version>" , MOD_CLUSTER_EXPOSED_VERSION ,
23792379                   VERSION_PROTOCOL );
23802380    } else  {
2381-         ap_set_content_type (r , "text/plain" );
2381+         ap_set_content_type_ex (r , "text/plain" ,  1 );
23822382        ap_rprintf (r , "release: %s, protocol: %s" , MOD_CLUSTER_EXPOSED_VERSION , VERSION_PROTOCOL );
23832383    }
23842384    ap_rprintf (r , "\n" );
@@ -2428,14 +2428,14 @@ static char *process_ping(request_rec *r, const char *const *ptr, int *errtype)
24282428    if  (nodeinfo .mess .id  ==  -1 ) {
24292429        /* PING scheme, host, port or just httpd */ 
24302430        if  (scheme  ==  NULL  &&  host  ==  NULL  &&  port  ==  NULL ) {
2431-             ap_set_content_type (r , "text/plain" );
2431+             ap_set_content_type_ex (r , "text/plain" ,  1 );
24322432            ap_rprintf (r , "Type=PING-RSP&State=OK" );
24332433        } else  {
24342434            if  (scheme  ==  NULL  ||  host  ==  NULL  ||  port  ==  NULL ) {
24352435                * errtype  =  TYPESYNTAX ;
24362436                return  apr_psprintf (r -> pool , SMISFLD );
24372437            }
2438-             ap_set_content_type (r , "text/plain" );
2438+             ap_set_content_type_ex (r , "text/plain" ,  1 );
24392439            ap_rprintf (r , "Type=PING-RSP" );
24402440            ap_rprintf (r , ishost_up (r , scheme , host , port ) !=  OK  ? "&State=NOTOK"  : "&State=OK" );
24412441        }
@@ -2454,7 +2454,7 @@ static char *process_ping(request_rec *r, const char *const *ptr, int *errtype)
24542454         * If the node is usualable do a ping/pong to prevent Split-Brain Syndrome 
24552455         * and update the worker status and load factor acccording to the test result. 
24562456         */ 
2457-         ap_set_content_type (r , "text/plain" );
2457+         ap_set_content_type_ex (r , "text/plain" ,  1 );
24582458        ap_rprintf (r , "Type=PING-RSP&JVMRoute=%.*s" , (int )sizeof (nodeinfo .mess .JVMRoute ), nodeinfo .mess .JVMRoute );
24592459
24602460        ap_rprintf (r , isnode_up (r , node -> mess .id , -2 ) !=  OK  ? "&State=NOTOK"  : "&State=OK" );
@@ -3219,7 +3219,7 @@ static const char *process_params(request_rec *r, apr_table_t *params, int allow
32193219
32203220static  void  print_fileheader (request_rec  * r , const  mod_manager_config  * mconf , const  char  * errstring )
32213221{
3222-     ap_set_content_type (r , "text/html; charset=ISO-8859-1" );
3222+     ap_set_content_type_ex (r , "text/html; charset=ISO-8859-1" ,  1 );
32233223    ap_rputs (DOCTYPE_HTML_3_2  "<html><head>\n<title>Mod_cluster Status</title>\n</head><body>\n" , r );
32243224    ap_rvputs (r , "<h1>" , MOD_CLUSTER_EXPOSED_VERSION , "</h1>" , NULL );
32253225
0 commit comments