Well we learned a lot from Nginx, starting to incorporate some, but hoping for feedback before i do most of that, instead worked on improving the location sorter and checking that locations paths are valid, close but not quite done

This commit is contained in:
Me
2022-08-05 03:42:42 +02:00
parent f7e6b61811
commit 9ac14aa1aa
5 changed files with 90 additions and 53 deletions

View File

@@ -10,8 +10,9 @@ server {
# client_body_limit 400;
index index.html; # this is another comment
# i think root requires leading /
# root goop;
root www;
root /www;
# root www/test; # also works
# root /www; # stat does not like this kind of definition
# root /usr; # because it's looking at / aka absolute path
@@ -19,21 +20,27 @@ server {
# root /home/me/Programming/42/group_webserv; # but this is fine
location /test {
root www/test;
root /www/test;
index index.html;
}
# If not explicitly set, ConfigParser need to genererate a location block
# like this for path "/" (based on field "root" and "index" of the server)
location / {
root www;
root /www;
index index.html;
allow_methods DELETE;
}
allow_methods GET POST;
location /test/something.html {
allow_methods GET POST DELETE;
}
location /something/long/here {
# location /something/long/here {
# }
location /something/long {
}
location /something/long/here/but/more {