Hello, I recently noticed that ns_conn form will return the query args from a POST or the URL args on a GET, but in the case of a POST, will not return both. For example, if my action=test_form.adp?arg1=val1 arg1 will not be present in [ns_conn form]. I have made a page which illustrates this and describes it in further depth. Could someone take a look and see what they think? Does the HTTP spec have anything to say about this? (i.e. is it not kosher to put query args in a form's action?) I've attached the .adp if you'd like to look it over. Or, for minimal fuss, you can check it out at: http://www.rustybrooks.org/test/test_form.adp to view the ADP source, look at http://www.rustybrooks.org/source/test/test_form.adp ------------------------------------------ Rusty Brooks : http://www.rustybrooks.org/ Spewing wisdom from every orifice ------------------------------------------
This ADP page shows a possible deficit in AOLServer's form handling. Most notably, ns_conn form returns the query args on the URL line (in the case of a GET) <i>OR</i> the query args that were posted, in the case of a POST. To me, it seems like in the case of a POST, you'd want to gather query args from both places, in cases like this one, where you are posting to a URL while passing query args. This is especially valuable in cases like this one, where the user might pass in a form initially via the URL, and wish for it to keep propagating when he presses "submit". In this case, I think both arg1 and arg2 should have values when posted. It's not entirely clear what should happen when a variable exists in both the posted values and the command line, but this should probably not be treated any differently than when two variables of the same name are posted (as in the case of multiple-select boxes) <p>Please forward any comments to <a href=mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]</a> or leave a comment at the bottom of this page. <p> Values returned by "ns_conn form" <pre> <% set r [ns_conn form] for { set a 0 } { $a < [ns_set size $r] } { incr a } { ns_puts "[ns_set key $r $a] ==> [ns_set value $r $a]<br>" } %> </pre> <form method=post action=test_form.adp?arg1=val1> Value for arg1: <input name=arg2 type=text value=val2 size=10> <p> <input value="Go Here to test POST" type=submit> <p> <a href=test_form.adp?arg1=val1>Go here to test GET</a> </form>
