Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11758

Android: HTTPClient: the payload for the callbacks ondatastream and onsendstream is incorrectly set on Rhino

    Details

      Description

      This is a regression. This does not happen on 2.1.3.GA.
      Failed case 1:

      var xhr = Titanium.Network.createHTTPClient();
       
      xhr.onreadystatechange = function(e) {
      	Ti.API.info("************************** xhr.onreadystatechange: this.readyState = " + this.readyState);
      }
       
      xhr.ondatastream = function(e) {
      	Ti.API.info("^^^^^^^^^^^^^^^^^^^^^^^^^^ xhr.ondatastream = " + e.progress);
      }
       
      xhr.open('GET','http://www.appcelerator.com/assets/The_iPad_App_Wave.pdf');
      xhr.send();
      
      

      Failed case 2:

      var xhr = Titanium.Network.createHTTPClient();
       
      xhr.onreadystatechange = function(e) {
      	Ti.API.info("************************** xhr.onreadystatechange: this.readyState = " + this.readyState);
      }
       
      xhr.onsendstream = function(e) {
      	Ti.API.info("-------------------------- xhr.onsendstream = " + e.progress);
      }
       
      xhr.open('POST', 'https://twitpic.com/api/uploadAndPost');
       
      var buffer = Ti.createBuffer({
      	length : 1024 * 10
      }).toBlob();
       
      xhr.send({
      	data : buffer,
      	username : 'fgsandford1000',
      	password : 'sanford1000',
      	message : 'check me out'
      });
      

      Actual result:
      The log shows:

      I/TiAPI   (11891): ^^^^^^^^^^^^^^^^^^^^^^^^^^ xhr.ondatastream = undefined
      

      or

      I/TiAPI   (11891): -------------------------- xhr.onsendstream = undefined
      

      Expected result:
      The log shows the numerical progress for datastream / sendstream.

        Attachments

          Activity

            People

            • Assignee:
              pwang Ping Wang
              Reporter:
              pwang Ping Wang
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-14939
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code