and i have no idea why...

This is happening in both standalone server mode and CGI mode...

Here's my code:

char const * name = PD("name",NULL);
if( !name){
  name = PD("n",NULL);
}

The idea being that i can treat "name=..." and "n=..." as aliases. (Yes, i
could rewrite it as PD("name",PD("n",0)), but i actually have some
additional code in there.)

If i pass in name=... then it works just fine. If i pass in n=... then the
token i'm getting back from PD() is the last element of the PATH_INFO.

e.g.

http://localhost:8080/json/login?n=stephan&password=xxxxxx

PD("n",0) is resolving to "login"

It gets weirder: if i reverse the order of the PD() calls, such that "n" is
checked first then something amazing happens... Both "n=" and "name=" work
as expected!

Even weirder is: my second usage of PD,
effectively: PD("password",PD("p",0))
does NOT have this problem, regardless of whether i check "p" or "password"
first.

i have absolutely no clue why, but my initial suspect (without having looked
closely at it) is the sorting done in cgi_parameter().

:-?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to