changeset 21714:51f236a068a9

lib-oauth2: Add missing content-type header
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Fri, 03 Mar 2017 08:31:50 +0200
parents 311c42d6897e
children 465fc64557c2
files src/lib-oauth2/oauth2-introspect.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-oauth2/oauth2-introspect.c	Thu Oct 20 12:08:09 2016 +0300
+++ b/src/lib-oauth2/oauth2-introspect.c	Fri Mar 03 08:31:50 2017 +0200
@@ -102,6 +102,8 @@
 		enc = t_str_new(strlen(input->token)+6);
 		str_append(enc, "token=");
 		http_url_escape_param(enc, input->token);
+		http_client_request_add_header(req->req, "Content-Type",
+					       "application/x-www-form-urlencoded");
 		http_client_request_set_payload_data(req->req, enc->data, enc->used);
 	} else {
 		req->req = http_client_request_url(req->set->client, "GET", url,