| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Translate whitespace to '+' in append_form | Xavier Del Campo Romero | 2023-03-09 | 1 | -11/+8 |
| | | | | | Otherwise, every function calling get_forms must implement this. | ||||
| * | main.c: Always append trailing slash to directories | Xavier Del Campo Romero | 2023-03-08 | 1 | -38/+8 |
| | | | | | | | Otherwise, slcl would fail to generate the URLs for the elements inside a directory, because of how cust_dirname worked, which also turned out to be redundant. | ||||
| * | Call page_forbidden on invalid auth | Xavier Del Campo Romero | 2023-03-08 | 1 | -18/+1 |
| | | |||||
| * | Remove(3) f->tmpname from ctx_free | Xavier Del Campo Romero | 2023-03-08 | 1 | -5/+0 |
| | | | | | | | Until now, f->tmpname was removed by move_file when the move operation succeeded. However, since a HTTP operation can fail before move_file is called, the temporary file must also be removed. | ||||
| * | main.c: Avoid leaking forms | Xavier Del Campo Romero | 2023-03-08 | 1 | -27/+39 |
| | | |||||
| * | main.c: Print error message only on errno != EEXIST | Xavier Del Campo Romero | 2023-03-08 | 1 | -2/+3 |
| | | |||||
| * | main.c: Replace + with whitespace for directories | Xavier Del Campo Romero | 2023-03-07 | 1 | -3/+5 |
| | | |||||
| * | main.c: Fix memory leak if append_form fails | Xavier Del Campo Romero | 2023-03-07 | 1 | -1/+7 |
| | | |||||
| * | main.c: Simplify code a bit | Xavier Del Campo Romero | 2023-03-07 | 1 | -8/+3 |
| | | |||||
| * | Perform some minor optimizations | Xavier Del Campo Romero | 2023-03-06 | 1 | -1/+1 |
| | | |||||
| * | Implement user quota | Xavier Del Campo Romero | 2023-03-06 | 1 | -3/+111 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature allows admins to set a specific quota for each user, in MiB. This feature is particularly useful for shared instances, where unlimited user storage might be unfeasible or even dangerous for the server. Also, a nice HTML5 <progress> element has been added to the site that shows how much of the quota has been consumed. If no quota is set, slcl falls back to the default behaviour i.e., assume unlimited storage. Limitations: - While HTTP does specify a Content-Length, which determines the length of the whole request, it does not specify how many files are involved or their individual sizes. - Because of this, if multiple files are uploaded simultaneously, the whole request would be dropped if user quota is exceeded, even if not all files exceeded it. - Also, Content-Length adds the length of some HTTP boilerplate (e.g.: boundaries), but slcl must rely on this before accepting the whole request. In other words, this means some requests might be rejected by slcl because of the extra bytes caused by such boilerplate. - When the quota is exceeded, slcl must close the connection so that the rest of the transfer is cancelled. Unfortunately, this means no HTML can be sent back to the customer to inform about the situation. | ||||
| * | main.c: Simplify failed login response | Xavier Del Campo Romero | 2023-03-06 | 1 | -16/+3 |
| | | | | | | - Location seems to have no effect on 401 HTTP responses. - Content-Type is already set by page_failed_login. | ||||
| * | Initial commit | Xavier Del Campo Romero | 2023-02-28 | 1 | -0/+935 |
