From 1fb60dc07dbf6f1faa0d7af3959c20469a8e36f6 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 28 May 2005 16:57:03 +0000 Subject: [PATCH] r7057: remove some ^M at end of lines --- source/web_server/esp/esp.c | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/source/web_server/esp/esp.c b/source/web_server/esp/esp.c index 4041823093e..12a94710150 100644 --- a/source/web_server/esp/esp.c +++ b/source/web_server/esp/esp.c @@ -167,9 +167,9 @@ EspRequest *espCreateRequest(EspHandle webServerRequestHandle, char *uri, * NOTE: MaRequest::setVar does not copy into globals, whereas espSetVar * does if legacy_api is defined. So variables pre-defined by MaRequest * must be copied here into globals[]. - * - * NOTE: if a variable is in session[] and in form[], the form[] will - * override being later in the variables[] list. Use mprSetProperty + * + * NOTE: if a variable is in session[] and in form[], the form[] will + * override being later in the variables[] list. Use mprSetProperty * instead of mprCreateProperty to cover for this case. */ for (i = 0; i < ESP_OBJ_MAX; i++) { @@ -769,13 +769,13 @@ static int buildScript(EspRequest *ep, char **jsBuf, char *input, char **errMsg) state = ESP_STATE_BEGIN; break; - case ESP_TOK_INCLUDE: - if (parse.token[0] == '/') { - mprStrcpy(incPath, sizeof(incPath), parse.token); - } else { - mprGetDirName(dir, sizeof(dir), ep->uri); - mprSprintf(incPath, sizeof(incPath), "%s/%s", - dir, parse.token); + case ESP_TOK_INCLUDE: + if (parse.token[0] == '/') { + mprStrcpy(incPath, sizeof(incPath), parse.token); + } else { + mprGetDirName(dir, sizeof(dir), ep->uri); + mprSprintf(incPath, sizeof(incPath), "%s/%s", + dir, parse.token); } if (esp->mapToStorage(ep->requestHandle, path, sizeof(path), incPath, 0) < 0) { @@ -797,11 +797,11 @@ static int buildScript(EspRequest *ep, char **jsBuf, char *input, char **errMsg) */ incBuf = 0; if ((rc = buildScript(ep, &incBuf, incText, errMsg)) < 0) { - mprFree(incText); - mprFree(parse.token); + mprFree(incText); + mprFree(parse.token); return rc; - } - + } + len = mprReallocStrcat(jsBuf, maxScriptSize, len, 0, incBuf, 0); mprFree(incText); mprFree(incBuf); @@ -810,12 +810,12 @@ static int buildScript(EspRequest *ep, char **jsBuf, char *input, char **errMsg) } tid = getEspToken(state, &parse); } - mprFree(parse.token); - if (len < 0) { - mprAllocSprintf(errMsg, MPR_MAX_STRING, - "Script token is too big in %s.\nConfigured maximum is %d.", - path, maxScriptSize); - return MPR_ERR_WONT_FIT; + mprFree(parse.token); + if (len < 0) { + mprAllocSprintf(errMsg, MPR_MAX_STRING, + "Script token is too big in %s.\nConfigured maximum is %d.", + path, maxScriptSize); + return MPR_ERR_WONT_FIT; } return rc; } -- 2.34.1