static void openHandlers(Http *http) { #if BLD_FEATURE_DIR maOpenDirHandler(http); #endif maOpenFileHandler(http); }
/* Create the top level appweb control object. This is typically a singleton. */ PUBLIC MaAppweb *maCreateAppweb() { MaAppweb *appweb; Http *http; if ((appweb = mprAllocObj(MaAppweb, manageAppweb)) == NULL) { return 0; } MPR->appwebService = appweb; appweb->http = http = httpCreate(HTTP_CLIENT_SIDE | HTTP_SERVER_SIDE); httpSetContext(http, appweb); appweb->servers = mprCreateList(-1, 0); appweb->localPlatform = slower(sfmt("%s-%s-%s", BIT_OS, BIT_CPU, BIT_PROFILE)); maSetPlatform(NULL); maGetUserGroup(appweb); maParseInit(appweb); /* Open the builtin handlers */ #if BIT_PACK_DIR maOpenDirHandler(http); #endif maOpenFileHandler(http); return appweb; }