This is an automated email from the ASF dual-hosted git repository.
Harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 38fe217dcf Only read resultString once.
38fe217dcf is described below
commit 38fe217dcf455d3c9e96a3f066d01a0dc8bec885
Author: Harbs <[email protected]>
AuthorDate: Tue Jun 2 13:03:14 2026 +0300
Only read resultString once.
---
.../royale/org/apache/royale/utils/async/HttpRequestTask.as | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git
a/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
b/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
index 966a07f7d4..b870da2418 100644
---
a/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
+++
b/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
@@ -65,15 +65,18 @@ package org.apache.royale.utils.async
* parameters is any object URLRequest can accept
*/
public var parameters:Object;
-
+ private var _resultString:String;
public function get resultString():String
{
- var l:URLBinaryLoader = loader;
- if(l && l.data)
+ if(_resultString == null)
{
- return l.data.readUTFBytes(l.data.length);
+ var l:URLBinaryLoader = loader;
+ if(l && l.data)
+ _resultString =
l.data.readUTFBytes(l.data.length);
+ else
+ _resultString = "";
}
- return "";
+ return _resultString;
}
/**
* We try to parse the httpResult as JSON. If that fails, it
defaults to a string.