Comments (5)
Smart compile! It seems the problem is in ngx_http_find_virtual_server
, could you help us to fix this bug?
from tengine.
I had reviews the code for ngx_http_find_virtual_server, it seems works fine. But I dont know why it will cause fail.
The most easy way to fix it is
--- a/src/http/ngx_http_request.c 2014-01-08 20:24:46.000000000 +0800
+++ b/src/http/ngx_http_request.c 2014-01-12 02:49:03.757373929 +0800
@@ -2106,7 +2106,7 @@ ngx_http_set_virtual_server(ngx_http_req
ngx_int_t rc;
ngx_http_connection_t *hc;
ngx_http_core_loc_conf_t *clcf;
- ngx_http_core_srv_conf_t *cscf;
- ngx_http_core_srv_conf_t *cscf = NULL;
hc = r->http_connection;
But I think this fix way is incorrent, so I haven't commit it.
from tengine.
In the function ngx_http_find_virtual_server
, it will return NGX_DECLINDE when virtual_names is NULL. At that time, cscf is unintialized.
from tengine.
Here is the code after preprocess
after ngx_http_find_virtual_server the only possible value for rc: -1, -5, 0, when -1 direct exit. 0 is normal. only -5 need continue to check. Then when rc == -5 and next need cscf is sscf, but before this, cscf will set to hc->addr_conf->default_server, otherwise if no ssl_servername, will return 0, it seems works normally. I think that may be gcc bug.
rc = ngx_http_find_virtual_server(r->connection,
hc->addr_conf->virtual_names,
host, r, &cscf);
if (rc == -1) {
ngx_http_close_request(r, 500);
return -1;
}
if (hc->ssl_servername) {
ngx_http_ssl_srv_conf_t *sscf;
if (rc == -5) {
cscf = hc->addr_conf->default_server;
rc = 0;
}
sscf = (cscf->ctx)->srv_conf[ngx_http_ssl_module.ctx_index];
if (sscf->verify) {
if ((r->connection->log)->log_level >= 7) ngx_log_error_core(7, r->connection->log, 0, "client attempted to request the server name " "different from that one was negotiated")
;
ngx_http_finalize_request(r, 400);
return -1;
}
}
if (rc == -5) {
return 0;
}
from tengine.
OK, I saw the code path below, it should be OK. It seems a negative warning. Should I close this issue. It should be the compile's problem.
from tengine.
Related Issues (20)
- Tengine官网很多错误信息 HOT 4
- Tengine模块ngx_multi_upstream_module功能是什么? HOT 3
- Tengine为什么不包含nginx_tcp_proxy_module模块? HOT 4
- CVE-2023-44487: HTTP/2 Rapid Reset Attack
- Tengine指定ssl_certificate_key engine:name:id的处理问题 HOT 2
- Compile tengine-3.0.0 with xquic 1.6.1 failed HOT 7
- xquic post 文件 md5 发生变化 HOT 1
- nginx多个域名使用同一个upstream问题 HOT 1
- 在两个以上server中配置xquic时,报nginx: [warn] protocol options redefined for 0.0.0.0:443 HOT 3
- Tengine启动时报错,xquic的*.gcda:Cannot open HOT 3
- tengine 集群偶现耗时不符合预期(大于1s) HOT 3
- 关于tengine时间变量的问题 HOT 6
- 使用xquic 1.6.2时,编译tengine时报错 HOT 3
- 新版本tengine3+,lua 报错 HOT 4
- upstream keepalive配置在使用dyups更新upstream后失效问题 HOT 1
- trim on; not worked HOT 2
- Pls. refer to doc [Ngx_http_trim_filter](https://tengine.taobao.org/document/http_trim_filter.html) specifically. HOT 7
- 安装ngx_http_xquic_module模块报错:modules/ngx_http_xquic_module/ngx_http_xquic.c:24:37: fatal error: ngx_http_lua_ssl_certby.h: No such file or directory HOT 5
- quic端口无法访问,tengine启动有报错 HOT 4
- dubbo 连接瞬间超时 HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tengine.