Commit Graph

66 Commits

Author SHA1 Message Date
f09ab537e0 Clang-format everything. 2024-04-21 15:27:36 +02:00
b3a5b516f7 Proper docs for WebServerSimple. 2024-03-10 10:24:16 +01:00
6f81a15fc0 Various doc fixes. 2024-03-10 10:10:02 +01:00
aaf744aad0 Improve multipart filename handling a bit. 2024-03-10 09:32:01 +01:00
75e8f68a24 Use String::length(), even though in this case size() works too. 2024-03-10 09:16:43 +01:00
27d97cf766 Added optional force parameter to WebServerRequest::move_file(). Also various fixes and improvements to the new upload temp file system. 2024-03-10 09:07:13 +01:00
b96205f05f Use the sotred path when cleanin up temp files. 2024-03-10 07:07:38 +01:00
2f950e87d6 Only count request size when not writing to a file. 2024-03-10 07:05:25 +01:00
a993a5460c Make sure temp files directory exists when starting WebServerSimple. 2024-03-10 07:01:05 +01:00
f86c6440fb - Now WebServerSimple can also use temporary files for uploads.
- Added move_file() and is_file_moved()  helper methods to WebServerRequest.
- get_file_length() in WebServerRequest now returns uint64_t.
- Removed parse_files() from WebServerRequest. It's doesn't work well with how the http protocol works.
2024-03-09 23:39:33 +01:00
a6eb8377a6 Use String's length() instead of size(). 2024-02-26 11:33:06 +01:00
0edc5438dd Re-extracted class docs. 2024-02-25 10:26:26 +01:00
b8c81b5449 Small tweaks to HTTPServerSimple, mostly related to ssl handling. 2024-02-16 23:06:39 +01:00
978e49a289 Implemented range requests for the HTTPServerSimple. It does work in fiefox, however wget seems to choke on it. This will be fixed later. 2023-12-22 15:37:04 +01:00
a781853b2b Added a way to get all available marameter keys to WebServerRequest. 2023-12-22 13:14:17 +01:00
e5719c991b Store incoming http request parameters properly. 2023-12-22 13:02:17 +01:00
df2859b9d0 Added a way to unregister connections and get out their raw connection data from the http server. 2023-12-22 12:38:38 +01:00
ae854d4e55 File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
3afe20bdc7 More old copyright header cleanups. 2023-12-17 23:24:10 +01:00
93a2081a58 Re-extracted class docs. 2023-10-12 01:59:32 +02:00
56ae9e3734 Fix typos. 2023-09-22 16:21:37 +02:00
4874f08d9d Don't start the server on ready in the editor. 2023-08-30 15:16:52 +02:00
65d4c57233 Added translate_to() method to TranslationServer, and trt() method to Object. This let's you transalte strings into specific (noon app wide) locales. 2023-08-29 22:02:31 +02:00
bc21dc55a7 Add back markdown as a mime type to WebServerSimple as it got deleted accidentally. 2023-08-28 18:14:14 +02:00
8f352b745a Added start_on_ready property to WebServerSimple. 2023-08-28 18:03:30 +02:00
d9512f8d40 Changed the default bind host in WebServerSimple to 0.0.0.0 for convenience. 2023-08-28 17:56:37 +02:00
045ff319ce Make sure donwloads don't just eat up a thread until they are finished even if the kernel can just take all the data in HTTPServerSimple. Also update the timeout timer when there is activity in a socket. 2023-08-28 17:16:19 +02:00
ea5cddc44f The mime types dictionary now uses StringName indexes. Also compare against lowercase extensions. 2023-08-28 13:38:44 +02:00
db14d66556 Added more mime types by default. 2023-08-28 13:14:50 +02:00
d8fb0c9cef De default mime type is application/octet-stream now for files in HTTPServerConnection. 2023-08-28 12:56:18 +02:00
715737abfe Now HTTPServerSimple sends files in non-blocking mode. 2023-08-28 12:54:30 +02:00
151c30a931 Send the user's header when sending the file in HTTPServerConnection. 2023-08-28 09:15:08 +02:00
8ed3b41865 Re-extracted class docs. 2023-08-26 22:41:21 +02:00
b68bbd3bfb Implemented custom response headers for WebServerRequest. 2023-07-08 21:11:56 +02:00
a7f1f3356c Re-extracted class docs pt2. 2023-06-13 16:51:37 +02:00
71c00ae64f Fix string parameter parsing in multipart forms, also make multipart form content fields case independent. 2023-04-16 23:30:13 +02:00
a76df86ef3 Parse and process http headers in a case insensitive manner in HTTPParser. 2023-03-22 21:31:57 +01:00
517a5b9044 Added more mimetypes to the HTTPServerSimple. 2023-03-22 14:00:18 +01:00
1cb112f64c Properly handle non-ascii characters in uris in HTTPParser. 2023-03-22 13:59:58 +01:00
3fccbc6d23 Now post and get parameters can be set / changed in requests from scripts aswell. 2023-03-22 13:20:25 +01:00
5e17f2041d Use the new helper method in HTTPServerConnection::send(). 2023-03-20 22:34:43 +01:00
c6ef898c46 Fix Content-Length calculation in HTTPServerConnection::send when using non-ascii utf-8 characters. 2023-03-20 21:50:40 +01:00
a155e44491 Implement max request size limit for HTTPServerSimple. 2023-03-18 11:52:25 +01:00
ddcf36addd Fixed multi threading + https in HTTPServerSimple. 2023-02-19 16:04:08 +01:00
e5f31bde7d Implement sending keep alive connection type if a connection has more than one request for HTTPServerSimple. Also more togglable debugging. 2023-02-19 15:11:29 +01:00
0e651dd4fd Pre-create the required folders for the self signed cert files automatically. 2023-02-19 11:53:14 +01:00
ab9ae594c2 Set a better self signed cert path for the HTTPServerSimple. 2023-02-19 11:42:37 +01:00
4551061c17 Set _server_quit in WebServerSimple the way it was intended to be used. 2023-02-19 11:41:43 +01:00
4ededb6a34 Added optional protocol error logging to HTTPParser. Also remove unnecessary error. 2023-02-19 11:20:13 +01:00
8b4fc877a0 Added protocol error handling to the http server simple. 2023-02-19 10:34:39 +01:00