| Summary: | Node debug command does not return proper debug URL after upgrading nodejs to version 0.10.3 | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Node | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ken_walker, mamacdon |
| Version: | 2.0 | ||
| Target Milestone: | 3.0 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
libing wang
Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=18560301848fd31eec21ca47fa0301f75d710e4f. The url.format function in 0.10.3 was changed so that the 'pathname' parameter passed to the function is URI encoded on '?' mark. In Orion node we were using this function and passed "/debug?port=portNumber" as the pathname of the function. It did not encode the ? mark in 0.8.14. I read the latest nodejs document(http://nodejs.org/api/url.html) for URL. I realized that we should pass "/debug" as the pathname and {port: portNumber} as another parameter query. So the proper code that matches the latest nodejs URL spec is something like this : return url.format({ protocol: debugMeta.protocol, hostname: hName, port: debugMeta.port, pathname: debugMeta.pathname,//"debug" query: debugMeta.query //{port: 6001} }); We could even just concatenate the hard coded string "/debug?port=portNumber" to the resolved URL but I hate to do so. |