Commit Graph

39 Commits

Author SHA1 Message Date
LuckyLaszlo
ce0a004d28 Le merge / 20 2022-08-14 06:30:27 +02:00
LuckyLaszlo
84babec82b added multipart upload file,
it works, but need some adjustements,
refactoring and testing
2022-08-14 06:25:06 +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
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
a1fff0f8c2 added colors, for print_special
+ renamed client's public function parse_request() into parse_request_headers()
2022-08-11 17:46:27 +02:00
hugogogo
ad2b5a629a correct extract_line to avoid duplicate with erase or substr, and to resolve pbm of returning trailing delim 2022-08-11 17:33:42 +02:00
hugogogo
ff77dfd298 debug new request parsing 2022-08-11 14:50:56 +02:00
Me
c32fc2c8a2 I really hope this is the last time we fix Location Picker, i think it's good it's pretty elegant, basically set root and location path to never have / at end and that made things easier 2022-08-11 02:01:24 +02:00
hugogogo
1d67e6988d http message parsin wip but really better 2022-08-11 00:28:01 +02:00
hugogogo
11f71ea74f wip parsing first line http message with new utils functions 2022-08-10 20:27:48 +02:00
hugogogo
9a379c835d correction of trim in case of str only fill with delim char
+ added a new split, that also does trim, to split without counting newlines
2022-08-10 20:01:23 +02:00
hugogogo
c7905ebd19 changed del_line_in_str to etract_line 2022-08-10 17:12:28 +02:00
hugogogo
482a38952e Merge branch 'hugo2'
+ changed the appropriate getters for client
+ moved the functions to parse the http message
  (first line, headers, and body)
  outside client, in parsing_http_message.cpp
+ resolved some of the throw problems
2022-08-09 15:54:40 +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
LuckyLaszlo
643b09c4f7 _request() and _response() refactoring
+ Wip redirection (weird behavior)
+ 505 HTTP Version Not Supported
2022-08-09 01:46:59 +02:00
Me
0a72778c8c successful merge? 2022-08-08 15:25:16 +02:00
LuckyLaszlo
02cfdf43bc bad_alloc handling
+ map.insert() replace map.operator[] for init, more efficient
2022-08-08 04:24:03 +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
Me
4870b2c05d Location sorter works, fixed the compilation error i was having on this branch, now working on autoindex 2022-08-07 03:24:49 +02:00
Me
4b1baca126 merged, seems fine 2022-08-07 01:10:05 +02:00
LuckyLaszlo
05c7faf1f3 server search for client completed with host:port 2022-08-06 04:46:40 +02:00
LuckyLaszlo
79bdc1ecbf ALL_METHODS renamed to ANY_METHODS 2022-08-05 23:01:06 +02:00
Me
6f0c3b4d6d kinda successful merge, weird tho, didn't go as smoothly with VScode as usual... 2022-08-05 22:25:11 +02:00
Me
f7dc5ccde4 ok Location sorting and processing is finally working as expected, still a few things to add like error_pages but will get there soon 2022-08-05 21:46:46 +02:00
LuckyLaszlo
a9ada4cb28 CRLF macro 2022-08-04 14:45:16 +02:00
LuckyLaszlo
0026106bf6 default and custom error pages response
+ refactoring in response.cpp (functions split)
+ added Client::clear()
+ added replace_all_substr() in utils.cpp
2022-08-04 02:52:31 +02:00
Me
3d46505411 well, restructured things a bit, but mostly started trying to sort LocationConfigs, it is sort of going well, good ideas, implementations is still a bit lacking... 2022-08-04 01:09:40 +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
LuckyLaszlo
8f167d85f3 wip integration of client.request and ServerConfig
+ Client get return reference
+ wip binary flags for http_method
+ moved config parser files
2022-08-02 21:11:54 +02:00
LuckyLaszlo
5aabeb6b46 removed useless files
+ MethodType renamed to http_method, and moved to utils.hpp
+ operator= overload for Client moved to Client.cpp
2022-08-02 14:26:07 +02:00
hugogogo
f252887d53 merge from hugo, add parsing requests and wip cgi 2022-08-01 20:41:07 +02:00
Me
19f7493aac Fixed the includes 2022-07-31 16:53:22 +02:00
Me
d4a001e8ba resolved merge conflicts, now ConfigParser is even more intertwined with other parts 2022-07-31 16:30:14 +02:00
hugogogo
537572e2d0 changed itoa to c++ style and put it in utils, and change utils dependencies to not depend on webserv 2022-07-31 13:19:22 +02:00
Me
0cb49ffa5e started adding more checks to the parser, some things settled, but mostly i have a lot more questions... 2022-07-31 04:20:04 +02:00
Me
665623c7ee well i think i have the Config Parser working and pretty clean, there might be a few tweaks here and there but looks good, now to integrate it with Webserv 2022-07-30 21:08:21 +02:00