Project: titanium
Issue TIMOB-17585: Android: HTTPClient: Invalid Status Codes returned in 3.3.0.GA SDK
h4. Problem Description When a GET request should be returning a status of "301" or "302", I have the 3.3.0 GA SDK returning a "200". Switching back to the 3.2.3 GA SDK fixes the problem. When we have tested using the following code, the status returned is "302" in 3.3.0.GA and "301" in 3.2.3.GA. h4. Steps to reproduce a) Create a simple project. b) Update this code in app.js: {code}var xhr = Titanium.Network.createHTTPClient(); xhr.autoRedirect = false; xhr.allResponseHeaders = true; // what to do if it loads xhr.onload = function(e) {	Ti.API.log('Status = ' + this.getStatus());	if (this.getStatus() == 301) {	Ti.API.log('Redirect to ' + this.getResponseHeader('location'));	} else {	Ti.API.log('This should have returned a 301 not a 200');	} }; xhr.open('GET', 'http://google.co.nz'); xhr.send();{code} c) Run this with testing environment h4. Test results In Titanium SDK: 3.3.0.GA [DEBUG]: Application booted in 125.191987 ms [INFO] : Status = 302 [INFO] : This should have returned a 301 not a 200 In Titanium SDK: 3.2.3.GA [DEBUG]: Application booted in 110.395968 ms [INFO] : Status = 301 [INFO] : Redirect to http://www.google.co.nz/
Story points: 5