r8404: small upstream merges of appweb code
[samba.git] / source4 / lib / appweb / esp / espProcs.c
index 28b69a8a6f1484634279ffc3f8a78f4a02252084..7b5dfe680e8960b692ac28d37e6d8d90892e639c 100644 (file)
@@ -93,8 +93,11 @@ static int includeProc(EspRequest *ep, int argc, char **argv)
                buf[size] = '\0';
 
                extension = strrchr(argv[i], '.');
-               /* this makes handling include files in esp scripts much more convenient */
-               if (extension && strcasecmp(extension, ".esp") == 0) {
+
+               /*
+                *      Allow nested inclusion of ESP requests
+                */
+               if (extension && mprStrCmpAnyCase(extension, ".esp") == 0) {
                        if (espProcessRequest(ep, path, buf, &emsg) != 0) {
                                espError(ep, "Cant evaluate script - %s", emsg?emsg:"");
                                mprFree(buf);