Skip to content

Conversation

@DaivikDave
Copy link

Summary

  • Replaces hardcoded 5-second HTTP timeout with configurable HTTP_TIMEOUT_SECONDS environment variable
  • Maintains backward compatibility with 5-second default

Changes

  • Added HTTP_TIMEOUT_SECONDS environment variable support
  • Added DEFAULT_HTTP_TIMEOUT_SECONDS constant (5 seconds)
  • Added HTTPTimeoutSeconds field to Server struct
  • Added getHTTPTimeoutSeconds() helper function with validation
  • Updated ServeHTTP to use configurable timeout value

Behavior

  • If HTTP_TIMEOUT_SECONDS is not set: uses 5-second default
  • If HTTP_TIMEOUT_SECONDS is invalid (non-numeric or ≤0): logs warning and uses default
  • If HTTP_TIMEOUT_SECONDS is valid: uses configured value

Example Usage

# Use default 5-second timeout
./gcsfileserver

# Use custom 30-second timeout
HTTP_TIMEOUT_SECONDS=30 ./gcsfileserver

🤖 Generated with Claude Code

DaivikDave and others added 2 commits January 2, 2026 16:26
- Add HTTP_TIMEOUT_SECONDS environment variable
- Replace hardcoded 5s timeout with configurable value
- Add validation for positive integer values
- Default to 5 seconds if not set or invalid
- Add HTTPTimeoutSeconds field to Server struct

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace deprecated infra_build_docker.yml with build-push-image.yml
- Update workflow format to match working examples from jw-gateway

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@DaivikDave DaivikDave force-pushed the configurable-http-timeout branch from 6661bd6 to ca19c63 Compare January 2, 2026 11:09
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.

2 participants