Welcome! Log In Create A New Profile

Advanced

[PATCH] HTTP/2: Make $scheme variable return :scheme pseudo-header value

Chris Branch via nginx-devel
February 22, 2017 09:32AM
# HG changeset patch
# User Chris Branch <cbranch@cloudflare.com>
# Date 1487773385 0
# Wed Feb 22 14:23:05 2017 +0000
# Node ID 2d050c8c2e688c26f4796a09c728c85678c611b4
# Parent 87cf6ddb41c216876d13cffa5e637a61b159362c
HTTP/2: Make $scheme variable return :scheme pseudo-header value.

This is relevant for plaintext HTTP/2 as well as HTTP/2 over TLS using
opportunistic security, as described in:
https://tools.ietf.org/html/draft-ietf-httpbis-http2-encryption

diff -r 87cf6ddb41c2 -r 2d050c8c2e68 src/http/ngx_http_variables.c
--- a/src/http/ngx_http_variables.c Fri Feb 17 17:01:27 2017 +0300
+++ b/src/http/ngx_http_variables.c Wed Feb 22 14:23:05 2017 +0000
@@ -1386,6 +1386,16 @@
ngx_http_variable_scheme(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data)
{
+ if (r->schema_start) {
+ v->len = r->schema_end - r->schema_start;
+ v->valid = 1;
+ v->no_cacheable = 0;
+ v->not_found = 0;
+ v->data = r->schema_start;
+
+ return NGX_OK;
+ }
+
#if (NGX_HTTP_SSL)

if (r->connection->ssl) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] HTTP/2: Make $scheme variable return :scheme pseudo-header value

Chris Branch via nginx-devel 321 February 22, 2017 09:32AM

Re: [PATCH] HTTP/2: Make $scheme variable return :scheme pseudo-header value

Valentin V. Bartenev 178 February 22, 2017 09:48AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready