is_cgi function is back and is working

+ in utils added function eval_file_mode(), it returns http errors codes about file
This commit is contained in:
Hugo LAMY
2022-08-14 01:05:20 +02:00
parent 285f2d049f
commit db4c7468cc
9 changed files with 100 additions and 35 deletions

View File

@@ -2,19 +2,13 @@
## work together
#### next commit
+ in fill_script_path() : scipt_path and script_info are filled, removing leadin dot
+ in _cgi_pos() : check validity of extension if it's only alpha characters
+ severall pbm appears
#### TODO hugo
- pbm : `http://localhost:4040/cgi-bin/cgi.sh`
#### questions
- does the root always start with leading "." ?
- how should we handle a wrong url like `http://localhost/cgi-bin/wrong.phpp/good.php` ?
- do we serve `./srcs/cgi-bin/good.php` ?
- or do we return 404 "not found" ?
- for now, execve would crash, but that doesn't produce a 404 error, rather a 500, is it bad ?
-> - for now, execve would crash, but that doesn't produce a 404 error, rather a 500, is it bad ?
- could we use errno after execve to choose an appropriate http error ? subject says : "Checking the value of errno is strictly forbidden after a read or a write operation"
- if a url has a file with extension, but it's not a cgi extension, is it necessary to look further ?
- ex. `http://localhost/file.php/file.py` for `cgi_ext py;` ?
- the response page is received long after the cgi-script is done, why ?