File tree 1 file changed +1
-58
lines changed
1 file changed +1
-58
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use Test::Nginx::Socket::Lua;
4
4
5
5
repeat_each(2 );
6
6
7
- plan tests => repeat_each() * (3 * blocks() + 14 );
7
+ plan tests => repeat_each() * (3 * blocks() + 13 );
8
8
9
9
our $ HtmlDir = html_dir;
10
10
@@ -1006,63 +1006,6 @@ qr/runtime error: content_by_lua\(nginx\.conf:\d+\):14: bad request/
1006
1006
# set $port 5000;
1007
1007
set $ port $ TEST_NGINX_MEMCACHED_PORT ;
1008
1008
1009
- content_by_lua '
1010
- local test = require "test"
1011
- if ngx.var.arg_reset then
1012
- local sock = test.new_sock()
1013
- local ok, err = sock:setpeername("127.0.0.1", ngx.var.port)
1014
- if not ok then
1015
- ngx.say("failed to set peer: ", err)
1016
- else
1017
- ngx.say("peer set")
1018
- end
1019
- return
1020
- end
1021
- local sock = test.get_sock()
1022
- sock:send("a")
1023
- ' ;
1024
- }
1025
- -- - user_files
1026
- >>> test. lua
1027
- module(" test" , package. seeall)
1028
-
1029
- local sock
1030
-
1031
- function new_sock()
1032
- sock = ngx. socket. udp()
1033
- return sock
1034
- end
1035
-
1036
- function get_sock()
1037
- return sock
1038
- end
1039
- -- - request
1040
- GET / main
1041
- -- - response_body_like eval
1042
- qr/^ peer set
1043
- < html.*? 500 Internal Server Error/ ms
1044
-
1045
- -- - error_log eval
1046
- qr/ runtime error: content_by_lua\(nginx\. conf: \d+ \): 14 : bad request/
1047
-
1048
- -- - no_error_log
1049
- [alert]
1050
-
1051
-
1052
-
1053
- === TEST 19 : bad request tries to receive
1054
- -- - http_config eval
1055
- " lua_package_path '$::HtmlDir/?.lua;./?.lua;;';"
1056
- -- - config
1057
- server_tokens off;
1058
- location = /main {
1059
- echo_location / t? reset= 1 ;
1060
- echo_location / t;
1061
- }
1062
- location /t {
1063
- # set $port 5000;
1064
- set $ port $ TEST_NGINX_MEMCACHED_PORT ;
1065
-
1066
1009
content_by_lua '
1067
1010
local test = require "test"
1068
1011
if ngx.var.arg_reset then
You can’t perform that action at this time.
0 commit comments