This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans IDE Dev (Build 20080923152338) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13 System: Windows XP version 5.1 1. open Debugging | Http Client Monitor 2. attach debugger, select firefox, with url: http://www.degraeve.com/reference/simple-ajax-example.php 3. interact with data and press Go button 4. filter XHR request and select the POST 5. See the http response body below in monitor 6. View web page: >data is missing from teh web page 7. Stop session. Verify interaction with web page to see data expected on page.
For xml http requests, we use the XMLHttpRequest.onreadystatechange property to wait until the response is ready before sending the response (for both GET and POST xml http requests). However, many pages also use the onreadystatechange property to do essentially the same thing, so if we overwrite the property, the page's event handler is also overwritten. Two possible fixes: 1) Don't use onreadystatechange, but send back whatever data is available from the request as soon as the mozilla observer service notifies the extension that the response is available. This will always work, but in many cases, the xhr responses will not be available (either body not available, or body content at 0 bytes). 2) Call an existing onreadystatechange in the onreadystatechange function that we create. I haven't seen any cases where this can break a page, but it is theoretically possible, since we are modifying JavaScript objects that are used by the monitored page.
Fixed by calling the previous value of onreadystatechange on the event handler that the NetBeans extension registers. Changeset: a36db6f39dde
Integrated into 'main-golden', will be available in build *200809251401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a36db6f39dde User: Quy Nguyen <quynguyen@netbeans.org> Log: #148304 - Fix issue with XMLHttpRequest.onreadystatechange by also invoking the previous value of onreadystatechange.
Verified in NetBeans IDE Dev (Build 20080926114356)