# HG changeset patch # User Kim Alvefur # Date 1583671375 -3600 # Node ID 469408682152456e86fa9ebd344751af21e7280e # Parent 93147b89ea67524d4f3a8d8b7ffe96d87ea81624 mod_http_oauth2: Set content type on successful repsponses (fixes #1501) This will set the content-type on all responses, tho errors are already taken care of in the error handler. diff -r 93147b89ea67 -r 469408682152 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Sun Mar 08 12:52:18 2020 +0100 +++ b/mod_http_oauth2/mod_http_oauth2.lua Sun Mar 08 13:42:55 2020 +0100 @@ -67,6 +67,7 @@ end function handle_token_grant(event) + event.response.headers.content_type = "application/json"; local params = http.formdecode(event.request.body); if not params then return oauth_error("invalid_request");