comparison src/http/v2/ngx_http_v2.c @ 7296:8e6bb4e6045f

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.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 07 Jun 2018 20:04:22 +0300
parents 89430899c72a
children fbb683496705
comparison
equal deleted inserted replaced
7295:89430899c72a 7296:8e6bb4e6045f
2614 ngx_http_v2_set_dependency(h2c, node, parent->node->id, 0); 2614 ngx_http_v2_set_dependency(h2c, node, parent->node->id, 0);
2615 2615
2616 r->method_name = ngx_http_core_get_method; 2616 r->method_name = ngx_http_core_get_method;
2617 r->method = NGX_HTTP_GET; 2617 r->method = NGX_HTTP_GET;
2618 2618
2619 #if (NGX_HTTP_SSL) 2619 r->schema.data = ngx_pstrdup(pool, &parent->request->schema);
2620 if (fc->ssl) { 2620 if (r->schema.data == NULL) {
2621 ngx_str_set(&r->schema, "https"); 2621 goto close;
2622 2622 }
2623 } else 2623
2624 #endif 2624 r->schema.len = parent->request->schema.len;
2625 {
2626 ngx_str_set(&r->schema, "http");
2627 }
2628 2625
2629 value.data = ngx_pstrdup(pool, path); 2626 value.data = ngx_pstrdup(pool, path);
2630 if (value.data == NULL) { 2627 if (value.data == NULL) {
2631 goto close; 2628 goto close;
2632 } 2629 }