Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6_1_X][TIMOB-20247] Regression in android HTTPClient #9001

Merged
merged 4 commits into from May 10, 2017

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Apr 28, 2017

Send ready state after getting the headers and the status. Change indentation.

JIRA: https://jira.appcelerator.org/browse/TIMOB-20247

Send ready state after getting the headers and the status. Change indentation.
@ypbnv ypbnv added the android label Apr 28, 2017
@garymathews garymathews added this to the 6.1.0 milestone May 2, 2017
@garymathews garymathews added the bug label May 2, 2017
@garymathews garymathews changed the title [TIMOB-20247] Regression in android HTTPClient [6_1_X][TIMOB-20247] Regression in android HTTPClient May 2, 2017
}

// If no charset is defined, default to UTF-8
if ("".equals(charset)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably optimise this if statement while making changes here

if (charset.isEmpty()) {

@ssjsamir ssjsamir self-requested a review May 10, 2017 21:27
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Master: #8997

FR Passed: Was able to get a response using the test case provided in https://jira.appcelerator.org/browse/TIMOB-20247 without getting any errors.

Test steps

var xhr = Titanium.Network.createHTTPClient();
 
xhr.onreadystatechange = function() {
    if (3 == xhr.readyState) {
        console.log(xhr.getResponseHeader('Last-Modified'));
    }
 
};
 
xhr.open('GET', 'http://www.appcelerator.com/assets/The_iPad_App_Wave.pdf');
 
xhr.send();
  • Pasted the code in to a titanium project
  • Ran the program
  • Saw the following response in the console and application showed no errors
[INFO] :   Thu, 04 May 2017 16:24:20 GMT
[INFO] :   Thu, 04 May 2017 16:24:20 GMT

Environment
Appcelerator Command-Line Interface, version 6.2.0
Samsung Galaxy S4 (Running android 4.4.4)
Operating System Name: Mac OS X El Capitan
Operating System Version: 10.11.6
Node.js Version: 4.6.0
npm: 4.2.8
Xcode: 8.2
Appcelerator Studio: 4.8.1.201612050850

@ssjsamir ssjsamir merged commit d64af89 into tidev:6_1_X May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants