Skip to content

Commit

Permalink
update content-length header for next page requests (fixes: googleapi…
Browse files Browse the repository at this point in the history
  • Loading branch information
schweikert committed Jun 7, 2021
1 parent 4d1153d commit 75fea9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions googleapiclient/discovery.py
Expand Up @@ -1283,6 +1283,9 @@ def methodNext(self, previous_request, previous_response):
body = model.deserialize(request.body)
body[pageTokenName] = nextPageToken
request.body = model.serialize(body)
request.body_size = len(request.body)
if "content-length" in request.headers:
del request.headers['content-length']
logger.debug("Next page request body: %s %s" % (methodName, body))

return request
Expand Down

0 comments on commit 75fea9e

Please sign in to comment.