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

Support GZip compression when fetching discovery URL #259

Merged
merged 2 commits into from
Mar 18, 2019
Merged

Support GZip compression when fetching discovery URL #259

merged 2 commits into from
Mar 18, 2019

Conversation

qdii
Copy link
Contributor

@qdii qdii commented Feb 25, 2019

No description provided.

@googlebot
Copy link
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

apitools/gen/util.py Outdated Show resolved Hide resolved
apitools/gen/util.py Outdated Show resolved Hide resolved
@qdii
Copy link
Contributor Author

qdii commented Mar 7, 2019

Looks like my last commit broke compatibility with python2, working on a patch…

@qdii
Copy link
Contributor Author

qdii commented Mar 7, 2019

Should be good now.

@coveralls
Copy link

coveralls commented Mar 7, 2019

Coverage Status

Coverage increased (+0.05%) to 91.747% when pulling adc6c2e on qdii:master into 1211a8d on google:master.

@qdii
Copy link
Contributor Author

qdii commented Mar 8, 2019

Fixed the lint.

encoding = response.info().get('Content-Encoding')
if encoding == 'gzip':
content = _Gunzip(response.read())
else:
Copy link
Contributor

Choose a reason for hiding this comment

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

would be nice to also add deflate support :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIUC, it also works with deflate: I just removed the branch as it just repeated what the default branch did. Or am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jameslynnwu jameslynnwu merged commit 975e38a into google:master Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants