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-16185-Use GZipInputStream if the cached content is gzip #5985

Merged
merged 2 commits into from Oct 10, 2014

Conversation

salachi
Copy link
Contributor

@salachi salachi commented Aug 25, 2014

If the cached content is 'gzip', wrap the stream with GZipInputStream to properly unzip the content.

https://jira.appcelerator.org/browse/TIMOB-16185


protected String getHeader(Map<String, List<String>> headers, String header)
protected static String getHeader(Map<String, List<String>> headers, String header)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you change it to static method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am calling getHeader from the static function openCachedStream also.

@pingwang2011 pingwang2011 self-assigned this Aug 27, 2014
@hieupham007
Copy link
Contributor

Sunil, please address Ping's comment

@pingwang2011
Copy link
Contributor

Sunil, can you merge the PR with master?

@@ -302,6 +319,18 @@ public CacheResponse get(URI uri, String rqstMethod,
}

// Read in the headers
Map<String, List<String>> headers = readHeaders(hFile);
Copy link
Contributor

Choose a reason for hiding this comment

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

What if it throws IOException?

Copy link
Contributor

Choose a reason for hiding this comment

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

NV.

@pingwang2011
Copy link
Contributor

Code reviewed and functionally tested. Accepted

pingwang2011 added a commit that referenced this pull request Oct 10, 2014
TIMOB-16185-Use GZipInputStream if the cached content is gzip
@pingwang2011 pingwang2011 merged commit 1623cfd into tidev:master Oct 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants