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

carlosrovira 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 9efd0d4  amfchannel: ensure headers are not undefined, this is needed 
in shared enviroments when the application can be hosted in a domain but served 
through other domain. In this cases interacting with AMF can produce access 
denied (401) errors that can generate messages without headers, but we still 
want Royale executes its faulhandler
9efd0d4 is described below

commit 9efd0d41ef153025d20447362ec1b66c1889303c
Author: Carlos Rovira <[email protected]>
AuthorDate: Tue Mar 19 18:36:56 2019 +0100

    amfchannel: ensure headers are not undefined, this is needed in shared 
enviroments when the application can be hosted in a domain but served through 
other domain. In this cases interacting with AMF can produce access denied 
(401) errors that can generate messages without headers, but we still want 
Royale executes its faulhandler
---
 .../MXRoyale/src/main/royale/mx/messaging/channels/AMFChannel.as      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/messaging/channels/AMFChannel.as
 
b/frameworks/projects/MXRoyale/src/main/royale/mx/messaging/channels/AMFChannel.as
index 8803f6b..3938a04 100644
--- 
a/frameworks/projects/MXRoyale/src/main/royale/mx/messaging/channels/AMFChannel.as
+++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/messaging/channels/AMFChannel.as
@@ -542,11 +542,11 @@ public class AMFChannel extends NetConnectionChannel
                 _log.debug("'{0}' fault handler called. {1}", id, 
msg.toString());
 
                 // Set the server assigned RoyaleClient Id.
-                if (RoyaleClient.getInstance().id == null && 
msg.headers[AbstractMessage.FLEX_CLIENT_ID_HEADER] != null)
+                if (RoyaleClient.getInstance().id == null && msg.headers != 
undefined && msg.headers[AbstractMessage.FLEX_CLIENT_ID_HEADER] != null)
                     RoyaleClient.getInstance().id = 
msg.headers[AbstractMessage.FLEX_CLIENT_ID_HEADER];
 
                 // Process the features advertised by the server endpoint.
-                if (msg.headers[CommandMessage.MESSAGING_VERSION] != null)
+                if (msg.headers != undefined && 
msg.headers[CommandMessage.MESSAGING_VERSION] != null)
                 {
                     var serverVersion:Number = 
msg.headers[CommandMessage.MESSAGING_VERSION] as Number;
                     handleServerMessagingVersion(serverVersion);

Reply via email to