Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrennie2010-11-16 10:14:36 -0500
committermrennie2010-11-16 10:14:36 -0500
commite2a86d819238445d6aeb2850b39104e3d26a8a90 (patch)
tree735fa63d038e4f0d7cfc94691974f941bb29d26f /development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome
parent5ef9d16e36ac7df6ffa68311454c2402978263f8 (diff)
downloadwebtools.jsdt.debug-e2a86d819238445d6aeb2850b39104e3d26a8a90.tar.gz
webtools.jsdt.debug-e2a86d819238445d6aeb2850b39104e3d26a8a90.tar.xz
webtools.jsdt.debug-e2a86d819238445d6aeb2850b39104e3d26a8a90.zip
playing around with packet headers
Diffstat (limited to 'development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome')
-rw-r--r--development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/connect/ChromeAttachingConnector.java2
-rw-r--r--development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/transport/JSON.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/connect/ChromeAttachingConnector.java b/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/connect/ChromeAttachingConnector.java
index f3d7360..3d355a2 100644
--- a/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/connect/ChromeAttachingConnector.java
+++ b/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/connect/ChromeAttachingConnector.java
@@ -46,7 +46,7 @@ public class ChromeAttachingConnector implements AttachingConnector {
public Map defaultArguments() {
Map args = new HashMap();
args.put(HostArgument.HOST, new HostArgument(null));
- args.put(PortArgument.PORT, new PortArgument(5000));
+ args.put(PortArgument.PORT, new PortArgument(9222));
args.put(TimeoutArgument.TIMEOUT, new TimeoutArgument());
args.put(BrowserArgument.BROWSER, new BrowserArgument());
return args;
diff --git a/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/transport/JSON.java b/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/transport/JSON.java
index e6f001b..fc327de 100644
--- a/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/transport/JSON.java
+++ b/development/org.eclipse.wst.jsdt.debug.chrome/src/org/eclipse/wst/jsdt/debug/internal/chrome/transport/JSON.java
@@ -232,7 +232,7 @@ public final class JSON {
*/
public static void writeToolHeader(StringBuffer buffer, String tool) {
StringBuffer buff = new StringBuffer(18);
- buff.append(TOOL_HEADER).append(tool).append(LINE_FEED);
+ buff.append(TOOL_HEADER).append(tool).append(LINE_FEED).append(LINE_FEED);
buffer.insert(0, buff);
}
@@ -247,9 +247,9 @@ public final class JSON {
Object json = packet.toJSON();
StringBuffer buffer = new StringBuffer();
writeValue(json, buffer);
- int length = buffer.length();
- writeContentLength(buffer, length);
+ int length = buffer.toString().getBytes().length;
writeToolHeader(buffer, packet.tool());
+ writeContentLength(buffer, length);
if(TRACE) {
Tracing.writeString("SERIALIZE: " + packet.getType() +" packet as "+buffer.toString()); //$NON-NLS-1$ //$NON-NLS-2$
}

Back to the top