Welcome! Log In Create A New Profile

Advanced

[njs] HTTP: added support for http/2 and http/3 in r.httpVersion.

Dmitry Volyntsev
September 11, 2020 09:58AM
details: https://hg.nginx.org/njs/rev/e1dccc5a2f05
branches:
changeset: 1522:e1dccc5a2f05
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Sep 11 13:54:57 2020 +0000
description:
HTTP: added support for http/2 and http/3 in r.httpVersion.

diffstat:

nginx/ngx_http_js_module.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r f8c8e23d2bbd -r e1dccc5a2f05 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c Mon Sep 07 17:55:24 2020 +0300
+++ b/nginx/ngx_http_js_module.c Fri Sep 11 13:54:57 2020 +0000
@@ -1912,9 +1912,23 @@ ngx_http_js_ext_get_http_version(njs_vm_
ngx_str_set(&v, "1.0");
break;

- default: /* NGX_HTTP_VERSION_11 */
+ case NGX_HTTP_VERSION_11:
ngx_str_set(&v, "1.1");
break;
+
+ case NGX_HTTP_VERSION_20:
+ ngx_str_set(&v, "2.0");
+ break;
+
+#if (NGX_HTTP_VERSION_30)
+ case NGX_HTTP_VERSION_30:
+ ngx_str_set(&v, "3.0");
+ break;
+#endif
+
+ default:
+ ngx_str_set(&v, "");
+ break;
}

return njs_vm_value_string_set(vm, retval, v.data, v.len);
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] HTTP: added support for http/2 and http/3 in r.httpVersion.

Dmitry Volyntsev 332 September 11, 2020 09:58AM



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

Online Users

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