diff options
author | kinggo <lilong.21@bytedance.com> | 2022-10-15 21:47:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 15:47:53 +0200 |
commit | 2c8ce3b40e933669366c9519503bc8df4f1a8b8a (patch) | |
tree | 67ab218e744daf5dec88e6bcbde01aacf1d80a7b /args.go | |
parent | make RequestCtx's userdata accept keys that are of type: interface{} (#1387) (diff) | |
download | fasthttp-2c8ce3b40e933669366c9519503bc8df4f1a8b8a.tar.gz fasthttp-2c8ce3b40e933669366c9519503bc8df4f1a8b8a.tar.bz2 fasthttp-2c8ce3b40e933669366c9519503bc8df4f1a8b8a.zip |
feat: add header.PeekAll (#1394)
Diffstat (limited to 'args.go')
-rw-r--r-- | args.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -623,3 +623,13 @@ func decodeArgAppendNoPlus(dst, src []byte) []byte { } return dst } + +func peekAllArgBytesToDst(dst [][]byte, h []argsKV, k []byte) [][]byte { + for i, n := 0, len(h); i < n; i++ { + kv := &h[i] + if bytes.Equal(kv.key, k) { + dst = append(dst, kv.value) + } + } + return dst +} |