summaryrefslogtreecommitdiff
path: root/internal/server/handler/handler.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-07-28 18:27:42 +0300
committerPaul Buetow <paul@buetow.org>2024-07-28 18:27:42 +0300
commit8572fca487d124518e46f4fad1919cf98c5ae56a (patch)
treee6f94e230422d3c16043909c768eba3adf3c92d6 /internal/server/handler/handler.go
parent15e39ae8f63021fd599f6c1f3cfab9bf9c1885b0 (diff)
fix bug where POST turned out to be a HTTP get when there are // in the URI
Diffstat (limited to 'internal/server/handler/handler.go')
-rw-r--r--internal/server/handler/handler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/server/handler/handler.go b/internal/server/handler/handler.go
index 41664b1..eabffa3 100644
--- a/internal/server/handler/handler.go
+++ b/internal/server/handler/handler.go
@@ -28,7 +28,7 @@ func New(conf server.ServerConfig) Handler {
func (h Handler) Submit(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
if r.Method != "POST" {
- return fmt.Errorf("expexted POST request")
+ return fmt.Errorf("expected POST request, but got %s", r.Method)
}
bytes, err := io.ReadAll(r.Body)