fix(googleapi): replace Client.Timeout with transport-level ResponseHeaderTimeout#425
Merged
steipete merged 3 commits intoopenclaw:mainfrom Mar 7, 2026
Merged
Conversation
Add shortcutDetails to the Drive Get API fields to enable resolving shortcut target file IDs and MIME types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eaderTimeout The global http.Client.Timeout (30s) applied to the entire request lifecycle, causing large Drive file downloads (videos, backups, etc.) to time out. Replace it with http.Transport.ResponseHeaderTimeout which only limits the time waiting for the server to begin responding. Once response headers arrive and the body starts streaming, there is no hard cap — large transfers complete naturally. - Set ResponseHeaderTimeout=30s on the base transport - Remove http.Client.Timeout from the API client - Keep a dedicated tokenExchangeTimeout=30s for OAuth2 token refreshes - Add tests verifying the new transport configuration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
steipete
added a commit
that referenced
this pull request
Mar 7, 2026
Collaborator
steipete
added a commit
that referenced
this pull request
Mar 7, 2026
klodr
pushed a commit
to klodr/gogcli
that referenced
this pull request
Apr 22, 2026
…eaderTimeout (openclaw#425) * feat(drive): include shortcutDetails in drive get fields Add shortcutDetails to the Drive Get API fields to enable resolving shortcut target file IDs and MIME types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(googleapi): replace Client.Timeout with transport-level ResponseHeaderTimeout The global http.Client.Timeout (30s) applied to the entire request lifecycle, causing large Drive file downloads (videos, backups, etc.) to time out. Replace it with http.Transport.ResponseHeaderTimeout which only limits the time waiting for the server to begin responding. Once response headers arrive and the body starts streaming, there is no hard cap — large transfers complete naturally. - Set ResponseHeaderTimeout=30s on the base transport - Remove http.Client.Timeout from the API client - Keep a dedicated tokenExchangeTimeout=30s for OAuth2 token refreshes - Add tests verifying the new transport configuration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
klodr
pushed a commit
to klodr/gogcli
that referenced
this pull request
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
http.Client.Timeout(30s) withhttp.Transport.ResponseHeaderTimeout(30s) so that large Drive file downloads (videos, backups, etc.) are not interrupted mid-transfertokenExchangeTimeoutMotivation
Downloading large files from Drive (e.g. 1GB+ videos) consistently timed out at 30s because
http.Client.Timeoutcaps the entire request including body transfer. This is the idiomatic Go fix: use transport-levelResponseHeaderTimeoutto guard against unresponsive servers while allowing streaming transfers to complete naturally.Test plan
TestNewBaseTransport_SetsResponseHeaderTimeoutverifies transport configTestOptionsForAccountScopes_NoClientTimeoutverifies no hard client timeoutgo test ./...)🤖 Generated with Claude Code