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.
Summary: | Http Client Monitor: POST data lost | ||
---|---|---|---|
Product: | javascript | Reporter: | _ krystyna <krystyna> |
Component: | Debugger | Assignee: | Quy Nguyen <quynguyen> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
_ krystyna
2008-09-25 00:50:19 UTC
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) |