static const char* oidc_get_current_url_scheme(const request_rec *r) {
	/* first see if there's a proxy/load-balancer in front of us */
	const char *scheme_str = oidc_util_hdr_in_x_forwarded_proto_get(r);
	/* if not we'll determine the scheme used to connect to this server */
	if (scheme_str == NULL) {
#ifdef APACHE2_0
		scheme_str = (char *) ap_http_method(r);
#else
		scheme_str = (char*) ap_http_scheme(r);
#endif
	}
	if ((scheme_str == NULL)
			|| ((apr_strnatcmp(scheme_str, "http") != 0)
					&& (apr_strnatcmp(scheme_str, "https") != 0))) {
		oidc_warn(r,
				"detected HTTP scheme \"%s\" is not \"http\" nor \"https\"; perhaps your reverse proxy passes a wrongly configured \"%s\" header: falling back to default \"https\"",
				scheme_str, OIDC_HTTP_HDR_X_FORWARDED_PROTO);
		scheme_str = "https";
	}
	return scheme_str;
}
static const char* oidc_get_current_url_scheme(const request_rec *r) {
	 
	const char *scheme_str = oidc_util_hdr_in_x_forwarded_proto_get(r);
	 
	if (scheme_str == NULL) {
#ifdef APACHE2_0
		scheme_str = (char *) ap_http_method(r);
#else
		scheme_str = (char*) ap_http_scheme(r);
#endif
	}
	if ((scheme_str == NULL)
			|| ((apr_strnatcmp(scheme_str, "http") != 0)
					&& (apr_strnatcmp(scheme_str, "https") != 0))) {
		oidc_warn(r,
				"detected HTTP scheme \"%s\" is not \"http\" nor \"https\"; perhaps your reverse proxy passes a wrongly configured \"%s\" header: falling back to default \"https\"",
				scheme_str, OIDC_HTTP_HDR_X_FORWARDED_PROTO);
		scheme_str = "https";
	}
	return scheme_str;
}