add a test with fastcgi, locations and forceful disabling

This commit is contained in:
Omar Polo 2023-07-23 19:04:53 +00:00
parent 6a8387e5f5
commit 60f4107da6
2 changed files with 27 additions and 0 deletions

View File

@ -51,6 +51,7 @@ run_test test_require_client_ca
run_test test_root_inside_location
run_test test_root_inside_location_with_redirect
run_test test_fastcgi
run_test test_fastcgi_inside_location
run_test test_fastcgi_deprecated_syntax
run_test test_macro_expansion
run_test test_proxy_relay_to

View File

@ -238,6 +238,32 @@ test_fastcgi() {
return 0
}
test_fastcgi_inside_location() {
./fcgi-test fcgi.sock &
fcgi_pid=$!
setup_simple_test 'prefork 1' 'fastcgi socket "'$PWD'/fcgi.sock"
location "/dir/*" {
fastcgi off
}'
msg=$(printf "# hello from fastcgi!\nsome more content in the page...")
fetch /foo
if ! check_reply "20 text/gemini" "$msg"; then
kill $fcgi_pid
return 1
fi
fetch /dir/foo.gmi
if ! check_reply "20 text/gemini" "# hello world"; then
kill $fcgi_pid
return 1
fi
kill $fcgi_pid
return 0
}
test_fastcgi_deprecated_syntax() {
./fcgi-test fcgi.sock &
fcgi_pid=$!