Need to use epoll() but MacOS only had poll()
need to implement
- Requirements:
- status codes TODO: dynamically respond by checking the request object, look at request directory, incase its in a location block of the webserv config.
- delete
- HTTP redirections
- CGI (i.e executing python/php) (fork use only allowed for CGI)
- As soon as you hit the cgi route, ignore checking the existence of the following routes, example: work/cgi.py/users?campus=42kl = access("work/cgi.py") to check if that cgi exists, then /users is PATH_INFO, and QUERRY_STRING = ?campus=42kl
- use chdir to change child directory to cgi directory for relative file access
- QUERRY_STRING, PATH_INFO,
- IF REQUEST METHOD IS POST: write to child pipe the request body
- request should have 60 seconds timeout
- test cases
- using ngninx as truth source
- stress test