Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.c @ 8711:be08b858086a quic
HTTP/3: http3_hq directive and NGX_HTTP_V3_HQ macro.
Listen quic parameter is no longer supported.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Sat, 04 Dec 2021 10:52:55 +0300 |
parents | 33226ac61076 |
children | eaf356a35f5d |
comparison
equal
deleted
inserted
replaced
8710:33226ac61076 | 8711:be08b858086a |
---|---|
4094 "ngx_http_v2_module"); | 4094 "ngx_http_v2_module"); |
4095 return NGX_CONF_ERROR; | 4095 return NGX_CONF_ERROR; |
4096 #endif | 4096 #endif |
4097 } | 4097 } |
4098 | 4098 |
4099 if (ngx_strcmp(value[n].data, "quic") == 0) { | |
4100 #if (NGX_HTTP_V3) | |
4101 lsopt.quic = 1; | |
4102 lsopt.type = SOCK_DGRAM; | |
4103 continue; | |
4104 #else | |
4105 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
4106 "the \"quic\" parameter requires " | |
4107 "ngx_http_v3_module"); | |
4108 return NGX_CONF_ERROR; | |
4109 #endif | |
4110 } | |
4111 | |
4112 if (ngx_strcmp(value[n].data, "http3") == 0) { | 4099 if (ngx_strcmp(value[n].data, "http3") == 0) { |
4113 #if (NGX_HTTP_V3) | 4100 #if (NGX_HTTP_V3) |
4114 lsopt.quic = 1; | |
4115 lsopt.http3 = 1; | 4101 lsopt.http3 = 1; |
4116 lsopt.type = SOCK_DGRAM; | 4102 lsopt.type = SOCK_DGRAM; |
4117 continue; | 4103 continue; |
4118 #else | 4104 #else |
4119 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 4105 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
4222 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 4208 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
4223 "invalid parameter \"%V\"", &value[n]); | 4209 "invalid parameter \"%V\"", &value[n]); |
4224 return NGX_CONF_ERROR; | 4210 return NGX_CONF_ERROR; |
4225 } | 4211 } |
4226 | 4212 |
4227 #if (NGX_HTTP_SSL) | 4213 #if (NGX_HTTP_SSL && NGX_HTTP_V3) |
4228 | |
4229 #if (NGX_HTTP_V3) | |
4230 if (lsopt.ssl && lsopt.http3) { | 4214 if (lsopt.ssl && lsopt.http3) { |
4231 return "\"ssl\" parameter is incompatible with \"http3\""; | 4215 return "\"ssl\" parameter is incompatible with \"http3\""; |
4232 } | 4216 } |
4233 #endif | |
4234 | |
4235 #if (NGX_HTTP_V3) | |
4236 if (lsopt.ssl && lsopt.quic) { | |
4237 return "\"ssl\" parameter is incompatible with \"quic\""; | |
4238 } | |
4239 #endif | |
4240 | |
4241 #endif | 4217 #endif |
4242 | 4218 |
4243 for (n = 0; n < u.naddrs; n++) { | 4219 for (n = 0; n < u.naddrs; n++) { |
4244 lsopt.sockaddr = u.addrs[n].sockaddr; | 4220 lsopt.sockaddr = u.addrs[n].sockaddr; |
4245 lsopt.socklen = u.addrs[n].socklen; | 4221 lsopt.socklen = u.addrs[n].socklen; |