Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Merge pull request 'trim any leading whitespace in the input' (#258) …
Browse files Browse the repository at this point in the history
…from send-input-fix into master

Reviewed-on: https://git.grassecon.net/urdt/ussd/pulls/258
Reviewed-by: lash <accounts-grassrootseconomics@holbrook.no>
  • Loading branch information
lash committed Jan 7, 2025
2 parents 80b96e9 + 6c5873d commit 656052d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/http/at/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ func (arp *ATRequestParser) GetInput(rq any) ([]byte, error) {
return nil, fmt.Errorf("no input found")
}

return []byte(parts[len(parts)-1]), nil
trimmedInput := strings.TrimSpace(parts[len(parts)-1])
return []byte(trimmedInput), nil
}

func parseQueryParams(query string) map[string]string {
Expand Down

0 comments on commit 656052d

Please sign in to comment.