From 27caafc156c32da26b1ebfbe706bab489940edf5 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 18 Aug 2024 10:18:44 -0700 Subject: [PATCH] set new default to the same as previous default hopefully avoids unexpected behavior change for existing users, while providing the ability to perform environment specific tuning as needed --- CHANGELOG.adoc | 13 ++++++++----- README.adoc | 2 +- cmd/go-camo/main.go | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 2baaa27..7013a41 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -23,11 +23,14 @@ toc::[] Default is 30s (same as previosly). * Add CLI flag for configuring IdleTimeout, the maximum amount of time to wait for the next request when keep-alive is enabled (frontend). + - Default is 60 seconds. - - Previously this value was not set, so it defaulted to the zero value, in - which case the ReadTimeout value (default 30s) was used internally by the go - http server. + Default is 30 seconds. ++ +[NOTE] +-- +Previously this value was not set, so it defaulted to the zero value, in +which case the ReadTimeout value (default 30s) was used internally by the go +http server. The new default mirrors the old default. +-- == v2.5.1 2024-07-02 * Rebuild release with Go-1.22.5 diff --git a/README.adoc b/README.adoc index 7e7256e..2a8e648 100644 --- a/README.adoc +++ b/README.adoc @@ -147,7 +147,7 @@ Building requires: * make * posix compatible shell (sh) * git -* go (latest version recommended. At least version >= 1.22) +* go (most recent version recommended) * {link-asciidoctor} (for building man pages only) Building: diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 7bbecf2..eeeb7d7 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -80,7 +80,7 @@ type CLI struct { // betteralign:ignore SSLCert string `name:"ssl-cert" placeholder:"PATH" help:"ssl cert (cert.pem) path"` MaxSize int64 `name:"max-size" placeholder:"INT" help:"Max allowed response size, in KB"` ReqTimeout time.Duration `name:"timeout" default:"4s" help:"Upstream request timeout (backend)"` - IdleTimeout time.Duration `name:"idletimeout" default:"60s" help:"Maximum amount of time to wait for the next request when keep-alive is enabled (frontend)"` + IdleTimeout time.Duration `name:"idletimeout" default:"30s" help:"Maximum amount of time to wait for the next request when keep-alive is enabled (frontend)"` ReadTimeout time.Duration `name:"readtimeout" default:"30s" help:"Maximum duration for reading the entire request, including the body (frontend)"` MaxRedirects int `name:"max-redirects" default:"3" help:"Maximum number of redirects to follow"` MaxSizeRedirect string `name:"max-size-redirect" placeholder:"URL" help:"redirect to URL when max-size is exceeded"`