service = apacheGetFirstParamValue( params, "service" );
method = apacheGetFirstParamValue( params, "method" );
format = apacheGetFirstParamValue( params, "format" );
- a_l = apacheGetFirstParamValue( params, "api_level" );
+ a_l = apacheGetFirstParamValue( params, "api_level" );
mparams = apacheGetParamValues( params, "param" ); /* free me */
if (a_l)
if (isXML)
snprintf( buf, l, "<debug>\"%s : %s\"</debug>", statusname, statustext );
- else
- snprintf( buf, l, ",\"debug\":\"%s : %s\"", statusname, statustext );
+ else {
+ char bb[l];
+ bzero(bb, l);
+ snprintf(bb, l, "%s : %s", statusname, statustext);
+ jsonObject* tmp = jsonNewObject(bb);
+ char* j = jsonObjectToJSON(tmp);
+ snprintf( buf, l, ",\"debug\": %s", j);
+ free(j);
+ jsonObjectFree(tmp);
+ }
ap_rputs(buf, r);