Donate Share

httpunit

File Release Notes and Changelog

Release Name: 1.4

Notes:
    1. Parameter validation is now handled by the form. Requests created from the form while parameter validation is
       enabled will share the variable space of the form and therefore be validated. Requests created while validation
       is disabled will have their own variable space, which is initialized to that of the form.
    2. The decision as to whether a response will throw an exception if its status is 4xx or 5xx is now controlled by
       the exceptionsThrownOnErrorStatus property of WebClient and its subclasses (WebConversation, ServletUnitClient).
       This property is initialized from the HttpUnitOptions property of the same name when the WebClient object is
       created. This allows finer control over this behavior. Tests which depend on this setting should no longer
       interfere with one another.


Changes: Problems fixed: 1. hasParameterNamed and hasParameterStartingWithPrefix now check all types of parameters, not just <INPUT> fields 2. (bug #492003) JTidyPrintWriter fails to parse columns 3. Empty cookies were not being recognized. 4. Parameters are now submitted in the order specified in the form, as long as parameter validation is not turned off. 5. It is no longer permitted to change hidden parameters with parameter validation enabled. 6. Subframes with the same names as others in the same tree no longer cause an infinite loop / stack overflow 7. Link parameters are now sent in the proper order, as long as parameter validation is not turned off. 8. Parameter validation is now done for requests built from links 9. Control characters and spaces created by breaking HTML in the middle are now trimmed from link parameters. 10. Forms with query strings included in the action attribute now are submitted with that string intact. 11. (bug #490821) Javadoc generation no longer gives errors 12. (bug #524627) Null pointer exception in NodeUtils.convertNBSP 13. (bug #513051) Multiple headers with the same name are now handled independantly Additions: Content and parsing enhancements: 1. Disabled submit buttons are now detected, but requests cannot be made from them unless parameter validation is off. 2. HttpUnit now handles multiple file form controls with the same name. 3. WebResponse now has a getSubframeContents method which returns the contents of a subframe of the frame represented by the response. 4. gzip-encoded responses are now handled ServletUnit enhancements 5. ServletUnit now supports the web.xml <context-param> tag. 6. ServletUnit now supports the HttpServletRequest.getRequestURI method 7. ServletUnit now supports defining (and retrieving) a non-empty context path for a web application 8. ServletUnit now supports wild-cards in web.xml servlet mapping 9. ServletUnit now supports creating a RequestDispatcher from ServletContext to forward to other servlets. Support for this is rudimentary at present: query parameters on the request dispatcher create are ignored. Form manipulation enhancements: 10. It is now possible to set values for a form directly into the WebForm object. All such changes will be validated. These will be used by any requests derived from the form. 11. Parameters defined in form query strings are now included in the known parameters of a form and requests built from it. 12. Form parameters can be reset to their initial values using WebForm.reset(). 13. You can now change the position of an image button click in a request with WebRequest.setImageButtonClickPosition() Test properties enhancements: 14. You can now call HttpUnitOptions.setAutoRedirect( false ) to enable explicit testing of redirect requests. 15. WebClient now has an exceptionsThrownOnErrorStatus property to control this behavior per client. Extensibility enhancements: 16. HttpUnit can now use any jaxp-compliant parser, rather than just xerces. 17. MessageBodyWebRequest's constructors and inner class are now public, allowing outside code to create new request classes. 18. WebClient now exposes the protected method writeMessageBody to ease implementation of new subclasses 19. WebClient can now accept a listener of type WebClientListener to report on each request sent and response received.