fix: req.Close only for non-GET (fixes FindInstanceByDisplayName), bump 5.0.65

This commit is contained in:
“Naeel”
2026-07-08 20:11:30 +04:00
parent 6d3bfe852c
commit f59b9ca19b
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers {
nubes = {
source = "terra.k8c.ru/nubes-test/nubes"
version = "5.0.64"
version = "5.0.65"
}
}
}
+1 -1
View File
@@ -3,7 +3,7 @@ NUBES_API_ENDPOINT="https://lk-api-gateway-test.ngcloud.ru/api/v1/svc"
TOKEN_FILE="secrets/test.token"
# Version
VERSION="5.0.64"
VERSION="5.0.65"
# Docs generation — ONLY from docs_gen/<stand>/ (never from docs/)
DOCS_GEN_DIR="provider/docs_gen/test"
+5 -2
View File
@@ -978,8 +978,11 @@ func (c *UniversalClient) doRequest(ctx context.Context, method, path string, pa
return nil, nil, err
}
// Форсируем новое TCP-соединение: DDoS-Guard может блочить POST на keep-alive
req.Close = true
// Форсируем новое TCP-соединение для POST/PUT/PATCH: DDoS-Guard может блочить их на keep-alive.
// GET-запросы (поиск, чтение) оставляем на keep-alive — req.Close на них ломает DDoS-Guard.
if method != "GET" {
req.Close = true
}
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Accept", "*/*")
+1 -1
View File
@@ -17,7 +17,7 @@ import (
)
var (
version string = "5.0.64"
version string = "5.0.65"
)
func main() {