Welcome! Log In Create A New Profile

Advanced

[PATCH] HTTP/2: expose function to push single resource to modules

Alessandro Ghedini
February 08, 2018 11:54AM
# HG changeset patch
# User Alessandro Ghedini <alessandro@ghedini.me>
# Date 1518108716 0
# Thu Feb 08 16:51:56 2018 +0000
# Branch expose-push
# Node ID 1bb98b06d5536dfc80a407aabd8d06f9309f8df6
# Parent a49af443656f2b65ca5de9d8cad5594f44e18ff7
HTTP/2: expose function to push single resource to modules.

This makes it possible for 3rd party modules to implement alternative
methods for deciding which resources to push to clients on a per-request
basis (e.g. by parsing HTML from the response body, by using a custom
Link header parser, ...).

No functional changes.

diff -r a49af443656f -r 1bb98b06d553 src/http/v2/ngx_http_v2.h
--- a/src/http/v2/ngx_http_v2.h Thu Feb 08 12:11:30 2018 +0300
+++ b/src/http/v2/ngx_http_v2.h Thu Feb 08 16:51:56 2018 +0000
@@ -304,6 +304,9 @@
size_t ngx_http_v2_huff_encode(u_char *src, size_t len, u_char *dst,
ngx_uint_t lower);

+ngx_int_t ngx_http_v2_push_resource(ngx_http_request_t *r, ngx_str_t *path,
+ ngx_str_t *authority);
+

#define ngx_http_v2_prefix(bits) ((1 << (bits)) - 1)

diff -r a49af443656f -r 1bb98b06d553 src/http/v2/ngx_http_v2_filter_module.c
--- a/src/http/v2/ngx_http_v2_filter_module.c Thu Feb 08 12:11:30 2018 +0300
+++ b/src/http/v2/ngx_http_v2_filter_module.c Thu Feb 08 16:51:56 2018 +0000
@@ -62,8 +62,6 @@


static ngx_int_t ngx_http_v2_push_resources(ngx_http_request_t *r);
-static ngx_int_t ngx_http_v2_push_resource(ngx_http_request_t *r,
- ngx_str_t *path, ngx_str_t *authority);

static u_char *ngx_http_v2_string_encode(u_char *dst, u_char *src, size_t len,
u_char *tmp, ngx_uint_t lower);
@@ -903,7 +901,7 @@
}


-static ngx_int_t
+ngx_int_t
ngx_http_v2_push_resource(ngx_http_request_t *r, ngx_str_t *path,
ngx_str_t *authority)
{
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] HTTP/2: expose function to push single resource to modules

Alessandro Ghedini 676 February 08, 2018 11:54AM

Re: [PATCH] HTTP/2: expose function to push single resource to modules

Maxim Dounin 353 February 08, 2018 02:02PM

Re: [PATCH] HTTP/2: expose function to push single resource to modules

Alessandro Ghedini 376 February 08, 2018 02:50PM

Re: [PATCH] HTTP/2: expose function to push single resource to modules

ru@nginx.com 440 February 09, 2018 02:38AM

Re: [PATCH] HTTP/2: expose function to push single resource to modules

Alessandro Ghedini 335 February 13, 2018 07:24AM

Re: [PATCH] HTTP/2: expose function to push single resource to modules

Maxim Dounin 340 February 13, 2018 08:32AM

Re: [PATCH] HTTP/2: expose function to push single resource to modules

ru@nginx.com 465 February 14, 2018 10:42PM



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

Online Users

Guests: 307
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