Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Jun 1, 2021
1 parent 7c5c80a commit 8fcc608
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nats-base-client/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,15 @@ export class MsgHdrsImpl implements MsgHdrs {
} else {
lines.slice(1).map((s) => {
if (s) {
const idx = s.indexOf(": ");
let offset = 2;
let idx = s.indexOf(": ");
if (idx === -1) {
// java is not writing the space
idx = s.indexOf(":");
offset = 1;
}
const k = s.slice(0, idx);
const v = s.slice(idx + 2);
const v = s.slice(idx + offset);
mh.append(k, v);
}
});
Expand Down

0 comments on commit 8fcc608

Please sign in to comment.