Commit Graph

21 Commits

Author SHA1 Message Date
Eric LAZO
b45ed52a2a pulling more 2022-08-17 16:18:37 +02:00
Eric LAZO
21efbef86a better telnet tester, merging 2022-08-14 21:41:46 +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
LuckyLaszlo
b0949615c8 fixed mistake in _read_request()
+ changes to some log output
2022-08-13 19:17:32 +02:00
Me
a69273b88e fixed an autoindex issue, working on uploading files 2022-08-12 23:45:13 +02:00
Eric LAZO
4d395088d0 trying to get submit form to work... 2022-08-12 20:08:49 +02:00
LuckyLaszlo
c7bbf29a1b NPOS macro 2022-08-12 18:16:49 +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
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
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
LuckyLaszlo
ab0bc2c4c0 added timeout response (status 408)
+ added EPOLLERR and EPOLLHUP handling
+ fix root substitution for default "/" location (temp or permanent ?)
+ tested siege a little, seems good
2022-08-11 07:12:13 +02:00
LuckyLaszlo
86f7740984 Moved most request errors check in Client
+ bugfix of "Bad file descriptor" due to empty operator=() in Client
+ added a condition in _determine_location_COOP_FIX()
+ udpate memo.txt
+ need fix for index/autoindex (location "/list" dont work)
2022-08-10 07:19:05 +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
LuckyLaszlo
643b09c4f7 _request() and _response() refactoring
+ Wip redirection (weird behavior)
+ 505 HTTP Version Not Supported
2022-08-09 01:46:59 +02:00
LuckyLaszlo
02cfdf43bc bad_alloc handling
+ map.insert() replace map.operator[] for init, more efficient
2022-08-08 04:24:03 +02:00
LuckyLaszlo
1ccf61bc68 assign server and location to client in _read_request() 2022-08-07 17:37:24 +02:00
LuckyLaszlo
4ab099ee4d redone _read_request(). Should work with any BUFSIZE.
+ WIP in some aspects. Need to adjust parse_request() among others things.
+ update memo.txt
2022-08-07 05:41:01 +02:00
hugogogo
63ff42b57d client variables are made const 2022-08-06 19:58:09 +02:00
hugogogo
f252887d53 merge from hugo, add parsing requests and wip cgi 2022-08-01 20:41:07 +02:00
LuckyLaszlo
ea3f3a390a bugfix invalid ptr in "ev.data.ptr" after vector<Client> resize/erase
+ persistent connections reintroduced
+ bugfix crash if invalid path in request
2022-07-31 13:19:11 +02:00
LuckyLaszlo
36868afa30 splitted Webserv.cpp 2022-07-29 17:16:26 +02:00