Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-24911

SWFLoader causes encoding problems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 4.0 (Release)
    • None
    • mx: SWFLoader
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Make an HTTP request with encoded characters, as in the sample below (Emily%23):

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
      <mx:Script>
      <![CDATA[
      [Bindable]
      // encoded # to be sent to our server
      private var src:String="http://amandeep3.corp.adobe.com:8080/is/agm/glenn-files/SDKTemplate?hei=300&$Name=Emily%23Bill&fmt=jpg&page=1";

      // unencoded # to be sent to our server
      [Bindable]
      private var src2:String="http://amandeep3.corp.adobe.com:8080/is/agm/glenn-files/SDKTemplate?hei=300&$Name=Emily#Bill&fmt=jpg&page=1";
      ]]
      >
      </mx:Script>
      <mx:VBox width="100%" height="100%">
      <mx:Image source="

      {src}" height="200"/>
      <mx:Label text="{src}

      "/>
      <mx:Image source="

      {src2}" height="200"/>
      <mx:Label text="{src2}

      "/>
      </mx:VBox>
      </mx:Application>

      Actual Results:
      Encoded characters in source string are double-encoded, causing the HTTP request to fail. This behavior was introduced in Flex 4.0, in SWFLoader.

      Expected Results:
      Encoding of the source string would not be changed. We go to great lengths to encode our requests, and cannot have the framework overriding this.

      Workaround (if any):
      NONE, except to monkey patch SWFLoader. We changed SWFLoader.OSToPlayerURI to return the url unchanged:

      private function OSToPlayerURI(url:String, local:Boolean):String

      { return url; /* url = decodeURI(url); if (local && flash.system.Capabilities.playerType == "ActiveX") return url; return encodeURI(url); */ }

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: