mirror of
https://github.com/aykhans/sarin.git
synced 2026-10-17 22:53:52 +00:00
fix: send an idempotent request once instead of retrying it five times
This commit is contained in:
2 files changed
+4
No files matched your search
@@ -60,6 +60,7 @@ func NewHostClients(
|
|||||||
WriteTimeout: timeout,
|
WriteTimeout: timeout,
|
||||||
ReadTimeout: timeout,
|
ReadTimeout: timeout,
|
||||||
MaxResponseBodySize: safeUint64ToInt(maxResponseBody),
|
MaxResponseBodySize: safeUint64ToInt(maxResponseBody),
|
||||||
|
MaxIdemponentCallAttempts: 1,
|
||||||
DisableHeaderNamesNormalizing: true,
|
DisableHeaderNamesNormalizing: true,
|
||||||
DisablePathNormalizing: true,
|
DisablePathNormalizing: true,
|
||||||
NoDefaultUserAgentHeader: true,
|
NoDefaultUserAgentHeader: true,
|
||||||
@@ -83,6 +84,7 @@ func NewHostClients(
|
|||||||
WriteTimeout: timeout,
|
WriteTimeout: timeout,
|
||||||
ReadTimeout: timeout,
|
ReadTimeout: timeout,
|
||||||
MaxResponseBodySize: safeUint64ToInt(maxResponseBody),
|
MaxResponseBodySize: safeUint64ToInt(maxResponseBody),
|
||||||
|
MaxIdemponentCallAttempts: 1,
|
||||||
DisableHeaderNamesNormalizing: true,
|
DisableHeaderNamesNormalizing: true,
|
||||||
DisablePathNormalizing: true,
|
DisablePathNormalizing: true,
|
||||||
NoDefaultUserAgentHeader: true,
|
NoDefaultUserAgentHeader: true,
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ func newScriptHTTPClient(
|
|||||||
DialTimeout: dialWithDeadline(dial),
|
DialTimeout: dialWithDeadline(dial),
|
||||||
MaxConnsPerHost: safeUintToInt(maxConns),
|
MaxConnsPerHost: safeUintToInt(maxConns),
|
||||||
MaxResponseBodySize: safeUint64ToInt(maxResponseBody),
|
MaxResponseBodySize: safeUint64ToInt(maxResponseBody),
|
||||||
|
// Retries would send one script call several times and hide it from the results.
|
||||||
|
MaxIdemponentCallAttempts: 1,
|
||||||
TLSConfig: &tls.Config{
|
TLSConfig: &tls.Config{
|
||||||
InsecureSkipVerify: insecure, //nolint:gosec
|
InsecureSkipVerify: insecure, //nolint:gosec
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user