Skip to content

Commit

Permalink
Add trailer support (#1165)
Browse files Browse the repository at this point in the history
* Add trailer support

* fix issue and add documentation

* remove redundant code

* add error return for add/set trailer method

* fix lint error

* fix bad trailer error return issue and update bad content-length error

* update errNonNumericChars

* update errNonNumericChars

* fix issue about error and fix typo
  • Loading branch information
ichxxx committed Dec 5, 2021
1 parent 017f0aa commit da7ff7a
Show file tree
Hide file tree
Showing 10 changed files with 1,418 additions and 255 deletions.
7 changes: 7 additions & 0 deletions args.go
Expand Up @@ -361,6 +361,13 @@ func visitArgs(args []argsKV, f func(k, v []byte)) {
}
}

func visitArgsKey(args []argsKV, f func(k []byte)) {
for i, n := 0, len(args); i < n; i++ {
kv := &args[i]
f(kv.key)
}
}

func copyArgs(dst, src []argsKV) []argsKV {
if cap(dst) < len(src) {
tmp := make([]argsKV, len(src))
Expand Down

0 comments on commit da7ff7a

Please sign in to comment.