From 251c70a9cd5e8000aae80cb5f78338be5cb60ea5 Mon Sep 17 00:00:00 2001
From: Nedyalko Andreev <n@andreev.sh>
Date: Tue, 20 Mar 2018 10:12:37 +0200
Subject: [PATCH] Fix body parsing with longer form content-type headers

---
 httpbin/helpers.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/httpbin/helpers.go b/httpbin/helpers.go
index 889f40b..ec44cc9 100644
--- a/httpbin/helpers.go
+++ b/httpbin/helpers.go
@@ -107,7 +107,7 @@ func parseBody(w http.ResponseWriter, r *http.Request, resp *bodyResponse) error
 
 	ct := r.Header.Get("Content-Type")
 	switch {
-	case ct == "application/x-www-form-urlencoded":
+	case strings.HasPrefix(ct, "application/x-www-form-urlencoded"):
 		if err := r.ParseForm(); err != nil {
 			return err
 		}
-- 
GitLab