Browse Source

Fix redirect_to_https_port

redirect_to_https_port has been changed recently: mg_send_http_redirect is
called from there. However, mg_send_http_redirect requires the target url,
not the Location header.

See #639
bel2125 7 năm trước cách đây
mục cha
commit
5f92283b71
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -13084,7 +13084,7 @@ redirect_to_https_port(struct mg_connection *conn, int ssl_index)
 		    &truncated,
 		    &truncated,
 		    target_url,
 		    target_url,
 		    sizeof(target_url),
 		    sizeof(target_url),
-		    "Location: https://%s:%d%s%s%s",
+		    "https://%s:%d%s%s%s",
 
 
 		    conn->host,
 		    conn->host,
 #if defined(USE_IPV6)
 #if defined(USE_IPV6)