diff --git a/config/tester.toml b/config/tester.toml new file mode 100644 index 0000000..30f4cf8 --- /dev/null +++ b/config/tester.toml @@ -0,0 +1,29 @@ +[[server]] + name = "pohek1.org" + host = "127.0.0.1" + port = 8080 + [[server.location]] + location = "/" + root = "www/tester/" + methods = ["GET"] + autoindex = true + directory_file = "index.html" + [[server.location]] + location = "/put_test/*" + root = "www/tester/" + methods = ["PUT]"] + autoindex = true + upload_dir = "/www/tester/upload_here/" + [[server.location]] + location = "*.bla" + cgi_pass = "~/.local/bin/cgi-test" + [[server.location]] + location = "/post_body" + root = "www/tester/" + methods = ["POST"] + body_size_limit = 100 + [[server.location]] + location = "/directory/" + methods = ["GET"] + root = "www/tester/YoupiBanane/" + directory_file = "youpi.bad_extension" diff --git a/src/config/parse.cpp b/src/config/parse.cpp index 8e16c4d..7f9adae 100644 --- a/src/config/parse.cpp +++ b/src/config/parse.cpp @@ -40,7 +40,7 @@ namespace config TOMLMap *parse(void) { - std::string filename = "config/real.toml"; + std::string filename = "config/tester.toml"; config::TOMLParser parser(filename); TOMLMap *root = parser.parse(); /* config::display(root); */ diff --git a/www/tester/YoupiBanane/Yeah/not_happy.bad_extension b/www/tester/YoupiBanane/Yeah/not_happy.bad_extension new file mode 100644 index 0000000..e69de29 diff --git a/www/tester/YoupiBanane/nop/other.pouic b/www/tester/YoupiBanane/nop/other.pouic new file mode 100644 index 0000000..e69de29 diff --git a/www/tester/YoupiBanane/nop/youpi.bad_extension b/www/tester/YoupiBanane/nop/youpi.bad_extension new file mode 100644 index 0000000..e69de29 diff --git a/www/tester/YoupiBanane/youpi.bad_extension b/www/tester/YoupiBanane/youpi.bad_extension new file mode 100644 index 0000000..e69de29 diff --git a/www/tester/YoupiBanane/youpi.bla b/www/tester/YoupiBanane/youpi.bla new file mode 100644 index 0000000..e69de29