Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 8481:0d2b2664b41c quic
QUIC: added "quic" listen parameter.
The parameter allows processing HTTP/0.9-2 over QUIC.
Also, introduced ngx_http_quic_module and moved QUIC settings there
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 21 Jul 2020 23:09:22 +0300 |
parents | 5b7ec588de48 |
children | 250974f8f8e7 |
comparison
equal
deleted
inserted
replaced
8480:f537f99b86ee | 8481:0d2b2664b41c |
---|---|
4077 "ngx_http_v2_module"); | 4077 "ngx_http_v2_module"); |
4078 return NGX_CONF_ERROR; | 4078 return NGX_CONF_ERROR; |
4079 #endif | 4079 #endif |
4080 } | 4080 } |
4081 | 4081 |
4082 if (ngx_strcmp(value[n].data, "quic") == 0) { | |
4083 #if (NGX_HTTP_QUIC) | |
4084 lsopt.quic = 1; | |
4085 lsopt.type = SOCK_DGRAM; | |
4086 continue; | |
4087 #else | |
4088 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
4089 "the \"quic\" parameter requires " | |
4090 "ngx_http_quic_module"); | |
4091 return NGX_CONF_ERROR; | |
4092 #endif | |
4093 } | |
4094 | |
4082 if (ngx_strcmp(value[n].data, "http3") == 0) { | 4095 if (ngx_strcmp(value[n].data, "http3") == 0) { |
4083 #if (NGX_HTTP_V3) | 4096 #if (NGX_HTTP_V3) |
4097 lsopt.quic = 1; | |
4084 lsopt.http3 = 1; | 4098 lsopt.http3 = 1; |
4085 lsopt.type = SOCK_DGRAM; | 4099 lsopt.type = SOCK_DGRAM; |
4086 continue; | 4100 continue; |
4087 #else | 4101 #else |
4088 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 4102 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
4198 | 4212 |
4199 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 4213 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
4200 "invalid parameter \"%V\"", &value[n]); | 4214 "invalid parameter \"%V\"", &value[n]); |
4201 return NGX_CONF_ERROR; | 4215 return NGX_CONF_ERROR; |
4202 } | 4216 } |
4217 | |
4218 #if (NGX_HTTP_SSL) | |
4219 | |
4220 #if (NGX_HTTP_V3) | |
4221 if (lsopt.ssl && lsopt.http3) { | |
4222 return "\"ssl\" parameter is incompatible with \"http3\""; | |
4223 } | |
4224 #endif | |
4225 | |
4226 #if (NGX_HTTP_QUIC) | |
4227 if (lsopt.ssl && lsopt.quic) { | |
4228 return "\"ssl\" parameter is incompatible with \"quic\""; | |
4229 } | |
4230 #endif | |
4231 | |
4232 #endif | |
4203 | 4233 |
4204 for (n = 0; n < u.naddrs; n++) { | 4234 for (n = 0; n < u.naddrs; n++) { |
4205 lsopt.sockaddr = u.addrs[n].sockaddr; | 4235 lsopt.sockaddr = u.addrs[n].sockaddr; |
4206 lsopt.socklen = u.addrs[n].socklen; | 4236 lsopt.socklen = u.addrs[n].socklen; |
4207 lsopt.addr_text = u.addrs[n].name; | 4237 lsopt.addr_text = u.addrs[n].name; |