Skip to content

Commit

Permalink
ignore payload key-value if value is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Sep 27, 2023
1 parent 2d3ce98 commit 0f5244b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/client/testing/testController/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ export function parseJsonRPCHeadersAndData(rawData: string): ParsedRPCHeadersAnd
break;
}
const [key, value] = line.split(':');
if ([JSONRPC_UUID_HEADER, JSONRPC_CONTENT_LENGTH_HEADER, JSONRPC_CONTENT_TYPE_HEADER].includes(key)) {
headerMap.set(key.trim(), value.trim());
if (value) {
if ([JSONRPC_UUID_HEADER, JSONRPC_CONTENT_LENGTH_HEADER, JSONRPC_CONTENT_TYPE_HEADER].includes(key)) {
headerMap.set(key.trim(), value.trim());
}
}
}

Expand Down

0 comments on commit 0f5244b

Please sign in to comment.