From: erickson Date: Wed, 9 Jul 2008 18:33:10 +0000 (+0000) Subject: added the string mangling to collapse a set of responses into 1 for non-multipart... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5dcd6f28c9d501cc26f40f40b458ee6f76a77e60;p=working%2FOpenSRF.git added the string mangling to collapse a set of responses into 1 for non-multipart requests git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1364 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/gateway/osrf_http_translator.c b/src/gateway/osrf_http_translator.c index 186f781..ed5cbf4 100644 --- a/src/gateway/osrf_http_translator.c +++ b/src/gateway/osrf_http_translator.c @@ -362,8 +362,16 @@ static int osrfHttpTranslatorProcess(osrfHttpTranslator* trans) { int i; OSRF_BUFFER_ADD(buf, osrfListGetIndex(trans->messages, 0)); for(i = 1; i < trans->messages->size; i++) { - // yay! string mangling + buffer_chomp(buf); // chomp off the closing array bracket + char* body = osrfListGetIndex(trans->messages, i); + char newbuf[strlen(body)]; + sprintf(newbuf, body+1); // chomp off the opening array bracket + OSRF_BUFFER_ADD_CHAR(buf, ','); + OSRF_BUFFER_ADD(buf, newbuf); } + + ap_rputs(buf->buf, trans->apreq); + buffer_free(buf); } } }