john at oxyliquit.de
Mon Oct 30 09:36:30 EST 2006
> I worked a bit with your patch. I have two problems:
Was to be expected. ;D
> - the code barks with non english (for example greek ;-)) params ;-)
> for example my_action/GREEK_PARAM does not get unescaped correctly.
> but I can find a solution for this.
Hmm.. I got no idea how to work with other languages, good that you
do this. ;D
> even though the params are not ordered as hash (though we can use a
> dictionary here) the query string is ordered and it makes the
> my_action implementation cleaner (ie i can use oid instead of
Reworked cgi.rb parameter parsing to use Dictionary.
> moreover I really want to use my_action?oid=1;val=23 instead of the
> nice url. I only want to use niceurls in links. I want to use normal
> query strings in 'actions' and rest/programmatic request.
> can you somehow adapt your code to handle the second problem?
Nitro::Compiler.setting :mixin_get_parameters, :default => false
> Moreover, could you add a separation of get/post parameters?
Lets do this next release, will add this to my todo list.
As an extra:
Nitro::Compiler.setting :non_strict_action_calling, :default => false
This can be used to configure if `def my_action(oid, val)` should be
treated as `def my_action(oid = nil, val = nil)`.
I thought after all that disagreement that perhaps a setting is best.
Just don't touch the default! ;D
Oh right, and the testcases for these two new functions have to be
increased, I only added 1 per setting.
So, anyone here up for some testcase adding? It's quite easy work
and can be done by someone new wanting to get a little into the
Nitro code. Just add more tests and look how it gets handled and
if it's correct what it does. (For example, try with more params,
less params, incomplete params, mixed params/action-params, param
mixing together with non-strict action calling. etc.)
George, a little thought. How can we test for correctly unescaped
paramets (any more places where this could go wrong?)? Would be great
if you could add a little testcase somewhere appropriate.
Have a nice day everyone. :)
Feel the love
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14739 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20061030/3b388090/attachment-0001.bin
More information about the Nitro-general