@@ -1431,7 +1431,7 @@ PUBLIC void httpInitAuth()
14311431 httpCreateAuthStore("system", httpPamVerifyUser);
14321432#endif
14331433
1434- #if DEPRECATED || 1
1434+ #if DEPRECATE
14351435 httpCreateAuthStore("file", configVerifyUser);
14361436 httpCreateAuthStore("internal", configVerifyUser);
14371437#if ME_COMPILER_HAS_PAM && ME_HTTP_PAM
@@ -3736,7 +3736,7 @@ PUBLIC int httpLoadConfig(HttpRoute *route, cchar *path)
37363736 if ((obj = mprGetJsonObj(config, "include")) != 0) {
37373737 parseInclude(route, config, obj);
37383738 }
3739- #if DEPRECATED || 1
3739+ #if DEPRECATE
37403740{
37413741 MprJson *obj;
37423742 if ((obj = mprGetJsonObj(config, "app.http")) != 0) {
@@ -3810,7 +3810,7 @@ PUBLIC void httpParseAll(HttpRoute *route, cchar *key, MprJson *prop)
38103810}
38113811
38123812
3813- #if DEPRECATED || 1
3813+ #if DEPRECATE
38143814static void parseApp(HttpRoute *route, cchar *key, MprJson *prop)
38153815{
38163816 httpParseAll(route, 0, prop);
@@ -4110,7 +4110,7 @@ static void parseCache(HttpRoute *route, cchar *key, MprJson *prop)
41104110 }
41114111 methods = getList(mprReadJsonObj(child, "methods"));
41124112 urls = getList(mprReadJsonObj(child, "urls"));
4113- #if DEPRECATED || 1
4113+ #if DEPRECATE
41144114 if (urls == 0) {
41154115 if ((urls = getList(mprReadJsonObj(child, "urls"))) != 0) {
41164116 mprLog("error http config", 0, "Using deprecated property \"uris\", use \"urls\" instead");
@@ -5027,7 +5027,7 @@ static void parseServerModules(HttpRoute *route, cchar *key, MprJson *prop)
50275027 module = mprCreateModule(name, path, entry, HTTP);
50285028
50295029 if (mprLoadModule(module) < 0) {
5030- #if DEPRECATED || 1
5030+ #if DEPRECATE
50315031 module->entry = sfmt("ma%sInit", stitle(name));
50325032 if (mprLoadModule(module) < 0) {
50335033 httpParseError(route, "Cannot load module: %s", path);
@@ -5065,7 +5065,7 @@ static void parseServerMonitors(HttpRoute *route, cchar *key, MprJson *prop)
50655065}
50665066
50675067
5068- #if DEPRECATE || 1
5068+ #if DEPRECATE
50695069static void parseServerPrefix(HttpRoute *route, cchar *key, MprJson *prop)
50705070{
50715071 httpSetRouteServerPrefix(route, prop->value);
@@ -5123,6 +5123,7 @@ static void parseSslAuthorityFile(HttpRoute *route, cchar *key, MprJson *prop)
51235123}
51245124
51255125
5126+ #if DEPRECATE
51265127static void parseSslAuthorityDirectory(HttpRoute *route, cchar *key, MprJson *prop)
51275128{
51285129 cchar *path;
@@ -5136,6 +5137,7 @@ static void parseSslAuthorityDirectory(HttpRoute *route, cchar *key, MprJson *pr
51365137 }
51375138 }
51385139}
5140+ #endif
51395141
51405142
51415143static void parseSslCertificate(HttpRoute *route, cchar *key, MprJson *prop)
@@ -5562,7 +5564,9 @@ PUBLIC int httpInitParser()
55625564 httpAddConfig("http.ssl", parseSsl);
55635565 httpAddConfig("http.ssl.authority", httpParseAll);
55645566 httpAddConfig("http.ssl.authority.file", parseSslAuthorityFile);
5567+ #if DEPRECATE
55655568 httpAddConfig("http.ssl.authority.directory", parseSslAuthorityDirectory);
5569+ #endif
55665570 httpAddConfig("http.ssl.certificate", parseSslCertificate);
55675571 httpAddConfig("http.ssl.ciphers", parseSslCiphers);
55685572 httpAddConfig("http.ssl.key", parseSslKey);
@@ -5585,7 +5589,7 @@ PUBLIC int httpInitParser()
55855589 httpAddConfig("http.trace", parseTrace);
55865590 httpAddConfig("http.xsrf", parseXsrf);
55875591
5588- #if DEPRECATED || 1
5592+ #if DEPRECATE
55895593 httpAddConfig("app", parseApp);
55905594 httpAddConfig("http.domain", parseName);
55915595 httpAddConfig("http.handler", parsePipelineHandler);
@@ -6089,7 +6093,7 @@ PUBLIC void httpIO(HttpConn *conn, int eventMask)
60896093 assert(conn->tx);
60906094 assert(conn->rx);
60916095
6092- #if DEPRECATED || 1
6096+ #if DEPRECATE
60936097 /* Just IO state asserting */
60946098 if (conn->io) {
60956099 assert(!conn->io);
@@ -6140,7 +6144,9 @@ PUBLIC void httpIO(HttpConn *conn, int eventMask)
61406144 } else if (!mprIsSocketEof(conn->sock) && conn->async && !conn->delay) {
61416145 httpEnableConnEvents(conn);
61426146 }
6147+ #if DEPRECATE
61436148 conn->io = 0;
6149+ #endif
61446150}
61456151
61466152
@@ -12458,10 +12464,9 @@ PUBLIC HttpRoute *httpCreateRoute(HttpHost *host)
1245812464 route->workers = -1;
1245912465 route->prefix = MPR->emptyString;
1246012466 route->trace = http->trace;
12461- #if DEPRECATED || 1
12467+ #if DEPRECATE
1246212468 route->serverPrefix = MPR->emptyString;
1246312469#endif
12464-
1246512470 route->headers = mprCreateList(-1, MPR_LIST_STABLE);
1246612471 route->handlers = mprCreateList(-1, MPR_LIST_STABLE);
1246712472 route->indexes = mprCreateList(-1, MPR_LIST_STABLE);
@@ -12490,11 +12495,6 @@ PUBLIC HttpRoute *httpCreateRoute(HttpHost *host)
1249012495 route->limits = mprMemdup(http->serverLimits ? http->serverLimits : http->clientLimits, sizeof(HttpLimits));
1249112496 }
1249212497 route->mimeTypes = MPR->mimeTypes;
12493- #if UNUSED
12494- if ((route->mimeTypes = mprCreateMimeTypes("mime.types")) == 0) {
12495- route->mimeTypes = MPR->mimeTypes;
12496- }
12497- #endif
1249812498 definePathVars(route);
1249912499 return route;
1250012500}
@@ -12574,7 +12574,7 @@ PUBLIC HttpRoute *httpCreateInheritedRoute(HttpRoute *parent)
1257412574 route->updates = parent->updates;
1257512575 route->vars = parent->vars;
1257612576 route->workers = parent->workers;
12577- #if DEPRECATED || 1
12577+ #if DEPRECATE
1257812578 route->serverPrefix = parent->serverPrefix;
1257912579#endif
1258012580 return route;
@@ -12639,7 +12639,7 @@ static void manageRoute(HttpRoute *route, int flags)
1263912639 mprMark(route->updates);
1264012640 mprMark(route->vars);
1264112641 mprMark(route->webSocketsProtocol);
12642- #if DEPRECATED || 1
12642+ #if DEPRECATE
1264312643 mprMark(route->serverPrefix);
1264412644#endif
1264512645
@@ -13822,7 +13822,7 @@ PUBLIC void httpSetRoutePreserveFrames(HttpRoute *route, bool on)
1382213822}
1382313823
1382413824
13825- #if DEPRECATED || 1
13825+ #if DEPRECATE
1382613826PUBLIC void httpSetRouteServerPrefix(HttpRoute *route, cchar *prefix)
1382713827{
1382813828 assert(route);
@@ -13955,12 +13955,10 @@ PUBLIC void httpSetRouteTemplate(HttpRoute *route, cchar *tplate)
1395513955}
1395613956
1395713957
13958- #if DEPRECATED || 1
1395913958PUBLIC void httpSetRouteUploadDir(HttpRoute *route, cchar *dir)
1396013959{
1396113960 httpSetDir(route, "UPLOAD", dir);
1396213961}
13963- #endif
1396413962
1396513963
1396613964PUBLIC void httpSetRouteWorkers(HttpRoute *route, int workers)
@@ -14342,10 +14340,9 @@ PUBLIC char *httpTemplate(HttpConn *conn, cchar *template, MprHash *options)
1434214340 for (cp = template; *cp; cp++) {
1434314341 if (cp == template && *cp == '~') {
1434414342 mprPutStringToBuf(buf, httpGetRouteTop(conn));
14345- #if DEPRECATED || 1
14343+ #if DEPRECATE
1434614344 } else if (cp == template && *cp == '|') {
1434714345 mprPutStringToBuf(buf, route->prefix);
14348- // DEPRECATED in version 6
1434914346 mprPutStringToBuf(buf, route->serverPrefix);
1435014347#endif
1435114348
@@ -14572,7 +14569,7 @@ static int authCondition(HttpConn *conn, HttpRoute *route, HttpRouteOp *op)
1457214569 /* Authentication not required */
1457314570 return HTTP_ROUTE_OK;
1457414571 }
14575- if (!httpLoggedIn (conn)) {
14572+ if (!httpIsAuthenticated (conn)) {
1457614573 httpGetCredentials(conn, &username, &password);
1457714574 if (!httpLogin(conn, username, password)) {
1457814575 if (!conn->tx->finalized) {
@@ -14610,7 +14607,7 @@ static int unauthorizedCondition(HttpConn *conn, HttpRoute *route, HttpRouteOp *
1461014607 if (!auth || !auth->type) {
1461114608 return HTTP_ROUTE_REJECT;
1461214609 }
14613- if (httpLoggedIn (conn)) {
14610+ if (httpIsAuthenticated (conn)) {
1461414611 return HTTP_ROUTE_REJECT;
1461514612 }
1461614613 httpGetCredentials(conn, &username, &password);
@@ -14882,16 +14879,12 @@ PUBLIC HttpRoute *httpDefineRoute(HttpRoute *parent, cchar *methods, cchar *patt
1488214879 if ((route = httpCreateInheritedRoute(parent)) == 0) {
1488314880 return 0;
1488414881 }
14885- #if DEPRECATED || 1
14886- /* Keep till version 6 */
14887- /*
14888- Keep till version 6
14889- */
14890- if (schr(target, '-')) {
14891- char *controller, *action;
14892- controller = ssplit(sclone(target), "-", &action);
14893- target = sjoin(controller, "/", action, NULL);
14894- }
14882+ #if DEPRECATE
14883+ if (schr(target, '-')) {
14884+ char *controller, *action;
14885+ controller = ssplit(sclone(target), "-", &action);
14886+ target = sjoin(controller, "/", action, NULL);
14887+ }
1489514888#endif
1489614889 httpSetRoutePattern(route, pattern, 0);
1489714890 if (methods) {
@@ -14910,7 +14903,7 @@ PUBLIC HttpRoute *httpAddRestfulRoute(HttpRoute *parent, cchar *methods, cchar *
1491014903{
1491114904 cchar *source;
1491214905
14913- #if DEPRECATED || 1
14906+ #if DEPRECATE
1491414907 if (*resource == '{') {
1491514908 pattern = sfmt("^%s%s/%s%s", parent->prefix, parent->serverPrefix, resource, pattern);
1491614909 } else {
@@ -14993,7 +14986,7 @@ PUBLIC HttpRoute *httpAddWebSocketsRoute(HttpRoute *parent, cchar *action)
1499314986 HttpLimits *limits;
1499414987 cchar *path, *pattern;
1499514988
14996- #if DEPRECATED || 1
14989+ #if DEPRECATE
1499714990 pattern = sfmt("^%s%s/{controller}/%s", parent->prefix, parent->serverPrefix, action);
1499814991#else
1499914992 pattern = sfmt("^%s/{controller}/%s", parent->prefix, action);
@@ -15129,7 +15122,7 @@ static void defineHostVars(HttpRoute *route)
1512915122 mprAddKey(route->vars, "DOCUMENTS", route->documents);
1513015123 mprAddKey(route->vars, "HOME", route->home);
1513115124 mprAddKey(route->vars, "HOST", route->host->name);
15132- #if DEPRECATED || 1
15125+ #if DEPRECATE
1513315126 mprAddKey(route->vars, "SERVER_NAME", route->host->name);
1513415127#endif
1513515128}
@@ -21730,7 +21723,7 @@ PUBLIC HttpUri *httpNormalizeUri(HttpUri *uri)
2173021723
2173121724
2173221725/*
21733- Normalize a URI path to remove redundant "./", "../" and make separators uniform.
21726+ Normalize a URI path to remove redundant "./", "../" and make separators uniform.
2173421727 This will not permit leading '../' segments.
2173521728 Does not make an abs path, map separators or change case.
2173621729 */
@@ -22099,8 +22092,7 @@ static cchar *expandRouteName(HttpConn *conn, cchar *routeName)
2209922092 if (sstarts(routeName, "${app}")) {
2210022093 return sjoin(httpGetRouteTop(conn), &routeName[6], NULL);
2210122094 }
22102- #if DEPRECATED || 1
22103- // DEPRECATED in version 6
22095+ #if DEPRECATE
2210422096 if (routeName[0] == '|') {
2210522097 assert(routeName[0] != '|');
2210622098 return sjoin(route->prefix, &routeName[1], NULL);
0 commit comments