Commits
- Commit:
72342dc9606a0283490a3a9283d2ed2d31888eeb
- From:
- Omar Polo <op@omarpolo.com>
- Date:
implementing CGI – NOT READY YET!
This is a first try at implementing CGI scripting. The idea is that,
if CGI is explicitly enabled by the user, when a user requires an
executable file instead of serving it to the client, that file will be
executed and its output fed to the client.
There are various pieces that are still lacking, the firsts that comes
to mind are:
- performance: the handle_cgi just loops ignoring the
WANT_POLLIN/POLLOUT and blocking if the child process hasn’t
outputted anything.
- we don’t parse query variable (yet)
- we need to set more variables in the child environment
side question: it’s better to set the variables using setenv() or
by providing an explicit environment?
- document what environment the CGI script will get
- improve the horrible unveil/pledge(cgi ? …)
but now I can serve “hello-world”-tier script from gmid!
- Commit:
2c3a40faf850ad608abf87f928a11fb4fba3057b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
added option to log to a file
- Commit:
932b001a3f330546d8719424f505b8ba671a3896
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typo
- Commit:
20f688381a6fa21c0e41a67a75423cd39b0ae56d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
doc: point out that we can handle multiple clients concurrently
- Commit:
dd080e1f755075b28ff552d3ebcf94508e3c3e66
- From:
- Omar Polo <op@omarpolo.com>
- Date:
define a MIME type for xml files
- Commit:
19f68393e61d8569b4dde266deab3787c2ba26e4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
update the changelog and tag 1.2
- Commit:
0cf902af628108c5038cd20f5958d524a812e232
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ignore SIGPIPE
bad clients can shutdown the socket and we will exit due to a SIGPIPE.
it ain’t fun.
- Commit:
9468027ba731a6ca955df8f49edd51cb4b46390a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
initial work for ipv6
make_socket can now return an ipv6 socket, and everything else still
works. ipv4 is still hardcoded tho.
- Commit:
4f6eb772cb8462438259875de405095e742b6ab3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
new release: 1.1
- Commit:
2b897a2cea08b9c78087e28f9335726e65799d4f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
added a changelog file
- Commit:
f28f9311393eb43145c15dae01a440f1d0c9064c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
switching to mmap() based file handling
- Commit:
9c56b0a78a8194849c8d3b0f3e9727407b03dda0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
style
- Commit:
10fed44c7988d70a4dc2f57e24ca92b3f72924b8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
improve make error message if etags is not found
the ‘|| true’ idiom leads to better make error. Now the ‘-’ becomes a
bit redundant tho…
- Commit:
09a1b978967c316e9c40caed8fe63a9a55565b9f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
put back the missing lseek, and change variables name
(I know, changing variables names AND introducing changes is better
done in more commits, but…)
Added back an lseek that was missing. If TLS_WANT_POLL{IN,OUT}, we
need to re-send that block, but we need also to rewind the file, in
order to read(2) that chunk again. This doesn’t solve the corruption
in transferring big files, but reduces them. I still haven’t tracked
down the corruption :/
- Commit:
cc68fe70fcb31b9acebab97ecad2c84c4c80fc02
- From:
- Omar Polo <op@omarpolo.com>
- Date:
added support for mime types (by looking at file extension)
At the moment there is an hardcoded table that maps mime types to
extensions. For the time being this can be OK, as I don’t even
currently serve all those types of file, but in the future I’d like to
let user pass a file with the mapping, like /usr/share/misc/mime.types
on OpenBSD, to map. However, even in this case, we should hardcode
text/gemini IMHO, since most mime.types listing doesn’t have it yet.