From 6c5873da6fe3ed6795f964ebefad89d055e110ad Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Tue, 7 Jan 2025 12:15:15 +0300 Subject: [PATCH] trim any leading whitespace in the input --- internal/http/at/parse.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/http/at/parse.go b/internal/http/at/parse.go index 5f27d50..76e84e7 100644 --- a/internal/http/at/parse.go +++ b/internal/http/at/parse.go @@ -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 {