8
Tengin版本:tengine-2.1.2.tar.gz 问题描述: 使用firefox一切正常,使用chrome(58.0.3029.110 (64-bit))就会出现如下问题。
当我访问: "http://test.local.com/collecter/osobjs"的时候能够正常打印"/collecter/osobjs" ,但是当我访问 "http://test.local.com/collecter/osobjs/"的时候地址栏的地址就变成了 "http://test.local.com/search/error.html" 打印出来的URI也变成了"/search/error.html"。。。。 救济 谢谢了。。 我是不是发现了一个BUG呢?
nginx.conf
user nginx;
worker_processes auto;
events {
worker_connections 1024;
}
http {
#lua_code_cache off;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include conf.d/*.conf;
}`
conf.d/test.conf
`
server {
listen 81;
server_name cmonitor.beta.iaas.jd.com;
location / {
default_type 'text/html';
access_by_lua_file conf/lua/sso.lua;
}
}`
sso.lua
[root@ xx.xx.xx conf]# cat lua/sso.lua
-- Author:wanghaichao6
-- Create: 20170223
-- LastModifyu: 20170227
-- SSO
local http = require("resty.http")
local httpc = http.new()
local cjson = require("cjson")
ngx.say(ngx.var.uri)
ngx.exit(200)
[root@xxx# /export/servers/tengine/sbin/nginx -V
Tengine version: Tengine/2.1.2 (nginx/1.6.2)
built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/export/servers/tengine --with-http_lua_module --with-ld-opt=-Wl,-rpath,
loaded modules:
ngx_core_module (static)
ngx_errlog_module (static)
ngx_conf_module (static)
ngx_dso_module (static)
ngx_syslog_module (static)
ngx_events_module (static)
ngx_event_core_module (static)
ngx_epoll_module (static)
ngx_procs_module (static)
ngx_proc_core_module (static)
ngx_openssl_module (static)
ngx_regex_module (static)
ngx_http_module (static)
ngx_http_core_module (static)
ngx_http_log_module (static)
ngx_http_upstream_module (static)
ngx_http_static_module (static)
ngx_http_autoindex_module (static)
ngx_http_index_module (static)
ngx_http_auth_basic_module (static)
ngx_http_access_module (static)
ngx_http_limit_conn_module (static)
ngx_http_limit_req_module (static)
ngx_http_geo_module (static)
ngx_http_map_module (static)
ngx_http_split_clients_module (static)
ngx_http_referer_module (static)
ngx_http_rewrite_module (static)
ngx_http_ssl_module (static)
ngx_http_proxy_module (static)
ngx_http_fastcgi_module (static)
ngx_http_uwsgi_module (static)
ngx_http_scgi_module (static)
ngx_http_memcached_module (static)
ngx_http_empty_gif_module (static)
ngx_http_browser_module (static)
ngx_http_user_agent_module (static)
ngx_http_upstream_ip_hash_module (static)
ngx_http_upstream_consistent_hash_module (static)
ngx_http_upstream_check_module (static)
ngx_http_upstream_least_conn_module (static)
ngx_http_upstream_keepalive_module (static)
ngx_http_upstream_dynamic_module (static)
ngx_http_stub_status_module (static)
ngx_http_write_filter_module (static)
ngx_http_header_filter_module (static)
ngx_http_chunked_filter_module (static)
ngx_http_range_header_filter_module (static)
ngx_http_gzip_filter_module (static)
ngx_http_postpone_filter_module (static)
ngx_http_ssi_filter_module (static)
ngx_http_charset_filter_module (static)
ngx_http_userid_filter_module (static)
ngx_http_footer_filter_module (static)
ngx_http_trim_filter_module (static)
ngx_http_headers_filter_module (static)
ngx_http_upstream_session_sticky_module (static)
ngx_http_reqstat_module (static)
ngx_http_lua_module (static)
ngx_http_copy_filter_module (static)
ngx_http_range_body_filter_module (static)
ngx_http_not_modified_filter_module (static)`