cgi exec compare with file method

This commit is contained in:
hugogogo
2022-08-08 13:20:06 +02:00
parent 78c3ffa456
commit da1f4b6e37
5 changed files with 97 additions and 48 deletions

View File

@@ -4,16 +4,24 @@
- in client.cpp i fill the port, is there a default one in case it's not in the request ?
- timeout server but still works ?
- path contains double "//" from `Webserv::_get()` in response.cpp
- how do we deal with cgi config default folder path or anything ?
- cgi path ? defined in config ? and root path ? :
- `Client.cpp : fill_script_path()`
- `cgi.cpp : is_cgi()`
- `cgi.cpp : set_env()`
- what if the uri contains a php file, and the config said php must be handled by cgi, but the path to this php in the uri is wrong ?
- is it ok ? `http://my_site.com/cgi-bin/php-cgi` (real path)
- is it ok ? `http://my_site.com/php-cgi` (reconstruct path ?)
- is it ok ? `http://my_site.com/something/php-cgi` (what about 'something' ?)
- is it ok ? `http://my_site.com/something/cgi-bin/php-cgi` (real path with 'something' before ? )
#### notifications
- i changed the Client getters in two categories :
- getters for requests infos : `get_rq_<info>`
- getters for client sides infos : `get_cl_<info>` (such as ip of client)
- i changed the variables in request struct in Client :
- `path` become `uri`....>(ex. `/path/to/file?var=val`)
- add `abs_path`............>(ex. `/path/to/file `)
- add `query`................>(ex. ` var=val`)
- `path` become `uri` (ex. `/path/to/file?var=val`)
- add `abs_path` (ex. `/path/to/file` )
- add `query` (ex. `var=val`)
- the header fields names, as key in map, are stored in lowercase, and getters are case-insensitives