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

fix: update content-length header for next page requests #1404

Merged
merged 2 commits into from Jun 8, 2021

Conversation

schweikert
Copy link
Contributor

The content-length header only gets updated at request object initialization, so make sure we update it here after we modified the body.

Fixes #1403

@schweikert schweikert requested a review from a team as a code owner June 7, 2021 11:54
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 7, 2021
@schweikert schweikert force-pushed the fix_1403 branch 2 times, most recently from 1e2117d to 04bd2d8 Compare June 7, 2021 12:15
Copy link
Contributor

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

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

Thank you! Could you add/modify a test that checks for this?

class Next(unittest.TestCase):

@busunkim96 busunkim96 changed the title update content-length header for next page requests fix: update content-length header for next page requests Jun 7, 2021
@busunkim96 busunkim96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 7, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 7, 2021
@schweikert schweikert force-pushed the fix_1403 branch 2 times, most recently from a630385 to 1e048d2 Compare June 8, 2021 08:24
@schweikert
Copy link
Contributor Author

Thank you! Could you add/modify a test that checks for this?

Ah yes, thanks for spotting this! Done.

@parthea parthea added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2021
The content-length header only gets updated at request object
initialization, so make sure we update it here after we modified the
body.

Fixes googleapis#1403
@parthea parthea added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2021
@parthea parthea added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2021
@busunkim96 busunkim96 merged commit 8019f2f into googleapis:master Jun 8, 2021
gcf-merge-on-green bot pushed a commit that referenced this pull request Jun 14, 2021
🤖 I have created a release \*beep\* \*boop\*
---
## [2.9.0](https://www.github.com/googleapis/google-api-python-client/compare/v2.8.0...v2.9.0) (2021-06-12)


### Features

* **analyticsadmin:** update the api 3ed7887 ([33237a8](https://www.github.com/googleapis/google-api-python-client/commit/33237a8250e3becfaa1e4b5f67ef0c887cfc44a9))
* **analyticsadmin:** update the api a715d2b ([0f0918f](https://www.github.com/googleapis/google-api-python-client/commit/0f0918f92a699753b52c77dd236ad84ee00a32a7))
* **apigee:** update the api 9fcf80b ([0f0918f](https://www.github.com/googleapis/google-api-python-client/commit/0f0918f92a699753b52c77dd236ad84ee00a32a7))
* **appengine:** update the api ffcf860 ([26aa9e2](https://www.github.com/googleapis/google-api-python-client/commit/26aa9e282e30ca9c8797ee5346cbe9c0b9ca65a7))
* **chat:** update the api 47ff8a5 ([0f0918f](https://www.github.com/googleapis/google-api-python-client/commit/0f0918f92a699753b52c77dd236ad84ee00a32a7))
* **composer:** update the api 4862529 ([33237a8](https://www.github.com/googleapis/google-api-python-client/commit/33237a8250e3becfaa1e4b5f67ef0c887cfc44a9))
* **containeranalysis:** update the api 9a1c70b ([26aa9e2](https://www.github.com/googleapis/google-api-python-client/commit/26aa9e282e30ca9c8797ee5346cbe9c0b9ca65a7))
* **documentai:** update the api 07a6e77 ([26aa9e2](https://www.github.com/googleapis/google-api-python-client/commit/26aa9e282e30ca9c8797ee5346cbe9c0b9ca65a7))
* **drive:** update the api 773910f ([26aa9e2](https://www.github.com/googleapis/google-api-python-client/commit/26aa9e282e30ca9c8797ee5346cbe9c0b9ca65a7))
* **genomics:** update the api 8a1c8a6 ([33237a8](https://www.github.com/googleapis/google-api-python-client/commit/33237a8250e3becfaa1e4b5f67ef0c887cfc44a9))
* **gkehub:** update the api 0fd49e0 ([33237a8](https://www.github.com/googleapis/google-api-python-client/commit/33237a8250e3becfaa1e4b5f67ef0c887cfc44a9))
* **managedidentities:** update the api 0927c19 ([c3f8675](https://www.github.com/googleapis/google-api-python-client/commit/c3f86757bccb6b42552f87d37a645651c58d6c7a))
* **managedidentities:** update the api e96adbb ([26aa9e2](https://www.github.com/googleapis/google-api-python-client/commit/26aa9e282e30ca9c8797ee5346cbe9c0b9ca65a7))
* **spanner:** update the api 87da2f3 ([26aa9e2](https://www.github.com/googleapis/google-api-python-client/commit/26aa9e282e30ca9c8797ee5346cbe9c0b9ca65a7))


### Bug Fixes

* update content-length header for next page ([#1404](https://www.github.com/googleapis/google-api-python-client/issues/1404)) ([8019f2f](https://www.github.com/googleapis/google-api-python-client/commit/8019f2f96abc6a4375873becb2f17b399f738654)), closes [#1403](https://www.github.com/googleapis/google-api-python-client/issues/1403)
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_next method creates a HTTP request with wrong content-length header
4 participants