Skip to content

Commit da9c8f6

Browse files
committed
skip http head static check
1 parent b127faf commit da9c8f6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tencentcloud/connectivity/transport.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111
)
1212

13-
const ReqClient = "Terraform-v1.24.1"
13+
const ReqClient = "Terraform-v1.33.1"
1414

1515
type LogRoundTripper struct {
1616
}
@@ -27,19 +27,20 @@ func (me *LogRoundTripper) RoundTrip(request *http.Request) (response *http.Resp
2727
if errRet != nil {
2828
return
2929
}
30-
30+
var headName = "X-TC-Action"
3131
request.Header.Set("X-TC-RequestClient", ReqClient)
32-
inBytes = []byte(fmt.Sprintf("%s, request: ", request.Header["X-TC-Action"]))
32+
inBytes = []byte(fmt.Sprintf("%s, request: ", request.Header[headName]))
3333
requestBody, errRet := ioutil.ReadAll(bodyReader)
3434
if errRet != nil {
3535
return
3636
}
3737
inBytes = append(inBytes, requestBody...)
3838

39+
headName = "X-TC-Region"
3940
appendMessage := []byte(fmt.Sprintf(
4041
", (host %+v, region:%+v)",
4142
request.Header["Host"],
42-
request.Header["X-TC-Region"],
43+
request.Header[headName],
4344
))
4445

4546
inBytes = append(inBytes, appendMessage...)

0 commit comments

Comments
 (0)