171 Commits

Author SHA1 Message Date
lovasoa 49f997d7e1 mssql: fix infinite recursion in parameter replacement, add tests, remove some duplication 2023-07-30 22:52:51 +02:00
lovasoa f76c9dd071 fix param binding for mssql 2023-07-30 13:06:23 +02:00
lovasoa d69ec081bc add experimental support for Microsoft SQL Server 2023-07-30 10:32:22 +02:00
lovasoa a9b41ad5f7 avoid folder redirects for .SQL files (in capital letters) 2023-07-26 22:58:19 +02:00
lovasoa 18cdb6326b fix infinite error stream issue
It was possible for an SQL error to trigger an infinite loop where SQLPage would stream error messages to the browsers forever
2023-07-26 18:32:04 +02:00
lovasoa d6e538e343 Redirect index pages without a trailing slash to the same page with the trailing slash. 2023-07-25 17:48:35 +02:00
lovasoa 2ca311d18a avoid taking a db connection fromthe pool before it is necessary 2023-07-25 16:21:13 +02:00
lovasoa c5f9c91058 avoid database roundtrips for simple static select statements 2023-07-25 15:48:20 +02:00
lovasoa 9e433cab05 add support for building JSON APIs in SQLPage 2023-07-22 15:08:08 +02:00
lovasoa 524d4a10dc Fix error displayed in logs on redirects
Now we don't open a body context when it won't be needed
(when there is nothing to add to the body of the page)

Fixes error messages in logs when a request had no body (redirects, for
instance)
2023-07-18 14:42:26 +02:00
lovasoa ba3188ceef cargo fmt 2023-07-17 02:41:52 +02:00
lovasoa fdb5107517 simplify 404 error testing 2023-07-17 02:35:13 +02:00
lovasoa c131a95ff8 remove usage of is_some_and to allow compilation with old rust versions 2023-07-17 02:26:22 +02:00
lovasoa 0061d1302b small code reorganization
make functions available in a separate module
2023-07-16 21:24:47 +02:00
lovasoa 7cbe89aeb7 custom background colors in tables
Closes #25
2023-07-15 19:41:41 +02:00
lovasoa 634c47aec3 avoid repeatedly acquiring and releasing connections when running a single SQL file
... and return better errors when we are getting too many requests
2023-07-15 01:09:02 +02:00
lovasoa 9f6c087ed7 remove unnecessary error handling 2023-07-11 21:04:53 +02:00
lovasoa 404994fc90 change default configuration loading order 2023-07-11 19:07:00 +02:00
lovasoa a06efd6df7 improve 404 errors
Return proper 404 errors when a page is not found
2023-07-11 08:55:06 +02:00
lovasoa 08832bb52f cargo fmt 2023-07-10 23:53:56 +02:00
lovasoa 6dbe4651ba better error message on invalid function call 2023-07-10 21:59:23 +02:00
lovasoa 3e1ff28a52 new builtin function sqlpage.random_string 2023-07-10 20:45:16 +02:00
lovasoa f09f828ccf implement the new hash_password function 2023-07-10 03:31:06 +02:00
lovasoa a3c7a0422d better logging 2023-07-10 02:44:25 +02:00
lovasoa afac7ba01a document new functions 2023-07-10 02:40:14 +02:00
lovasoa 784244753f improve authorization flow, http basic auth, and error handling 2023-07-10 02:17:43 +02:00
lovasoa dac7482fa3 Start work on functions "sqlpage.basic_auth_user" and "sqlpage.basic_auth_password" 2023-07-10 00:23:58 +02:00
lovasoa c1edb9a6d6 add a new "sqlpage.header" function and improve error handling in functions 2023-07-09 22:56:35 +02:00
lovasoa 5bdf98cdd6 add a new "readirect" head component, which redirects the user and then stops the execution (contrarily to the existing "http_header" component) 2023-07-09 22:55:21 +02:00
lovasoa 81feb04d15 fix invalid mime types 2023-07-09 11:18:25 +02:00
lovasoa 6dcecb5501 fix handling of cookies that contain special characters 2023-07-07 03:47:07 +02:00
lovasoa b2a14aa6a0 better error handling 2023-07-07 03:33:34 +02:00
lovasoa da1d703eae new "footer" component for pages 2023-07-03 01:52:00 +02:00
lovasoa 4e45ce9ed6 fix compilation of serverless runtime 2023-07-03 00:50:20 +02:00
lovasoa a1b03f6d6a fix aws compilation 2023-07-03 00:31:53 +02:00
lovasoa f8b13dd3ca add support for cookies
docker / docker (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, macos-latest) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, ubuntu-20.04) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage.exe, windows-latest) (push) Has been cancelled
Create Release / Create Release (push) Has been cancelled
2023-06-21 02:32:47 +02:00
lovasoa de948fb46f add support for reading http cookies using the new sqlpage.cookie('cookie_name') function 2023-06-21 01:24:13 +02:00
lovasoa 6277f1a137 remove duplicated code and implement etag caching for static resources 2023-06-14 00:19:00 +02:00
lovasoa a14a2bbc54 Add support for markdown in tables
docker / docker (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, macos-latest) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, ubuntu-20.04) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage.exe, windows-latest) (push) Has been cancelled
Create Release / Create Release (push) Has been cancelled
Closes https://github.com/lovasoa/SQLpage/issues/4
See https://github.com/lovasoa/SQLpage/discussions/11
2023-06-12 00:35:59 +02:00
lovasoa 7ea9457c6f add support for <select> as a form input
docker / docker (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, macos-latest) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, ubuntu-20.04) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage.exe, windows-latest) (push) Has been cancelled
Create Release / Create Release (push) Has been cancelled
Closes https://github.com/lovasoa/SQLpage/issues/5
2023-06-11 02:10:48 +02:00
lovasoa af4225e6b9 add support for header-only responses 2023-06-11 01:26:04 +02:00
lovasoa f91f0d57c3 fix rendering of components without a shell
Create Release / build (target/superoptimized/sqlpage, macos-latest) (push) Has been cancelled
docker / docker (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, ubuntu-20.04) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage.exe, windows-latest) (push) Has been cancelled
Create Release / Create Release (push) Has been cancelled
Pages where the first component was not "shell" were broken
2023-06-07 03:03:51 +02:00
lovasoa 48e2a91d8b fmt
docker / docker (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, macos-latest) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage, ubuntu-20.04) (push) Has been cancelled
Create Release / build (target/superoptimized/sqlpage.exe, windows-latest) (push) Has been cancelled
Create Release / Create Release (push) Has been cancelled
2023-06-07 02:29:30 +02:00
lovasoa 2e21f1eb19 clippy 2023-06-07 02:27:03 +02:00
lovasoa 65b0271613 v0.6.7 : add support for markdown 2023-06-07 02:25:56 +02:00
lovasoa 53ad6c60a4 fmt 2023-06-04 15:28:23 +02:00
lovasoa 80e1de5f6d clippy fixes 2023-06-04 12:49:46 +02:00
lovasoa 750132b74a fix handling of spaces and special characters in file names 2023-06-04 12:46:11 +02:00
lovasoa 261f434bf4 fix large integers truncated in sqlite 2023-06-04 01:08:39 +02:00
lovasoa 0cb79962c6 handle non-200 status codes 2023-06-04 00:38:57 +02:00