Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Don't cleanup response content for invalid json strings. #166 WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ufna committed May 30, 2018
1 parent 4c19727 commit e24ca58
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Source/VaRestPlugin/Private/VaRestRequestJSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,15 @@ bool UVaRestRequestJSON::HasTag(FName Tag) const

FString UVaRestRequestJSON::GetResponseContentAsString(bool bCacheResponseContent)
{
// Check we have valide response
if (!bIsValidJsonResponse || !ResponseJsonObj || !ResponseJsonObj->IsValidLowLevel())
// Check we have valid json response
if (!bIsValidJsonResponse)
{
// We've cached response content in OnProcessRequestComplete()
return ResponseContent;
}

// Check we have valid response object
if (!ResponseJsonObj || !ResponseJsonObj->IsValidLowLevel())
{
// Discard previous cached string if we had one
ResponseContent = DeprecatedResponseString;
Expand Down

0 comments on commit e24ca58

Please sign in to comment.