diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2021-05-31 11:54:47 +0300 |
|---|---|---|
| committer | Sergey Kandaurov <pluknet@nginx.com> | 2021-05-31 11:54:47 +0300 |
| commit | e8a76252699339b2fa615ec0e3f01ae1afbb36d8 (patch) | |
| tree | 4f1084338ace47831eef7b1a1dbc435d3f8a980c /src | |
| parent | de1ce761999ab294aa346aa08475edcf9522d236 (diff) | |
| download | nginx-e8a76252699339b2fa615ec0e3f01ae1afbb36d8.tar.gz nginx-e8a76252699339b2fa615ec0e3f01ae1afbb36d8.tar.bz2 | |
HTTP/3: removed $http3 that served its purpose.
To specify final protocol version by hand:
add_header Alt-Svc h3=":443";
Diffstat (limited to 'src')
| -rw-r--r-- | src/event/quic/ngx_event_quic.h | 4 | ||||
| -rw-r--r-- | src/http/v3/ngx_http_v3_module.c | 51 |
2 files changed, 1 insertions, 54 deletions
diff --git a/src/event/quic/ngx_event_quic.h b/src/event/quic/ngx_event_quic.h index 230c2c46f..6d4308afa 100644 --- a/src/event/quic/ngx_event_quic.h +++ b/src/event/quic/ngx_event_quic.h @@ -12,10 +12,6 @@ #include <ngx_core.h> -#ifndef NGX_QUIC_DRAFT_VERSION -#define NGX_QUIC_DRAFT_VERSION 29 -#endif - #define NGX_QUIC_MAX_UDP_PAYLOAD_SIZE 65527 #define NGX_QUIC_DEFAULT_ACK_DELAY_EXPONENT 3 diff --git a/src/http/v3/ngx_http_v3_module.c b/src/http/v3/ngx_http_v3_module.c index 18da90aab..3b651f044 100644 --- a/src/http/v3/ngx_http_v3_module.c +++ b/src/http/v3/ngx_http_v3_module.c @@ -10,9 +10,6 @@ #include <ngx_http.h> -static ngx_int_t ngx_http_variable_http3(ngx_http_request_t *r, - ngx_http_variable_value_t *v, uintptr_t data); -static ngx_int_t ngx_http_v3_add_variables(ngx_conf_t *cf); static void *ngx_http_v3_create_srv_conf(ngx_conf_t *cf); static char *ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child); @@ -64,7 +61,7 @@ static ngx_command_t ngx_http_v3_commands[] = { static ngx_http_module_t ngx_http_v3_module_ctx = { - ngx_http_v3_add_variables, /* preconfiguration */ + NULL, /* preconfiguration */ NULL, /* postconfiguration */ NULL, /* create main configuration */ @@ -94,52 +91,6 @@ ngx_module_t ngx_http_v3_module = { }; -static ngx_http_variable_t ngx_http_v3_vars[] = { - - { ngx_string("http3"), NULL, ngx_http_variable_http3, 0, 0, 0 }, - - ngx_http_null_variable -}; - - -static ngx_int_t -ngx_http_variable_http3(ngx_http_request_t *r, - ngx_http_variable_value_t *v, uintptr_t data) -{ - v->valid = 1; - v->no_cacheable = 1; - v->not_found = 0; - - v->data = ngx_pnalloc(r->pool, sizeof("h3-xx") - 1); - if (v->data == NULL) { - return NGX_ERROR; - } - - v->len = ngx_sprintf(v->data, "h3-%d", NGX_QUIC_DRAFT_VERSION) - v->data; - - return NGX_OK; -} - - -static ngx_int_t -ngx_http_v3_add_variables(ngx_conf_t *cf) -{ - ngx_http_variable_t *var, *v; - - for (v = ngx_http_v3_vars; v->name.len; v++) { - var = ngx_http_add_variable(cf, &v->name, v->flags); - if (var == NULL) { - return NGX_ERROR; - } - - var->get_handler = v->get_handler; - var->data = v->data; - } - - return NGX_OK; -} - - static void * ngx_http_v3_create_srv_conf(ngx_conf_t *cf) { |
