AW: Invalid file upload
"EdA-qa Mort-ora-y" <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
> > script I check if the uploaded file was valid or not. If it wasn't > > valid I print "Bad file upload". > Um, doesn't the browser do that for you? How would a user submit a > bad file? There are a few cases in browsers where they will incorrectly upload a file, though they are probably not generally encountered by users. These cannot be directly generated with HTTPUnit. In any case however, what "incorrect" means is basically that one of the elements of the POST request is not as expected. Some actual symptoms are: -missing data (same as a zero length file) -missing filename (technically this is optional anyways) -wrong encoding/charset (the browser has to guess, so this happen sometimes) -incomplete file (perhas a timeout problem) In order to simulate this in HTTPUnit you would need to manually construct the POST request body and then create the Post request in HTTPUnit with the appropriate headers/body. _______________________________________________ Httpunit-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/httpunit-develop ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642