Skip to content

Commit

Permalink
make precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
zhihali committed Aug 21, 2024
1 parent 6e34625 commit 74361cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ func stringToHeader(value string) map[string]string {

trimmedName := strings.TrimSpace(n)

// Validate the key
// Validate the key.
if !isValidHeaderKey(trimmedName) {
global.Error(errors.New("invalid header key"), "parse headers", "key", trimmedName)
continue
}

// Only decode the value
// Only decode the value.
value, err := url.PathUnescape(v)
if err != nil {
global.Error(err, "escape header value", "value", v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ func stringToHeader(value string) map[string]string {

trimmedName := strings.TrimSpace(n)

// Validate the key
// Validate the key.
if !isValidHeaderKey(trimmedName) {
global.Error(errors.New("invalid header key"), "parse headers", "key", trimmedName)
continue
}

// Only decode the value
// Only decode the value.
value, err := url.PathUnescape(v)
if err != nil {
global.Error(err, "escape header value", "value", v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ func stringToHeader(value string) map[string]string {

trimmedName := strings.TrimSpace(n)

// Validate the key
// Validate the key.
if !isValidHeaderKey(trimmedName) {
global.Error(errors.New("invalid header key"), "parse headers", "key", trimmedName)
continue
}

// Only decode the value
// Only decode the value.
value, err := url.PathUnescape(v)
if err != nil {
global.Error(err, "escape header value", "value", v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ func stringToHeader(value string) map[string]string {

trimmedName := strings.TrimSpace(n)

// Validate the key
// Validate the key.
if !isValidHeaderKey(trimmedName) {
global.Error(errors.New("invalid header key"), "parse headers", "key", trimmedName)
continue
}

// Only decode the value
// Only decode the value.
value, err := url.PathUnescape(v)
if err != nil {
global.Error(err, "escape header value", "value", v)
Expand Down

0 comments on commit 74361cd

Please sign in to comment.