Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11751] Android: HTTPClient.onreadystatechange not dispatched

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-11-14T00:33:17.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 API
ComponentsAndroid
Labels3.0.0beta2, module_network, qe-testadded, regression, triage
ReporterJosh Roesslein
AssigneePing Wang
Created2012-11-13T18:56:11.000+0000
Updated2013-10-03T07:30:19.000+0000

Description

The HTTPClient on Android is not dispatching the callback "onreadystatechange". There appears to be a typo in TiHTTPClient.java with the callback being named "onreadystatechanged" (notice the 'd' at the end). Along with fixing this typo we should create a new Anvil test case to catch future regressions in the HTTP callbacks. At least verify each one fires at the correct time.

Comments

  1. Ping Wang 2012-11-13

    PR: https://github.com/appcelerator/titanium_mobile/pull/3420 Steps for FR: 1. Run the test case below on both rhino and v8:
       var xhr = Titanium.Network.createHTTPClient();
       xhr.onreadystatechange = function()
       {
          Ti.API.info("************************** xhr.onreadystatechange");
       }
       // open the client
       xhr.open('GET','http://www.appcelerator.com/assets/The_iPad_App_Wave.pdf');
       	
       // send the data
       xhr.send();
       
    2. Check the console. Should see the log:
       I/TiAPI   (27676): ************************** xhr.onreadystatechange
       
    3. Run Anvil -> network_httpclient -> callbackTestForGETMethod/callbackTestForPOSTMethod. The tests should pass on v8. They fail on rhino for now. Already filed TIMOB-11758 for this issue.
  2. Ping Wang 2012-11-14

    3_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/3423
  3. Tamila Smolich 2012-12-05

    Closing as fixed. Tested on: Titanium Studio, build: 3.0.0.201211301903 Titanium SDK, builds: 3.0.0.v20121204181658; 3.1.0.v20121203181001 Devices: Motorola RAZR i XT890 (4.0.4)

JSON Source