From 6a2928b4bf3c57685b707c17eb0c147d68be1dd6 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 30 May 2019 15:02:07 +0300 Subject: Java: fixing request scheme using 'tls' flag. --- src/java/nxt_jni_Request.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/java/nxt_jni_Request.c') diff --git a/src/java/nxt_jni_Request.c b/src/java/nxt_jni_Request.c index a9fbe0e4..733290dd 100644 --- a/src/java/nxt_jni_Request.c +++ b/src/java/nxt_jni_Request.c @@ -542,7 +542,11 @@ nxt_java_Request_getRemotePort(JNIEnv *env, jclass cls, jlong req_ptr) static jstring JNICALL nxt_java_Request_getScheme(JNIEnv *env, jclass cls, jlong req_ptr) { - return (*env)->NewStringUTF(env, "http"); + nxt_unit_request_t *r; + + r = nxt_jlong2ptr(req_ptr); + + return (*env)->NewStringUTF(env, r->tls ? "https" : "http"); } -- cgit