[Httpunit-commit] CVS: httpunit/doc faq.html,1.22,1.23 release_notes.txt,1.244,1.245
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-01-13 21:58:09
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1:/tmp/cvs-serv18943/doc Modified Files: faq.html release_notes.txt Log Message: Upgraded to NekoHTML 0.7.2 Index: faq.html =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/faq.html,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- faq.html 3 Nov 2002 18:18:19 -0000 1.22 +++ faq.html 13 Jan 2003 21:57:29 -0000 1.23 @@ -50,16 +50,12 @@ <A NAME="charset"><h3>Why isn't HttpUnit handling my non-English pages?</h3></A> -Older versions of HttpUnit (through 1.2) incorrectly assumed that all pages were in the default character set for the client platform. -As of version 1.2.1, HttpUnit correctly recognizes the charset parameter of the Content-type header which may -specify an alternative character set; -when none is specified, HTML 1.1 says that the character set is to be taken as iso-8859-1. +When no Content-Type header is specified, HTML 1.1 says that the character set is to be taken as iso-8859-1. Unfortunately, some HTTP servers do not send this parameter correctly, and many browsers incorrectly use this -as an indication that they should -determine the character set in some other fashion. To imitate this behavior, HttpUnit allows you to set the expected character +as an indication that they should determine the character set in some other fashion. To imitate this behavior, +HttpUnit allows you to set the expected character set for future pages by calling HttpUnitOptions.setDefaultCharacterSet(). This setting will not apply to those -pages for which the server specifies -the character set. +pages for which the server specifies the character set. <p> Non-English form handling is supported as well. Any parameter values entered into a form will be encoded as the same character set as the document containing the form. The server code will then have to handle those characters @@ -78,15 +74,15 @@ <h2>Form Handling Problems</h2> <A NAME="buttons"><h3>HttpUnit is not finding the buttons and parameters in my forms. What is wrong?</h3></A> -If you are using JTidy (the HTML parser originally used by HttpUnit), this can happen when your HTML is not valid. -Most browsers are extremely forgiving of bad HTML; however, JTidy is not. It expects tags to be nested according to the HTML -specification and will reject any that are not. JTidy can display error messages to tell you what is wrong. To see them, -call <code>HttpUnitOptions.setParserWarningsEnabled( true )</code> before retrieving your HTML page. -Once you have corrected any errors, HttpUnit should see your form buttons and parameters. +Usually this indicates some poor nesting of <form> tags. Browsers are extremely forgiving of bad HTML, even +handling cases where it is impossible to turn that HTML into a DOM. When a parser encounters such code, it tries +to "fix it" which may not generate exactly the intended results. As of version 1.5.2, HttpUnit is a lot more forgiving, +considering controls to belong to the last opened <form> tag, even it was presumed to have been closed. This +seems to match what most browsers do. Under some circumstances switching among the supported parsers may give different +results. -The <a href="http://www.apache.org/~andyc/neko/doc/html/">NekoHTML parser</a>, a much more forgiving parser, is the -parser used by default as of HttpUnit 1.5. It is strongly recommended that you use it in preference to JTidy, -as it should correct problems like this. +Note that JTidy can display error messages to tell you when there are problems with your HTML. To see them, +call <code>HttpUnitOptions.setParserWarningsEnabled( true )</code> before retrieving your HTML page. <A name="#hidden"><h3>Why can't I change hidden parameter values?</h3></A> By default, HttpUnit verifies any parameter value changes against the form containing them. Since a user cannot directly Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.244 retrieving revision 1.245 diff -u -r1.244 -r1.245 --- release_notes.txt 10 Jan 2003 18:21:41 -0000 1.244 +++ release_notes.txt 13 Jan 2003 21:57:30 -0000 1.245 @@ -11,6 +11,9 @@ Revision History: +13-Jan-2002 + Notes: upgraded NekoHTML to 0.7.2 which no longer generates superfluous <form> tags. + 10-Jan-2003 Thanks to Alex Beggs for noting the mishandling of non-JavaScript scripts and providing a test case. |