summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-05-05 18:17:37 +0700
committerShulhan <ms@kilabit.info>2023-05-05 18:17:37 +0700
commit36a4816c921c2c52118ebe2ad9c9e39fe8e587a4 (patch)
treeead62b8cba519ebe56aea28d12ed178ac29778cd
parenta3f0257b8f3c38d41de2030352aee002216342cb (diff)
downloadgorankusu-36a4816c921c2c52118ebe2ad9c9e39fe8e587a4.tar.xz
all: set the request ConvertParams before calling runHttpTarget
The req, RunRequest instance, is from request so the HttpTarget.ConvertParams need to be set from the original HttpTarget. This fix the conditional rr.HttpTarget.ConvertParams == nil always true when calling runHttpTarget.
-rw-r--r--trunks.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/trunks.go b/trunks.go
index f1563e5..b566a05 100644
--- a/trunks.go
+++ b/trunks.go
@@ -192,6 +192,7 @@ func (trunks *Trunks) RunHttp(req *RunRequest) (res *RunResponse, err error) {
if origHttpTarget.Run == nil {
req.Target.BaseUrl = origTarget.BaseUrl
req.Target.Name = origTarget.Name
+ req.HttpTarget.ConvertParams = origHttpTarget.ConvertParams
res, err = trunks.runHttpTarget(req)
} else {
req := generateRunRequest(trunks.Env, req, origTarget, origHttpTarget)