commit 60f4107da6ed88a34867cdcbf63794b5dc039f94 from: Omar Polo date: Sun Jul 23 19:04:53 2023 UTC add a test with fastcgi, locations and forceful disabling commit - 6a8387e5f54a4d6db07aa2f3c7046f618b82aac2 commit + 60f4107da6ed88a34867cdcbf63794b5dc039f94 blob - 16f589773945b83e3fcc548f252aeebbdd29f0cb blob + 5854c91d48011423c4d4c1284735df1e4c79945f --- regress/regress +++ regress/regress @@ -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 blob - e2d4a27e9a7ba3e57a83e33bab0d2f26f8ef2a25 blob + 9aa083ad04b3434ad21525bcfa569eb9264a3cb7 --- regress/tests.sh +++ regress/tests.sh @@ -233,7 +233,33 @@ test_fastcgi() { i=$(($i + 1)) done + + kill $fcgi_pid + 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 }