Skip to content

Commit e4b53b0

Browse files
committed
fix(ns_http): corrected optional id parsing in ns_http list/stats
- Use Ns_ObjvString instead of Ns_ObjvObj for the optional ?id argument in HttpListObjCmd() and HttpStatsObjCmd(). - Ensure that "ns_http list ?id?" and "ns_http stats ?id?" accept a plain string ID again, matching the documented Tcl interface. Bug is present only in NaviServer 5.0.0–5.0.3; release/4.99 is not affected. Credit: identified and fixed by Zoran Vasiljevic.
1 parent c8c64d8 commit e4b53b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nsd/tclhttp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ HttpListObjCmd(
22572257
char *idString = NULL;
22582258
int result = TCL_OK;
22592259
Ns_ObjvSpec args[] = {
2260-
{"?id", Ns_ObjvObj, &idString, NULL},
2260+
{"?id", Ns_ObjvString, &idString, NULL},
22612261
{NULL, NULL, NULL, NULL}
22622262
};
22632263

@@ -2380,7 +2380,7 @@ HttpStatsObjCmd(
23802380
char *idString = NULL;
23812381
int result = TCL_OK;
23822382
Ns_ObjvSpec args[] = {
2383-
{"?id", Ns_ObjvObj, &idString, NULL},
2383+
{"?id", Ns_ObjvString, &idString, NULL},
23842384
{NULL, NULL, NULL, NULL}
23852385
};
23862386

0 commit comments

Comments
 (0)