Omar Polo
3d56cb5336
fix a reduce/reduce conflict
...
location -> error and locopt -> fastcgi -> error both end up with
a optnl that can be reduced to the empty string.
2023-07-23 19:11:09 +00:00
Omar Polo
60f4107da6
add a test with fastcgi, locations and forceful disabling
2023-07-23 19:04:53 +00:00
Omar Polo
6a8387e5f5
add `fastcgi off' to forceful skip fastcgi for a route
2023-07-23 19:04:37 +00:00
Omar Polo
fdd67729b4
adjust syntax in fastcgi test; add another test for the old syntax
2023-07-23 18:45:43 +00:00
Omar Polo
a1ba9650a9
revamp fastcgi configuration: make it per-location
...
this revamps the syntax in the configuration to better match httpd(8)
(and in general be less weird) and to allow per-location fastcgi
configurations.
the bare `param' is now deprecated, but for compatibility it acts
like `fastcgi param' would do now. Same story for `fastcgi <pathÂ>'.
2023-07-23 18:45:05 +00:00
Omar Polo
f36ba9be59
move struct envlist and alist up
2023-07-23 18:17:59 +00:00
Omar Polo
0995ecdb87
plug memleak
2023-07-23 17:43:27 +00:00
Omar Polo
cf35bdce9a
add titan to .gitignore
2023-07-23 17:18:04 +00:00
Omar Polo
88c03474f8
revert previous
...
Somehow the compat for __dead is not working properly on macos
(cirrus ci) since it complains that parse_debug() does not return
a value in all control paths when it uses usage() (marked as __dead)
to catch a wrong usage.
2023-07-23 14:13:23 +00:00
Omar Polo
67ae3d8e03
use __dead instead of __attribute__((noreturn))
2023-07-22 16:08:21 +00:00
Omar Polo
da3fc66ee8
titan: add compat shims to compile on !OpenBSD
2023-07-22 15:50:22 +00:00
Omar Polo
800aa93c05
gg: warn when the TLS layer is not closed properly
...
various servers are not handling correctly the close notify so for
the moment don't turn this into an hard error but just warn.
Hopefully, given some time, most servers will be fixed.
while here, drop the gotos and just use a break to exit the main
loop.
2023-07-22 15:47:07 +00:00
Omar Polo
2ff1e2a923
add titan(1) -- a draft titan client
2023-07-22 15:47:02 +00:00
Omar Polo
81bab00246
split out iri.h from gmid.h
2023-07-22 13:49:07 +00:00
Omar Polo
6a996ec20f
fmt
2023-07-22 08:19:26 +00:00
Omar Polo
bd23307690
drop engine support
2023-07-22 08:17:02 +00:00
Omar Polo
21617eda73
remove the useless logging methods
...
it makes more clear where the magic is. adapted from the smtpd'
ca.c diff.
2023-07-22 08:13:15 +00:00
Omar Polo
5d2f4b1611
add compat for endian (now required by imsg)
2023-07-02 09:14:44 +00:00
Omar Polo
c9c44c6571
update imsg
2023-07-02 08:55:38 +00:00
Omar Polo
71b02f6390
rename do_accept() -> server_accept()
2023-07-01 22:00:08 +00:00
Omar Polo
2b0b2661ea
enrich the description of the server process
2023-07-01 18:44:42 +00:00
Omar Polo
1134ea149a
typo
2023-07-01 18:42:16 +00:00
Omar Polo
2c3810687f
change log_request to take the code and meta unpacked
...
don't know what i was smoking when I wrote log_request() like that...
2023-07-01 18:41:46 +00:00
Omar Polo
2247b66842
improve fcgi test: send more than one chunk of data
2023-07-01 18:38:22 +00:00
Omar Polo
0f7fdd2105
parse (and log) the header from fastcgi
2023-07-01 18:37:59 +00:00
Omar Polo
a6f2cfe792
multiple -v don't make it more verbose anymore
2023-07-01 14:28:12 +00:00
Omar Polo
e3ce19dcc1
change on fatalx -> log_warnx
...
we already check the validity of the format string, but still avoid a
gratious fatal() at runtime.
2023-07-01 14:22:26 +00:00
Omar Polo
80192f4589
rename fmt_sbuf -> fmtbuf; make the buffer explicit
2023-07-01 14:21:41 +00:00
Omar Polo
57ee9057af
add some ideas
2023-07-01 14:11:21 +00:00
Omar Polo
994fc034e5
avoid needless strlen()
2023-07-01 14:11:21 +00:00
Omar Polo
e2003e7e30
simplify request handling
...
get rid of check_path(), it's overly complicated. Instead, inline
open_file() in client_read() and rework open_dir() to just use
openat() instead of the complicate dance it was doing.
Simplify open_dir() too in the process: if the directory entry for the
index is not a regular file, pretend it doesn't exist.
2023-07-01 14:11:18 +00:00
Omar Polo
2339a71178
use a function-local buffer for the canonical redirect
2023-07-01 13:13:04 +00:00
Omar Polo
fef06f06ac
remove the fcgi debug code
2023-07-01 13:07:18 +00:00
Omar Polo
911156fb95
make `listen on' defaults on port 1965
2023-06-29 15:01:16 +00:00
Omar Polo
c9e878d6a4
use snprintf() instead of chain of strlcpy/cat
2023-06-26 10:17:43 +00:00
Omar Polo
ed164e7221
call getnameinfo() only once per request
2023-06-26 09:44:46 +00:00
Omar Polo
da0821b6cb
avoid gratious strlen; evbuffer_readln returns the length
2023-06-24 20:19:33 +00:00
Omar Polo
a452496a96
rework check
2023-06-24 19:42:31 +00:00
Omar Polo
287ab86538
default chroot to user' home if unset
2023-06-24 19:42:31 +00:00
Omar Polo
0fc92ad2fd
update changelog
2023-06-24 14:25:12 +00:00
Omar Polo
841633cfec
plug memory leak in client_close_ev
2023-06-24 14:22:12 +00:00
Omar Polo
ddf7a437de
fix client_close_ev when tls_close() returns TLS_WANT_POLLIN/OUT
...
in those cases we need to reschedule the function and return, instead
of going on with the cleanup.
2023-06-24 14:21:57 +00:00
Omar Polo
c5edb15740
properly handle handshake failures
...
If a TLS handshake fails there's nothing we can do, so don't attempt
to reply an error (the connected client is not speaking Gemini as
it's not using TLS at all) and instead just close the connection.
Fixes issue #13
2023-06-24 14:15:57 +00:00
Omar Polo
53bdae38fe
update changelog
2023-06-24 13:30:13 +00:00
Omar Polo
23f0ac49ed
fix previous
2023-06-24 13:20:51 +00:00
Omar Polo
6a60134c64
mention gg and ge
2023-06-24 13:19:26 +00:00
Omar Polo
fea6a85623
update the README after recent developments
2023-06-24 13:17:44 +00:00
Omar Polo
24f644dbb6
there's no more any `static' target
2023-06-24 13:10:31 +00:00
Omar Polo
3a877237a7
gg.1: improve -d description
2023-06-24 13:04:40 +00:00
Omar Polo
7edcf2b341
update gmid.conf.5: drop old rules and add news
...
- minor improvements to the wording - drop the removed global options
ipv6 and port - remove config-less mention - document `listen on'
- update examples
While `ipv6' and `port' are still supported for backward compatibility,
it's better to not document them anymore.
2023-06-24 13:04:15 +00:00