# HG changeset patch
# User Ruslan Ermilov <ru@nginx.com>
# Date 1525955573 -10800
# Thu May 10 15:32:53 2018 +0300
# Node ID 562b5babb82fc07ab82cc571f944220223e9b319
# Parent ceab908790c4eb7cd01c40bd16581ef794222ca5
HTTP/2: use scheme from original request for pushes (closes #1549).
Instead of the connection scheme, use scheme from the original request.
This fixes pushes when SSL is terminated by a proxy server in front of
nginx.
diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c
|
a
|
b
|
ngx_http_v2_push_resource(ngx_http_reque
|
| 1026 | 1026 | pos = ngx_http_v2_write_value(pos, path->data, path->len, tmp); |
| 1027 | 1027 | |
| 1028 | 1028 | #if (NGX_HTTP_SSL) |
| 1029 | | if (fc->ssl) { |
| | 1029 | if (r->schema_end == r->schema_start + 5) { |
| 1030 | 1030 | ngx_log_debug0(NGX_LOG_DEBUG_HTTP, fc->log, 0, |
| 1031 | 1031 | "http2 push header: \":scheme: https\""); |
| 1032 | 1032 | *pos++ = ngx_http_v2_indexed(NGX_HTTP_V2_SCHEME_HTTPS_INDEX); |