fix: req.Close only for non-GET (fixes FindInstanceByDisplayName), bump 5.0.65
This commit is contained in:
@@ -2,7 +2,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
nubes = {
|
nubes = {
|
||||||
source = "terra.k8c.ru/nubes-test/nubes"
|
source = "terra.k8c.ru/nubes-test/nubes"
|
||||||
version = "5.0.64"
|
version = "5.0.65"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ NUBES_API_ENDPOINT="https://lk-api-gateway-test.ngcloud.ru/api/v1/svc"
|
|||||||
TOKEN_FILE="secrets/test.token"
|
TOKEN_FILE="secrets/test.token"
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
VERSION="5.0.64"
|
VERSION="5.0.65"
|
||||||
|
|
||||||
# Docs generation — ONLY from docs_gen/<stand>/ (never from docs/)
|
# Docs generation — ONLY from docs_gen/<stand>/ (never from docs/)
|
||||||
DOCS_GEN_DIR="provider/docs_gen/test"
|
DOCS_GEN_DIR="provider/docs_gen/test"
|
||||||
|
|||||||
@@ -978,8 +978,11 @@ func (c *UniversalClient) doRequest(ctx context.Context, method, path string, pa
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Форсируем новое TCP-соединение: DDoS-Guard может блочить POST на keep-alive
|
// Форсируем новое TCP-соединение для POST/PUT/PATCH: DDoS-Guard может блочить их на keep-alive.
|
||||||
req.Close = true
|
// GET-запросы (поиск, чтение) оставляем на keep-alive — req.Close на них ломает DDoS-Guard.
|
||||||
|
if method != "GET" {
|
||||||
|
req.Close = true
|
||||||
|
}
|
||||||
|
|
||||||
req.Header.Set("User-Agent", userAgent)
|
req.Header.Set("User-Agent", userAgent)
|
||||||
req.Header.Set("Accept", "*/*")
|
req.Header.Set("Accept", "*/*")
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
version string = "5.0.64"
|
version string = "5.0.65"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user