lperrey
f8c6923c6d
fixed CGI alloc
...
+ handle unknow status from script
2022-08-16 01:46:24 +02:00
lperrey
48af92b3bc
fixed _error_html_response()
...
+ renamed eval_file_mode() in eval_file_access()
+ memo update
2022-08-15 22:12:55 +02:00
Hugo LAMY
c05536ca01
hugo merge and clean some debug messages
2022-08-15 21:21:40 +02:00
hugogogo
1c13e254d5
basic cgi script test working
2022-08-15 18:26:41 +02:00
Hugo LAMY
9ac84f706d
fix error in check scrip output length
2022-08-15 02:07:06 +02:00
Hugo LAMY
b9d4317f51
in _is_cgi, fix error in return http error status
...
+ fix error in checking script output : reverse order between calcul of content_length and erasing empty line
2022-08-15 01:52:36 +02:00
Hugo LAMY
f6f63931ad
litle fix in utils trim
...
+ added 2 functions to check script output
+ created a html page with 4 forms for tests
+ created 2 cpp forms, with and without creating header content-length
2022-08-15 00:24:08 +02:00
Hugo LAMY
d663a4c7e6
added debug print
2022-08-14 16:17:24 +02:00
Hugo LAMY
be499328f6
fixed error in is_cgi, path was missing dot
2022-08-14 01:17:55 +02:00
Hugo LAMY
db4c7468cc
is_cgi function is back and is working
...
+ in utils added function eval_file_mode(), it returns http errors codes about file
2022-08-14 01:05:20 +02:00
hugogogo
285f2d049f
+ 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
2022-08-13 14:38:50 +02:00
hugogogo
defb2ada61
fixed pbm in extract_line : delete the line and the newline sequence character
...
+ fixed pbm n _cgi_pos : last return is npos, not pos
2022-08-13 12:39:05 +02:00
hugogogo
f17bc9fa58
wip test path cgi :
...
- _cgi_pos seems to be ok
- construct url from return is not implemented yet
+ renamed script with extension .php and .cpp
2022-08-12 23:31:59 +02:00
LuckyLaszlo
c7bbf29a1b
NPOS macro
2022-08-12 18:16:49 +02:00
LuckyLaszlo
b44acafefe
CGI discussion and a little bit of work done
2022-08-12 18:08:39 +02:00
hugogogo
2a70c6b26d
Merge branch 'hugo3'
...
+ script output verification works (field duplicate and status)
+ parsing_message_http :
- the file is deleted
- of the three functions it contained, only one still exist
- 'parse_http_headers' is now in utils
+ changes in utils :
- http headers parsing doesn't change key case itself
- a new function change key case tolower case in map<str, str>
- added split_trim() that perform a split and a trim at once
- resolved pbm in trim
- added print_special to print special char '\r' and '\n'
- del_line became extract_line, because it returns the deleted line
- added get line, that does the same without deleting
- moved http_header in utils, and made it more consistent
+ in Client :
- parse_request is now named parse_request_headers to work with parse body
- private function _parse_request_headers is then now _parse_request_fields
(because it doesn't take care of request first line, but only fields)
- added a debug function 'print_client'
2022-08-12 14:05:11 +02:00
hugogogo
de09c2357c
php newline pbm resolved
2022-08-12 12:00:20 +02:00
hugogogo
c225063361
script output fields is checked for duplicate
2022-08-12 11:45:06 +02:00
LuckyLaszlo
400efbe720
Wip chunked decoding
...
+ Need to test normal body parsing
+ path_is_valid() renamed eval_file_type()
+ replaced atoi with strtol/strtoul
2022-08-12 05:50:00 +02:00
hugogogo
3a58b5d921
wip debug comparison fields output script
2022-08-11 19:42:09 +02:00
hugogogo
ff77dfd298
debug new request parsing
2022-08-11 14:50:56 +02:00
hugogogo
1d67e6988d
http message parsin wip but really better
2022-08-11 00:28:01 +02:00
hugogogo
c7905ebd19
changed del_line_in_str to etract_line
2022-08-10 17:12:28 +02:00
hugogogo
17230ccc42
in cgi exec add save stdin and out
2022-08-10 16:24:24 +02:00
hugogogo
53a548e314
wip script output verification working
...
+ trim secure pos segfault
+ concat script message with server message
2022-08-09 14:57:05 +02:00
hugogogo
3dad938e3c
add extern function for http message parsing
...
+ wip compare fields server and script
+ g tout cassey
2022-08-09 11:19:46 +02:00
hugogogo
e1a68bc3e4
changes var in client
2022-08-08 18:06:41 +02:00
hugogogo
972f52ebc8
client variables are const ref
2022-08-08 15:36:16 +02:00
hugogogo
da1f4b6e37
cgi exec compare with file method
2022-08-08 13:20:06 +02:00
hugogogo
63365a9067
cgi_script read and write on a string
2022-08-07 22:33:39 +02:00
hugogogo
7ecfc22c7b
script path is found and fill
2022-08-07 15:51:36 +02:00
hugogogo
e0fd743b5b
key fields headers in map are in lowercase
...
+ getters for this map are case insensitive
+ change request fiel 'path' for 'uri', 'query', and 'abs_path'
2022-08-07 13:07:50 +02:00
hugogogo
63ff42b57d
client variables are made const
2022-08-06 19:58:09 +02:00
hugogogo
6f171ec07b
wip cgi env variables
2022-08-06 11:34:48 +02:00
LuckyLaszlo
6f5b28dd93
wip, need somes changes in ConfigParser.
...
+ _determine_location()
+ http_method changes
+ http_method switch in _construct_response()
+ ConfigParser::_str_to_method_type() moved to global utils.cpp
2022-08-03 18:39:22 +02:00
hugogogo
f252887d53
merge from hugo, add parsing requests and wip cgi
2022-08-01 20:41:07 +02:00