diff --git a/docs/configuration.md b/docs/configuration.md index d883b8d..573da7b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -599,7 +599,7 @@ http(url, opts) | `params` | table/object | - | Query parameters, added to any already in the URL | | `cookies` | table/object | - | Cookies, sent as a single `Cookie` header | | `body` | string | `""` | Request body | -| `timeout` | duration string (`"500ms"`) | `30s` | Request timeout (the `timeout` config does not apply), applied to each hop when redirects are followed | +| `timeout` | duration string (`"500ms"`) | `10s` | Request timeout (the `timeout` config does not apply), applied to each hop when redirects are followed | | `insecure` | boolean | `false` | Skip TLS verification (the `insecure` config does not apply) | | `maxRedirects` | number | `0` | How many redirects to follow, `0` follows none, maximum 100 | diff --git a/internal/sarin/scripthttp.go b/internal/sarin/scripthttp.go index c7f791f..daba97c 100644 --- a/internal/sarin/scripthttp.go +++ b/internal/sarin/scripthttp.go @@ -14,8 +14,8 @@ import ( "go.aykhans.me/sarin/internal/types" ) -// scriptHTTPDefaultTimeout is the default timeout for script requests, independent of -T. -const scriptHTTPDefaultTimeout = 30 * time.Second +// scriptHTTPDefaultTimeout is the default timeout for script requests. +const scriptHTTPDefaultTimeout = 10 * time.Second // scriptHTTPClient sends scripts' http.* requests. It is safe for concurrent use. type scriptHTTPClient struct {