Solene Rapenne
76fafe0a9d
fix a makefile source requirement
1 month ago
Solene Rapenne
4496e744e8
introduce the unit tests file
1 month ago
Solene Rapenne
9cca2408c3
Separate vger functions into a new file
...
This will ease the creation of unit tests
and code reusability
1 month ago
Solene Rapenne
8bd1144178
README: use repology to list where vger is packaged
3 months ago
Solene Rapenne
6743c54359
README: openbsd and arch linux has a package, mentions nix shell
3 months ago
solene
bbd0f05663
Merge pull request 'fix cgi support for PATH_INFO' ( #3 ) from phoebos/vger:merge into master
...
Reviewed-on: #3
4 months ago
aabacchus
aa1affb6c2
fix cgi support for PATH_INFO
...
looks for files immediately after the cgidir, and anything after that file
if there are '/'s becomes PATH_INFO.
also adds a function strip_trailing_slash which may be useful in other parts too.
4 months ago
solene
8efcdb7512
Merge pull request 'remove any query_string before chdir' ( #4 ) from phoebos/vger:query_string_slashes into master
...
Reviewed-on: #4
4 months ago
aabacchus
394b86bca8
remove any query_string before chdir
...
a query string could contain a '/' character, which would make vger try
to chdir to an incorrect directory. remove the query_string before this,
and before percent-decoding (in case there is an encoded '?'). This
should happen even if we are not doing cgi, because some clients might
send a query_string anyway, which should be ignored.
5 months ago
Solene Rapenne
01f2503376
fix NetBSD macro check
6 months ago
Solene Rapenne
ed6dc1ed12
add .gitignore for build artifacts
8 months ago
Solene Rapenne
0d3d453498
test.sh should be executable out of the box
8 months ago
Solene Rapenne
914a143c3f
add Nix shell file
8 months ago
Solene Rapenne
a319de23f7
Add configure script
8 months ago
prx
15d09d2c01
fix user chroot issue + style
10 months ago
prx
843d1f0ab7
send header before other messages
1 year ago
prx
f8aff7fe05
fix cgi error (file not found) and useless 'unveil' pledge promise
1 year ago
prx
4972df5999
Fix virtualhost support changing the way request is parsed
1 year ago
Solene Rapenne
365e99400a
Support all other BSD ! <3
1 year ago
Solene Rapenne
807d1b8409
Add a configure script to make compiling on Linux easier
1 year ago
prx
02d2d1dc7d
percent-decoding
1 year ago
prx
de52acecfc
Merge branch 'master' of tildegit.org:solene/vger
1 year ago
Omar Polo
ee8569c6e6
simplify cgi function
...
Don't fork+execlp the script. There's no need to do so since on exec
the new process will inherit our file descriptor table (and hence our
stdout), so copying from its stdout to ours is just a waste of time.
This allows to drop the ``proc'' pledge(2) promise and to (slightly)
improve performance.
1 year ago
Omar Polo
16a5ed7b30
drop unnecessary unveil(NULL, NULL)
...
the next line is a call to pledge, that alone is will block further
calls to unveil(2) since ``unveil'' isn't in the set of pledges.
1 year ago
Omar Polo
8454548b51
add test for redirect with trailing slash with vhosts on
1 year ago
Omar Polo
cbcf4ec9b6
fix redirect when vhost support is enabled
1 year ago
Omar Polo
7431d3eeec
Use the correct error codes and meaningful explanations
...
Introduce status_error: it's like status or status_redirect but for
errors, thus it doesn't add ``;lang=$lang'' at the end.
1 year ago
prx
e9be1b73a7
percent-decode uri
1 year ago
prx
e87b36c991
check request length for empty and too long
1 year ago
Solene Rapenne
e3b5fb2ab3
Revert "deal with too small/long requests"
...
This reverts commit efa1f639fc
.
1 year ago
Solene Rapenne
9525d66afb
Revert "follow spec, fread() get nmemb-1"
...
This reverts commit fbacb35170
.
1 year ago
Solene Rapenne
d086262d1a
Revert "empty request should works all the time, not only when in virtualhost"
...
This broke vger from inetd but it passed the tests.
This reverts commit 7b0686bdfa
.
1 year ago
Solene Rapenne
7b0686bdfa
empty request should works all the time, not only when in virtualhost
1 year ago
prx
fbacb35170
follow spec, fread() get nmemb-1
1 year ago
prx
efa1f639fc
deal with too small/long requests
1 year ago
Solene Rapenne
458592594e
Repair chroot, the only feature that isn't covered by tests
1 year ago
Solene Rapenne
31d384833f
Rewording
2 years ago
Solene Rapenne
ff78ea5049
Documentation rewording
2 years ago
Solene Rapenne
349e56c28c
Bump LICENSE to include 2021
2 years ago
Solene Rapenne
2191a8a18b
Fix make clean, find conditions are tricky
2 years ago
prx
84120dca09
remove double ticks
2 years ago
prx
43170e6804
restore all tests after mistake
2 years ago
prx
f0dbd2c9ed
ready for Linux && disable solene's specific tests
2 years ago
prx
55042768e5
restore parent link in autoindex and add comments
2 years ago
prx
189803ab52
useless space
2 years ago
prx
de7cd12f9f
ignore after ? and make cgi+virtualhost work (sort of)
2 years ago
prx
3510035711
fix unacceptable ../ in autoidx and code formatting
2 years ago
prx
2cc63136f8
alphasort autoindex + add proper error code fir cgi
2 years ago
prx
495fa3213f
small tip for cgi
2 years ago
prx
f6bc000adc
fix status code in cgi script
2 years ago