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

[TIMOB-20367] Android: fix file leak in HTTPClient #10055

Merged
merged 5 commits into from May 17, 2018

Conversation

drauggres
Copy link
Contributor

@drauggres drauggres commented May 16, 2018

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

Save large HTTP responses in "temp storage" instead of 'app-data://'.

@build
Copy link
Contributor

build commented May 16, 2018

Messages
📖

🎉 Another contribution from our awesome community member, drauggres! Thanks again for helping us make Titanium SDK better. 👍

📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@hansemannn hansemannn added this to the 7.3.0 milestone May 16, 2018
@garymathews garymathews added bug and removed no tests labels May 16, 2018
Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

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

CR: PASS
FT: PASS

TEST CASE
const win = Ti.UI.createWindow({ backgroundColor: 'gray' }),
    client = Ti.Network.createHTTPClient({
        onload: (e) => {
            const isTemp = e.source.responseData.nativePath.includes('cache/_tmp') !== -1;
            alert(`path: ${e.source.responseData.nativePath}\n\nisTemp: ${isTemp}`);
        },
        onerror: (e) => {
            Ti.API.error(e.error);
        },
        timeout: 3000
    });

client.open('GET', 'https://www.nasa.gov/sites/default/files/thumbnails/image/sun_0.jpg');
client.send();

win.open();

@hansemannn hansemannn merged commit 91e7049 into tidev:master May 17, 2018
@drauggres drauggres deleted the TIMOB-20367 branch May 17, 2018 07:59
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

4 participants