[hunchentoot-devel] Re: Boolean Form Fields

Volkan YAZICI yazicivo at ttnet.net.tr
Sat Apr 28 10:56:06 UTC 2007


Edi Weitz <edi at agharta.de> writes:
> Which browser sends requests that look like "foo.html?foo="?

Consider I want to redirect client to auth.html with auth-res boolean
parameter turned on. What should I pass as the URI? If I use
"?auth-res=NIL" or "?auth-res=0", both of them returns T, because
neither "NIL", nor "0" is NIL. Hence, I prefer to use "?auth-res=" But
in this case, I cannot know if the boolean parameter is supplied and
it's value is NIL, or the parameter isn't even supplied. (Because, in
both situations it returns NIL.)

I can cope with this problem, by making an extra (assoc 'auth-res
(get-parameters)) probe everytime I need that verbosity. But wouldn't
it be better just to specify a ":exist-p auth-res-exist-p" option in
the lambda list of D-E-H.


Regards.



More information about the Tbnl-devel mailing list