@@ -132,12 +132,12 @@ Content-Type: text/plain
132132qr/ This is cache value $/
133133
134134
135- === TEST 9 : Set C_FUNC_TEST_VARIABLE
135+ === TEST 9 : Set C_FUNC_AIO_THREADS_TEST
136136-- - config
137+ aio threads;
137138ngx_http_c_func_link_lib " NGINX_HTTP_C_FUNCTION_TEST_LIB_PATH/libcfuntest.so" ;
138139location = /testCFunGreeting {
139- ngx_http_c_func_call " my_app_simple_get_greeting" respTo= myRespVariable;
140- return 200 $ myRespVariable ;
140+ ngx_http_c_func_call " my_app_simple_get_greeting" ;
141141}
142142--- request
143143GET /testCFunGreeting
@@ -148,50 +148,16 @@ Content-Type: text/plain
148148qr/ greeting from ngx_http_c_func testing$/
149149
150150
151- === TEST 10 : Set C_FUNC_TEST_ARGS_AND_VARIABLE
152- -- - config
153- ngx_http_c_func_link_lib " NGINX_HTTP_C_FUNCTION_TEST_LIB_PATH/libcfuntest.so" ;
154- location = /testCFunARGS {
155- ngx_http_c_func_call " my_app_simple_get_args" respTo= simpleRespVariable;
156- return 200 $ simpleRespVariable ;
157- }
158- --- request
159- GET /testCFunARGS? greeting= hello_nginx? id= 129310923
160- -- - error_code: 200
161- -- - response_headers
162- Content-Type: text/ plain
163- -- - response_body_like eval
164- qr/ greeting= hello_nginx\? id= 129310923 $/
165-
166-
167- === TEST 11 : Set C_FUNC_AIO_THREADS_TEST_ARGS_AND_VARIABLE
151+ === TEST 10 : Test output headers
168152-- - config
169153aio threads;
170154ngx_http_c_func_link_lib " NGINX_HTTP_C_FUNCTION_TEST_LIB_PATH/libcfuntest.so" ;
171- location = /testCFunARGS {
172- ngx_http_c_func_call " my_app_simple_get_args" respTo= simpleRespVariable;
173- return 200 $ simpleRespVariable ;
155+ location = /ext_header_foo {
156+ ngx_http_c_func_call " my_simple_extra_foo_header_output" ;
174157}
175158--- request
176- GET /testCFunARGS ? greeting = hello_nginx ? id = 129310923
159+ GET /ext_header_foo
177160-- - error_code: 200
178161-- - response_headers
179- Content-Type: text/ plain
180- -- - response_body_like eval
181- qr/ greeting= hello_nginx\? id= 129310923 $/
182-
162+ foo: foovalue
183163
184- === TEST 12 : Set C_FUNC_AIO_THREADS_TEST
185- -- - config
186- aio threads;
187- ngx_http_c_func_link_lib " NGINX_HTTP_C_FUNCTION_TEST_LIB_PATH/libcfuntest.so" ;
188- location = /testCFunGreeting {
189- ngx_http_c_func_call " my_app_simple_get_greeting" ;
190- }
191- --- request
192- GET /testCFunGreeting
193- -- - error_code: 200
194- -- - response_headers
195- Content-Type: text/ plain
196- -- - response_body_like eval
197- qr/ greeting from ngx_http_c_func testing$/
0 commit comments