Software /
code /
prosody-modules
Diff
mod_http_oauth2/mod_http_oauth2.lua @ 3934:469408682152
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 08 Mar 2020 13:42:55 +0100 |
parent | 3920:cf92e3b30c18 |
child | 4228:3eb595cf847f |
line wrap: on
line diff
--- 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");