aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_http_js_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r--nginx/ngx_http_js_module.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c
index 98eedfc3..e9132fd8 100644
--- a/nginx/ngx_http_js_module.c
+++ b/nginx/ngx_http_js_module.c
@@ -1912,9 +1912,23 @@ ngx_http_js_ext_get_http_version(njs_vm_t *vm, njs_object_prop_t *prop,
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);