Commit Graph

36 Commits

Author SHA1 Message Date
0f68644064 Added full HTTP cookie support to the WEBServer, did some cleanup and refactoring around the HTTP Header Parsing algorithm to ease the cookie parser implementation 2022-10-22 19:25:20 +02:00
anschrammh
bbebac6212 Started to add support for Cookies, not fully implemented yet 2022-10-20 08:22:11 +02:00
Anatole SCHRAMM
444d1ff60c Move method declaration location 2022-10-18 14:16:15 +02:00
anschrammh
785df2ac11 Updated all the webApi functions signatures because of the callback
prototype update. Added the CORS policy : Access-Control-Allow-Origin: *
to be able to make JS ajax requets without getting rejected.
2022-10-17 23:57:25 +02:00
anschrammh
c9ead83204 Renamed the sendHTTPHeader method to sendHTTPResponse because it is clearer, this method is also not static anymore, added new methods to the WEBServer api to allow user defined http headers. 2022-10-17 23:54:17 +02:00
anschrammh
a951cdd6fc Added the WEBServerManager class to enable the initialization of the WEBServer using a config file, I might change the behaviour of this initialization when some parameters are missing, renamed the old WEBServerManager class to WEBServerManager_deprecated, now using the new WEBServerManager in the SAB object instead of the WEBServer directly, minor changes to the OTAManager, migrating the dashboard v2 layout so that every tile has the same size 2022-10-05 08:20:15 +02:00
anschrammh
6c53ee40e7 Reworked the way the servers are started 2022-10-04 08:27:21 +02:00
Anatole SCHRAMM
59be94afb9 Added and reworked a few methods in the WEBServer and FTPServer class 2022-10-03 14:15:13 +02:00
anschrammh
8e655ed8fe Added the Access-Control-Allow-Origin: * header to ease the html dashboard upudate, will have to find a better implementation 2022-09-28 23:29:51 +02:00
0687f05bc0 Removed a warning in the WEBServer.h file and added a new api endpoint to get the software version 2022-06-11 12:05:56 +02:00
007dcbdaa4 Temporarily disabled the overloaded fillDataBuffer method which introduces issues ... 2022-06-11 11:46:53 +02:00
380539e57e Reworking the way the post body content is handled, not done yet 2022-05-01 16:27:36 +02:00
Anatole SCHRAMM
720f2e9579 Removed the unused variable warning in the new WEB API endpoint, changed the way sent files are handled regarding the sent bytes count both for the FTPServer and WEBServer 2022-04-29 09:58:15 +02:00
anschrammh
966177a209 The WEB Server root directory is now copied so that the parameter doesn't have to live during the whole life of the program 2022-04-29 07:50:33 +02:00
6130e8cd71 Reworked the way the main send buffer buffer is allocated. This is not done on the stack anymore because it led to a nasty stackoverflow. Changed some debug statements, finished the sendDirectoryListing method which is now working fine. Txt files are now sent as text/plain data. 2022-04-23 22:48:26 +02:00
anschrammh
9d831f11d9 Started to add a method listing the files in a directory if the rsrc asked is a folder,like apache2 does. Not finished yet 2022-04-22 08:05:16 +02:00
ec7c608dfe Renamed the HttpParserStatus enum members for the sake of consistency, added the 414 http error : URI too long, reworked the parsing of http resource queries, removedd the use of lastIndexOf, replaced useless strstr with strchr where needed 2022-04-17 21:41:50 +02:00
anschrammh
4296eeac28 else if on new line 2022-04-15 08:55:25 +02:00
anschrammh
32e32e46d2 Now handling range bytes request :) 2022-04-07 01:20:13 +02:00
anschrammh
651d0ee060 Renamed the injectApiHeader to sendHTTPHeader and cleaned it, also did other improvements 2022-04-05 21:03:53 +02:00
460db55496 Removed as many warnings as I could ... after enabling the all warning compiler flag 2022-03-29 23:25:27 +02:00
anschrammh
4c4832e475 Updated WEBServer (same changes as FTPServer) 2020-12-19 21:14:57 +01:00
anschrammh
0ead1e5600 Changed port data type from unsigned int to uint16_t as well as removed a redundant port information 2020-12-12 11:11:35 +01:00
cea2bf8f64 Fixed merge conflicts 2020-07-17 12:29:32 +02:00
92c94c7c88 Renamed an error message 2020-07-17 12:24:55 +02:00
anschrammh
944c11477b Updated the HttpClient class and the WEBServer class 2020-07-16 22:20:23 +02:00
anschrammh
ab6260a2ac Updated the version history 2020-02-02 20:57:53 +01:00
anschrammh
af25f55089 Updated getHTTPHeader function (increased mime type size) 2019-12-28 14:09:51 +01:00
anschrammh
2cca10ec5a Removed http specific enums, which are now part of the HttpConstants class 2019-12-27 10:47:02 +01:00
1eaa1c1361 Added a new state to the state machine for consistency 2019-12-25 21:07:11 +01:00
anschrammh
e9625b909c Implemented the post data parser (only for application/x-www-form-urlencoded), replaced strcpy with memmove, put string that was in ram to flash + other optimizations 2019-11-17 19:25:36 +01:00
anschrammh
882e97dfcd Small change 2019-10-19 15:37:14 +02:00
anschrammh
b272ab0f22 Changed sdcard library driver, now using the one for the esp8266 which is mush better, also note that the WEBServerManager will be removed in a near future 2019-10-18 01:06:59 +02:00
anschrammh
d41cebfee6 Removed useless file close statement 2019-10-16 19:21:53 +02:00
anschrammh
c777e23a52 Updated TCPServer and WEBServer core logic 2019-10-13 16:43:54 +02:00
anschrammh
45b7a6245c The board is now using the new WEBServer class which can handle more than one client and is non blocking even with big files 2019-10-10 18:19:44 +02:00