Feat: transformer plugin support map from body to header (#892)

This commit is contained in:
澄潭
2024-03-29 16:20:16 +08:00
committed by GitHub
parent 717e3bf51f
commit e844daea66
6 changed files with 350 additions and 174 deletions

View File

@@ -21,6 +21,7 @@ import (
"mime"
"mime/multipart"
"net/url"
"sort"
"strconv"
"strings"
@@ -263,5 +264,8 @@ func reconvertHeaders(hs map[string][]string) [][2]string {
ret = append(ret, [2]string{k, v})
}
}
sort.SliceStable(ret, func(i, j int) bool {
return ret[i][0] < ret[j][0]
})
return ret
}