@@ -1574,11 +1574,11 @@ static char *process_dump(request_rec *r, int *errtype)
1574
1574
(void )errtype ;
1575
1575
1576
1576
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 );
1578
1578
type = TEXT_XML ;
1579
1579
ap_rprintf (r , "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" );
1580
1580
} else {
1581
- ap_set_content_type (r , "text/plain" );
1581
+ ap_set_content_type_ex (r , "text/plain" , 1 );
1582
1582
type = TEXT_PLAIN ;
1583
1583
}
1584
1584
@@ -1773,11 +1773,11 @@ static char *process_info(request_rec *r, int *errtype)
1773
1773
(void )errtype ;
1774
1774
1775
1775
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 );
1777
1777
type = TEXT_XML ;
1778
1778
ap_rprintf (r , "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" );
1779
1779
} else {
1780
- ap_set_content_type (r , "text/plain" );
1780
+ ap_set_content_type_ex (r , "text/plain" , 1 );
1781
1781
type = TEXT_PLAIN ;
1782
1782
}
1783
1783
@@ -2254,7 +2254,7 @@ static char *process_appl_cmd(request_rec *r, char **ptr, int status, int *errty
2254
2254
ap_log_error (APLOG_MARK , APLOG_DEBUG , 0 , r -> server , "process_appl_cmd: STOP-APP nbrequests %d" ,
2255
2255
ou -> nbrequests );
2256
2256
if (fromnode ) {
2257
- ap_set_content_type (r , "text/plain" );
2257
+ ap_set_content_type_ex (r , "text/plain" , 1 );
2258
2258
ap_rprintf (r , "Type=STOP-APP-RSP&JvmRoute=%.*s&Alias=%.*s&Context=%.*s&Requests=%d" ,
2259
2259
(int )sizeof (nodeinfo .mess .JVMRoute ), nodeinfo .mess .JVMRoute , (int )sizeof (vhost -> host ),
2260
2260
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
2352
2352
* If the node is usualable do a ping/pong to prevent Split-Brain Syndrome
2353
2353
* and update the worker status and load factor acccording to the test result.
2354
2354
*/
2355
- ap_set_content_type (r , "text/plain" );
2355
+ ap_set_content_type_ex (r , "text/plain" , 1 );
2356
2356
ap_rprintf (r , "Type=STATUS-RSP&JVMRoute=%.*s" , (int )sizeof (nodeinfo .mess .JVMRoute ), nodeinfo .mess .JVMRoute );
2357
2357
2358
2358
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 *
2373
2373
(void )errtype ;
2374
2374
2375
2375
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 );
2377
2377
ap_rprintf (r , "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" );
2378
2378
ap_rprintf (r , "<version><release>%s</release><protocol>%s</protocol></version>" , MOD_CLUSTER_EXPOSED_VERSION ,
2379
2379
VERSION_PROTOCOL );
2380
2380
} else {
2381
- ap_set_content_type (r , "text/plain" );
2381
+ ap_set_content_type_ex (r , "text/plain" , 1 );
2382
2382
ap_rprintf (r , "release: %s, protocol: %s" , MOD_CLUSTER_EXPOSED_VERSION , VERSION_PROTOCOL );
2383
2383
}
2384
2384
ap_rprintf (r , "\n" );
@@ -2428,14 +2428,14 @@ static char *process_ping(request_rec *r, const char *const *ptr, int *errtype)
2428
2428
if (nodeinfo .mess .id == -1 ) {
2429
2429
/* PING scheme, host, port or just httpd */
2430
2430
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 );
2432
2432
ap_rprintf (r , "Type=PING-RSP&State=OK" );
2433
2433
} else {
2434
2434
if (scheme == NULL || host == NULL || port == NULL ) {
2435
2435
* errtype = TYPESYNTAX ;
2436
2436
return apr_psprintf (r -> pool , SMISFLD );
2437
2437
}
2438
- ap_set_content_type (r , "text/plain" );
2438
+ ap_set_content_type_ex (r , "text/plain" , 1 );
2439
2439
ap_rprintf (r , "Type=PING-RSP" );
2440
2440
ap_rprintf (r , ishost_up (r , scheme , host , port ) != OK ? "&State=NOTOK" : "&State=OK" );
2441
2441
}
@@ -2454,7 +2454,7 @@ static char *process_ping(request_rec *r, const char *const *ptr, int *errtype)
2454
2454
* If the node is usualable do a ping/pong to prevent Split-Brain Syndrome
2455
2455
* and update the worker status and load factor acccording to the test result.
2456
2456
*/
2457
- ap_set_content_type (r , "text/plain" );
2457
+ ap_set_content_type_ex (r , "text/plain" , 1 );
2458
2458
ap_rprintf (r , "Type=PING-RSP&JVMRoute=%.*s" , (int )sizeof (nodeinfo .mess .JVMRoute ), nodeinfo .mess .JVMRoute );
2459
2459
2460
2460
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
3219
3219
3220
3220
static void print_fileheader (request_rec * r , const mod_manager_config * mconf , const char * errstring )
3221
3221
{
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 );
3223
3223
ap_rputs (DOCTYPE_HTML_3_2 "<html><head>\n<title>Mod_cluster Status</title>\n</head><body>\n" , r );
3224
3224
ap_rvputs (r , "<h1>" , MOD_CLUSTER_EXPOSED_VERSION , "</h1>" , NULL );
3225
3225
0 commit comments