Skip to content

Commit

Permalink
fix: preserve new lines in response body. #223
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhendumadhukar committed Jul 28, 2023
1 parent f99e0d3 commit 61da2f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser/HttpParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class HttpParser {
}
}
if (PARSE_BODY) {
responseBody = responseBody + "\n" + line;
responseBody = responseBody + "<br/>" + line;
}
if (index == fileContent.length - 1) {
if (responseBody.includes("camouflage_file_helper")) {
Expand Down Expand Up @@ -244,6 +244,7 @@ export class HttpParser {
request: this.req,
logger: logger,
});
response.body = response.body.split("<br />").join("\n").trim()
return response;
break;
}
Expand All @@ -260,6 +261,7 @@ export class HttpParser {
request: this.req,
logger: logger,
});
response.body = response.body.split("<br/>").join("\n").trim()
return response;
}
response.body = responseBody;
Expand Down

0 comments on commit 61da2f5

Please sign in to comment.