What the client sends as the filename is more or less undefined. You should always strip the path information from the filenames in your CGI scripts.
If the site you're automating is not under your control, you have two choices: Either write the author of HTML::Form with a bug report and possibly a test program exercising the bug, or patch HTML::Form dynamically in your code, assuming that the sub was originally called 'legacy_code' :
use HTML::Form; { no warnings 'redefine'; *HTML::Form::FileInput::legacy_code = sub { ... fixed code ... };
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
In reply to Re: File upload w/WWW::Mechanize
by Corion
in thread File upload w/WWW::Mechanize
by jkenneth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |