Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 48496
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: MSCHILLI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 5.830
Fixed in: (no value)



Subject: HTML::Form not submitting submit button name/value
If you have a HTML form like <form> <input type=submit value="Upload it!" name=n> <input type=text name=t value="1"> </form> then after clicking on the 'submit' button, the browser will send a query string like ?n=Upload+it!&t=1 to the server. HTML::Form, however, skips the name/value of the submit button and just sends ?t=1. Is this intentional or an oversight? -- Mike P.S.: So I turned to the libwww test suite and looked at t/html/form.t: $f = HTML::Form->parse(<<'EOT', "http://localhost/"); <form> <input type=submit value="Upload it!" name=n disabled> <input type=image alt="Foo"> <input type=text name=t value="1"> </form> EOT #$f->dump; ok($f->click->as_string, <<'EOT'); GET http://localhost/?x=1&y=1&t=1 EOT Is "x=1&y=1" a standard if there's an input image? My browser (FF3) doesn't seem to think so.
Not a bug, click() selects the image instead of the button, hence no mention of its name in the query string. Closing.