aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libweb: Bump new signature for http_decode_urldecode-urlXavier Del Campo Romero2023-11-122-15/+30
| | | | | | The new signature allows callers to distinguish decoding errors from fatal errors. This is important for slcl to avoid crashing when ill-formed data is received from a client.
* README.md: Remove wrong comment about /tmpv0.1.0-rc4v0.1.0Xavier Del Campo Romero2023-10-251-3/+1
| | | | | /tmp is at least defined by POSIX.1-2017 at section 10 (Directory Structure and Devices).
* Bump libweb to v0.1.0-rc6Xavier Del Campo Romero2023-10-251-0/+0
|
* CMakeLists.txt: set project VERSIONXavier Del Campo Romero2023-10-251-1/+1
|
* Bump libweb to v0.1.0-rc5Xavier Del Campo Romero2023-10-251-0/+0
|
* Replace handwritten Makefile with configure scriptXavier Del Campo Romero2023-10-254-52/+172
|
* CMake: Find system libweb or dynstr if availableXavier Del Campo Romero2023-10-252-1/+35
| | | | | So far, slcl's build system would always build libweb and dynstr. However, this is discouraged by distribution packagers.
* usergen: Call mkdir(1) before database swapXavier Del Campo Romero2023-10-191-1/+1
| | | | No changes must be committed to the database if mkdir(1) fails.
* usergen: Replace use of non-standard mktemp(1)Xavier Del Campo Romero2023-10-191-1/+8
| | | | | | Despite common use in several POSIX operating systems, mktemp(1) is not defined by POSIX.1-2008, nor even POSIX.1-2017. As long as it is not introduced, m4(1)'s mkstemp can be used with similar effect.
* main.c: Use BUFSIZ instead of arbitrary valueXavier Del Campo Romero2023-10-191-1/+1
| | | | | | | | | | According to C99 7.19.1p3: BUFSIZ is a macro that expands to an integer constant expression that is the size of the buffer used by the setbuf function. In other words, this means BUFSIZ is the most optimal length for a buffer that reads a file into memory in chunks using fread(3).
* CMakeLists.txt: Fix wrong library nameXavier Del Campo Romero2023-10-141-1/+1
|
* auth.c: Fix potential signed integer overflowXavier Del Campo Romero2023-10-141-2/+2
| | | | | | | | For platforms where int is a 16-bit data type, this operation might overflow and possibly cause either unexpected behaviour and/or a compiler warning. Therefore, it is safer to promote each integer constant accordingly.
* Implement HEAD supportXavier Del Campo Romero2023-10-143-0/+90
|
* List number of files and directoriesv0.1.0-rc3Xavier Del Campo Romero2023-10-111-23/+82
| | | | | Sometimes, users want to know how many files and/or directories reside on a directory. Now, slcl prints such information below the logout form.
* page.c: Force whitespace renderingXavier Del Campo Romero2023-10-111-1/+1
|
* Apply slweb renaming to libwebXavier Del Campo Romero2023-10-1111-27/+27
|
* Bump slwebv0.1.0-rc2Xavier Del Campo Romero2023-10-021-0/+0
|
* Bump slweb to v0.1.0-rc1v0.1.0-rc1Xavier Del Campo Romero2023-09-271-0/+0
|
* man1: Replace LICENSE/AUTHORS with COPYRIGHTXavier Del Campo Romero2023-09-272-10/+14
| | | | | LICENSE is not copied to the installation prefix, so adding a short copyright notice instead might be a better reference.
* CMakeLists.txt: Install targetsXavier Del Campo Romero2023-09-272-0/+12
|
* Makefile: add install targetXavier Del Campo Romero2023-09-273-0/+33
|
* slcl.1: Remove obsolete TODOXavier Del Campo Romero2023-09-271-3/+0
| | | | | | | | | | This feature was already implemented by: commit 0822a982ef3b085dc109ec373ff537974503eb04 Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com> Date: Sat Jul 8 00:54:59 2023 +0200 Implement file/directory removal
* main.c: Refactor calls to handler_addXavier Del Campo Romero2023-09-161-13/+39
|
* usergen: Remove dependency against sha256sum(1)Xavier Del Campo Romero2023-09-161-1/+1
| | | | | | sha256sum(1) is a GNU utility that might not be available under some POSIX systems. Since OpenSSL is already a dependency, it makes sense to reuse it to generate SHA256 digests.
* usergen: Remove dependency against xxd(1)Xavier Del Campo Romero2023-09-162-6/+15
| | | | | xxd(1) is closely related to vim(1), might not be available under some POSIX systems.
* usergen: Reject non-numeric, invalid quotaXavier Del Campo Romero2023-09-161-0/+1
|
* Reduce minimum required major version for OpenSSLXavier Del Campo Romero2023-09-162-2/+2
| | | | | slcl has been successfully tested with OpenSSL 2.0 on an OpenBSD 7.3 host.
* auth.c: Add missing includeXavier Del Campo Romero2023-09-151-0/+1
| | | | | As opposed to other integer constants such as ULLONG_MAX, SIZE_MAX is defined by stdint.h, not limits.h.
* main.c: Remove string duplication in get_formsXavier Del Campo Romero2023-09-092-11/+2
| | | | | | | slweb now assumes application/x-www-form-urlencoded-data as text, so it now returns a null-terminated string on struct http_post member "data". This removes the need for slcl to call strdup(3) in order to obtain a null-terminated string.
* Check directory on uploadsXavier Del Campo Romero2023-09-092-3/+16
| | | | | | | | | For historical reasons, slweb used to check for a name called "dir" on multipart/form-data POST requests. However, stricly speaking this is application logic, so it has been now moved from slweb to slcl. This has resulted in a couple of breaking changes in slweb that had to be updated on slcl.
* page.c: Update project URLXavier Del Campo Romero2023-09-091-1/+1
|
* main.c: Return 1 on null bufferXavier Del Campo Romero2023-09-091-0/+1
| | | | | Malformed POST requests might include no payload data. However, this is not considered a fatal error, but wrong user input.
* Bump slwebXavier Del Campo Romero2023-09-071-0/+0
| | | | Last commits introduced several minor bugfixes and improvements.
* Add screenshotsXavier Del Campo Romero2023-08-083-0/+6
|
* Bump slwebXavier Del Campo Romero2023-08-081-0/+0
| | | | | | | | | d55b84f68b90fe5c2521724d0c22ebf22e62b0b4 introduces a bugfix: Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com> Date: Tue Aug 8 00:32:21 2023 +0200 html.c: Fix wrong encoding for '>' and '<'
* Bump slwebXavier Del Campo Romero2023-08-021-0/+0
|
* CMakeLists.txt: Set project language to CXavier Del Campo Romero2023-08-021-1/+1
| | | | | Otherwise, CMake by default tests the system C++ compiler, but this is not a requirement for slcl.
* Makefile: run the clean target recursivelyXavier Del Campo Romero2023-08-011-0/+2
|
* Bump slwebXavier Del Campo Romero2023-08-011-0/+0
|
* Makefile: Add FORCE targetXavier Del Campo Romero2023-08-011-2/+4
| | | | | | When added to targets $(DYNSTR) and $(SLWEB), this would force running the recursive Makefiles, which might then (or might not) rebuild targets.
* Do some minor rebrandingXavier Del Campo Romero2023-08-013-12/+13
| | | | | | Despite designed around portability and minimalism, I feel slcl no longer aligns with the philosophical views from the suckless project. Therefore, I think it was appropriate to unlink its branding from it.
* README.md: Inform about -t command line optionXavier Del Campo Romero2023-07-301-0/+21
|
* Move slweb to new URLXavier Del Campo Romero2023-07-283-5/+5
|
* README.md: Add references to slwebXavier Del Campo Romero2023-07-211-1/+4
| | | | | | slweb is the HTTP/1.1 server implementation and utilities that slcl originally implemented, which have now been split into a separate repository.
* Remove dynstr as a submoduleXavier Del Campo Romero2023-07-212-3/+0
| | | | It is now provided by slweb instead.
* Adapt to slweb's include pathsXavier Del Campo Romero2023-07-215-8/+8
| | | | | slweb puts its header files into its own directory in order to avoid potential name clashing.
* Adapt build system to slwebXavier Del Campo Romero2023-07-212-19/+15
| | | | | Now, slweb is a library slcl depends on, which includes the HTTP/1.1 server implementation, as well as other utilities.
* Remove files now provided by slwebXavier Del Campo Romero2023-07-218-3113/+0
|
* Import slwebXavier Del Campo Romero2023-07-212-0/+3
| | | | | | | slweb contains the HTTP/1.1 server implementation and surrounding utilities that are used by slcl. The motivation behind this was to allow these components to be used by other projects, as well as effectively making slcl smaller and more modular.
* Makefile: Allow users to define LDFLAGSXavier Del Campo Romero2023-07-161-2/+1
| | | | | This should allow for easier packaging if extra linker flags are required.