changes var in client

This commit is contained in:
hugogogo
2022-08-08 18:06:41 +02:00
parent f10931042f
commit e1a68bc3e4
6 changed files with 44 additions and 39 deletions

View File

@@ -1,23 +1,27 @@
## work together
#### TODO
- `_is_cgi()` and `_fill_cgi_path()`
- `_cgi_output()` change status in `client->status`
- two cgi tests :
? - a basic form with "name" and "something", that return a html page with that
? - for GET and POST
? - a script called by a file extension in URI
#### output cgi script :
! TODO : change all the '\n' by '\r\n'
! TODO : there is at least one header field followed by '\r\n\r\n' :
- "Content-Type"
- "Location"
- "Status"
-> TODO : there is no field duplicate (resolve conflicts)
-> TODO : if status field, change server status for this one
! TODO : there is no space between filed name and ":"
! TODO : if no Location field && no Status field -> status code = 200
! TODO?: handle Location field, either :
- local : start with '/' --> rerun the request with new uri
- client : start with '<scheme>:' --> send back status code 302
#### what cgi ?
- a basic form with "name" and "something", that return a html page with that
- a script called by a file extension in URI
-> TODO : there is no field duplicate (resolve conflicts)
-> TODO : if status field, change server status for this one
-> TODO : if no Location field && no Status field -> status code = 200
#### questions
- in client.cpp i fill the port, is there a default one in case it's not in the request ?