Skip to content

Commit

Permalink
empty body added in response
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranav-b-7 committed Feb 3, 2021
1 parent b6c4416 commit 7dc450c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class OpsmxVisibilityController {
headers.add(header.getName(), header.getValue())
})
String responseBody = new String(IOUtils.toByteArray(inputStream))
if (responseBody == null){
responseBody = new String()
}
return new ResponseEntity(responseBody, headers, HttpStatus.valueOf(response.getStatus()))
} finally{
if (inputStream!=null){
Expand All @@ -87,6 +90,9 @@ class OpsmxVisibilityController {
headers.add(header.getName(), header.getValue())
})
String responseBody = new String(IOUtils.toByteArray(inputStream))
if (responseBody == null){
responseBody = new String()
}
return new ResponseEntity(responseBody, headers, HttpStatus.valueOf(response.getStatus()))
} finally{
if (inputStream!=null){
Expand Down

0 comments on commit 7dc450c

Please sign in to comment.