You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2019/12/03 19:51:13 UTC

[royale-asjs] branch develop updated: bugfix: Make sure that HTTPService does not cache the decoded json from the previous response.

This is an automated email from the ASF dual-hosted git repository.

gregdove 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 6f9e876  bugfix: Make sure that HTTPService does not cache the decoded json from the previous response.
6f9e876 is described below

commit 6f9e87689d11b17f8e85ad7d0c73c31178eb7211
Author: greg-dove <gr...@gmail.com>
AuthorDate: Wed Dec 4 08:50:27 2019 +1300

    bugfix: Make sure that HTTPService does not cache the decoded json from the previous response.
---
 .../Network/src/main/royale/org/apache/royale/net/HTTPService.as      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/HTTPService.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/HTTPService.as
index 797e68b..667d99c 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/HTTPService.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/HTTPService.as
@@ -703,6 +703,8 @@ package org.apache.royale.net
         COMPILE::SWF
         protected function completeHandler(event:flash.events.Event):void
         {
+            //unset any json Object decoded (and cached) from previous response first:
+            _json = null;
             dispatchEvent(new Event(event.type));
         }
         
@@ -718,6 +720,8 @@ package org.apache.royale.net
                 dispatchEvent(HTTPConstants.RESPONSE_STATUS);
                 dispatchEvent(HTTPConstants.STATUS);
             } else if (element.readyState == 4) {
+                //unset any json Object decoded (and cached) from previous response first:
+                _json = null;
                 dispatchEvent(HTTPConstants.COMPLETE);
             }
         }