Skip to content

Commit 953c913

Browse files
committed
debuggre jsorpc payload formatting nitpicks
1 parent 43485e5 commit 953c913

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

debugger/action.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,10 @@
241241
}
242242
// hack! build payload by hand
243243
if ($wstype == 2) {
244+
$payload = rtrim($payload, "\n");
244245
$payload = "{\n" .
245246
'"jsonrpc": "2.0"' . ",\n" .
246-
'"method": "' . $method . "\",\n\"params\": [" .
247+
'"method": "' . $method . "\",\n\"params\": [\n" .
247248
$payload .
248249
"\n]";
249250
if ($action == "notification") {
@@ -259,8 +260,9 @@
259260
$msg[0]->setPayload($payload);
260261
$msg[0]->setJsonRpcVersion('2.0');
261262
} elseif ($wstype == 1) {
263+
$payload = rtrim($payload, "\n");
262264
$payload = "{\n" .
263-
'"method": "' . $method . "\",\n\"params\": [" .
265+
'"method": "' . $method . "\",\n\"params\": [\n" .
264266
$payload .
265267
"\n],\n\"id\": ";
266268
if ($action == "notification") {

0 commit comments

Comments
 (0)