Skip to content

Commit

Permalink
fix(cira): clears the wsman response messages once parsed (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhavilosetty-intel authored Dec 15, 2021
1 parent fcf31fb commit 2187eeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/amt/CIRAHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class CIRAHandler {
handleAuth (content: string): DigestChallenge {
logger.debug(content)
const message = httpZ.parse(content)
this.rawChunkedData = ''
const found = message.headers.find(item => item.name === 'Www-Authenticate')
if (found != null) {
return this.httpHandler.parseAuthenticateResponseHeader(found.value)
Expand All @@ -157,6 +158,7 @@ export class CIRAHandler {
parseBody (body: string): any {
let xmlBody: string = ''
const message = httpZ.parse(body)
this.rawChunkedData = ''
logger.debug(body)
// parse the body until its length is greater than 5, because body ends with '0\r\n\r\n'
while (message.body.text.length > 5) {
Expand Down

0 comments on commit 2187eeb

Please sign in to comment.