Skip to content

Commit b59c600

Browse files
authored
fix(iacExt): [116337119] Optimizing the code (#2613)
* add * add
1 parent 2cadbe3 commit b59c600

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tencentcloud/connectivity/transport.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ func (me *LogRoundTripper) RoundTrip(request *http.Request) (response *http.Resp
5555
request.Header.Set(ENV_TESTING_ROUTE_HEADER_KEY, routeUserID)
5656
}
5757

58+
var reqClientFormat = ReqClient
5859
if me.InstanceId != "" {
59-
ReqClient = fmt.Sprintf("%s,id=%s", ReqClient, me.InstanceId)
60+
reqClientFormat = fmt.Sprintf("%s,id=%s", ReqClient, me.InstanceId)
6061
}
6162

62-
request.Header.Set("X-TC-RequestClient", ReqClient)
63+
request.Header.Set("X-TC-RequestClient", reqClientFormat)
6364
inBytes = []byte(fmt.Sprintf("%s, request: ", request.Header[headName]))
6465
requestBody, errRet := ioutil.ReadAll(bodyReader)
6566
if errRet != nil {

0 commit comments

Comments
 (0)