From 3bc48828848cad587c3860770c7c6c2a39eb2913 Mon Sep 17 00:00:00 2001 From: Hakase Date: Sat, 28 Apr 2018 10:15:12 +0900 Subject: [PATCH] Fix http to https 400 error --- src/http/ngx_http_request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index b87135c..25e6463 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1879,7 +1879,9 @@ ngx_http_process_request(ngx_http_request_t *r) if (c->ssl == NULL) { ngx_log_error(NGX_LOG_INFO, c->log, 0, "client sent plain HTTP request to HTTPS port"); - ngx_http_finalize_request(r, NGX_HTTP_TO_HTTPS); + // Connect 443 port to HTTP = Terminate + // ngx_http_finalize_request(r, NGX_HTTP_TO_HTTPS); + ngx_http_terminate_request(r, rc); return; }