Skip to content

Commit

Permalink
Bump version to v0.3.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Jul 10, 2022
1 parent 1dbb8ac commit 695e6e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ The format is based on [Keep a Changelog], and this project adheres to
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html

## [0.3.3] - 2022-07-11

### Fixed

- Prevent rendering empty header value along real header values
- Render all values for each header, not only the first

## [0.3.2] - 2022-07-08

### Changed
Expand Down
6 changes: 4 additions & 2 deletions cmd/echo-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func writeRequest(w io.Writer, req *http.Request) {
}

func printHeaders(w io.Writer, h http.Header) {
sortedKeys := make([]string, len(h))
sortedKeys := make([]string, 0, len(h))

for key := range h {
sortedKeys = append(sortedKeys, key)
Expand All @@ -276,6 +276,8 @@ func printHeaders(w io.Writer, h http.Header) {
sort.Strings(sortedKeys)

for _, key := range sortedKeys {
fmt.Fprintf(w, "%s: %s\n", key, h.Get(key))
for _, value := range h[key] {
fmt.Fprintf(w, "%s: %s\n", key, value)
}
}
}

0 comments on commit 695e6e6

Please sign in to comment.