use ngx_hash_t to optimize the header look-up for ngx.req.set_header
use ngx_hash_t to optimize the header look-up for ngx.req.set_header and clear_header, if this is ok, i will port it to "ngx.header.HEADER"
I have run the testsuite like this: ps: the dav_methods error is not caused by this commit.
rako@t450s:~/gitroot/rako9000/lua-nginx-module$ prove -I/opt/openresty/test-nginx/lib t/028-req-header.t
t/028-req-header.t .. 145/256 nginx: [emerg] unknown directive "dav_methods" in /home/rako/gitroot/rako9000/lua-nginx-module/t/servroot/conf/nginx.conf:43
Bailout called. Further testing stopped: TEST 49: set the Destination request header for WebDav - Cannot start nginx using command "nginx -p /home/rako/gitroot/rako9000/lua-nginx-module/t/servroot/ -c /home/rako/gitroot/rako9000/lua-nginx-module/t/servroot/conf/nginx.conf > /dev/null" (status code 256).
FAILED--Further testing stopped: TEST 49: set the Destination request header for WebDav - Cannot start nginx using command "nginx -p /home/rako/gitroot/rako9000/lua-nginx-module/t/servroot/ -c /home/rako/gitroot/rako9000/lua-nginx-module/t/servroot/conf/nginx.conf > /dev/null" (status code 256).
rako@t450s:~/gitroot/rako9000/lua-nginx-module$ prove -I/opt/openresty/test-nginx/lib t/111-req-header-ua.t
t/111-req-header-ua.t .. ok
All tests successful.
Files=1, Tests=144, 3 wallclock secs ( 0.04 usr 0.00 sys + 0.19 cusr 0.06 csys = 0.29 CPU)
Result: PASS
rako@t450s:~/gitroot/rako9000/lua-nginx-module$ prove -I/opt/openresty/test-nginx/lib t/112-req-header-conn.t
t/112-req-header-conn.t .. ok
All tests successful.
Files=1, Tests=32, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.12 cusr 0.02 csys = 0.16 CPU)
Result: PASS
rako@t450s:~/gitroot/rako9000/lua-nginx-module$ prove -I/opt/openresty/test-nginx/lib t/113-req-header-cookie.t
t/113-req-header-cookie.t .. ok
All tests successful.
Files=1, Tests=48, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.12 cusr 0.03 csys = 0.18 CPU)
Result: PASS
@rako9000 Thanks for looking into this. But the Travis CI testing is failing:
https://travis-ci.org/openresty/lua-nginx-module/builds/139419383
Seems like your change leads to a lot of nginx warnings. That is,
nginx: [warn] could not build optimal req_set_header_hash, you should increase either req_set_header_hash_max_size: 100 or req_set_header_hash_bucket_size: 43; ignoring req_set_header_hash_bucket_size
Maybe you should tune to hash table parameters a bit?
@agentzh I am sorry for this warning, and I made small changes to this, but I have two question:
- My config is this "error_log logs/error.log info;", but there is no warning message in the error log like that. How can I get this warning? 2.It's about git usage. for this second commit, It seems like the github pull request automatically?
@agentzh The ci errors seem like dns problem, not a code bug. What should I do?
This pull request is now in conflict :(
This pull request is now in conflict :(
This pull request is now in conflict :(
This pull request is now in conflict :(
This pull request is now in conflict :(