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 3.1.0 中 ngx_http_upstream_check_module 和 ngx_http_upstream_dynamic_module 配合使用 Bug HOT 1
- Tengine属于信创软件吗? HOT 1
- Support ssl_ciphers with Chinese SM2, SM3, SM4, ZUC and etc. in HTTP3 HOT 1
- tengine+xquic+tongsuo+QAT性能无提升
- YoReader 404 Not found HOT 2
- tengine ipv6 resolv.conf
- tengine xquic 如何实现被lvs的 udp的健康检查探测到 HOT 2
- Tengine/3.1.0 + Tongsuo-8.4.0 +国密证书+国际证书:加上ssl_reject_handshake on 时国密无法连接。
- Project dead? HOT 3
- dyups module: 多worker问题场景下worker挂掉后新拉齐的worker是否有之前动态加载的upstream数据? HOT 1
- upstream_addr 字段 打印多个端口的问题。
- What are the advantages of using ngx_ingress_module over ngx_http_lua_module? HOT 2
- quikc start get some other vendor module error HOT 5
- 多次reload后,产生多个日志进程不释放 HOT 3
- 500 HOT 2
- qat fw_counter计数不增长,停留在0值。 HOT 5
- [BUG] SSL_read bad length when upload 2.9GB file HOT 3
- kernel: dh895xcc 0000:60:00.0: Process nginx exit with orphan rings HOT 5
- Tengine支持的底层lib最新版本 HOT 4
- bug: print "async del conn epoll_ctl" per request into error.log HOT 1
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.