diff --git a/jwt.go b/jwt.go index 98760ab..15f1e57 100644 --- a/jwt.go +++ b/jwt.go @@ -771,7 +771,7 @@ func toOPAPayload(request *http.Request, includeBody bool) (*Payload, error) { if err != nil { return nil, err } - } else if contentType == "application/x-www-url-formencoded" { + } else if contentType == "application/x-www-form-urlencoded" { input.Form, err = url.ParseQuery(string(save)) if err != nil { return nil, err diff --git a/jwt_test.go b/jwt_test.go index ecfed79..53c5813 100644 --- a/jwt_test.go +++ b/jwt_test.go @@ -179,7 +179,7 @@ func TestServeOPAWithBody(t *testing.T) { { name: "form", method: "POST", - contentType: "application/x-www-url-formencoded", + contentType: "application/x-www-form-urlencoded", body: `foo=bar&bar=foo`, allowed: true, expectedForm: map[string][]string{