Commit Graph

151 Commits (master)

Author SHA1 Message Date
Solene Rapenne f647ff347a vger: add LOG_INFO into syslog 4 months ago
solene cad05817d3 Merge pull request 'relative_cgi' (#10) from relative_cgi into master
Reviewed-on: #10
6 months ago
prx 1e13a08865 improve check of cgi_dir request 6 months ago
prx aa6f001022 follow manpage for tests 6 months ago
prx 86626e77f2 fix indent 6 months ago
prx c09063b10e -c is now relative to chroot and can be used with multiple vhosts 6 months ago
solene de579c346a Merge pull request 'replace strlcpy and strlcat by snprintf to reduce calls' (#8) from simpler_string_handling into master
Reviewed-on: #8
7 months ago
prx 62bc1d852f use fork() to get the real byte size sent when using cgi 7 months ago
prx 750ca51e43 rename function name 7 months ago
prx bc306eaf8a remove '../' after percent decoding 7 months ago
prx 46f2c7238a replace strlcpy and strlcat by snprintf to reduce calls 7 months ago
solene 3ca16cf38f Merge pull request 'regex' (#7) from regex into master
Reviewed-on: #7
7 months ago
prx 9d23a48ae2 remove useless functions 7 months ago
prx 875f167eb9 skip useless test 7 months ago
prx 75bfaee73e remove useless function && reorder declarations 7 months ago
prx 45e5ae32fa useless line 7 months ago
prx b1f92f7c9c fix indent 7 months ago
prx fc5c2a1b41 fix cgi and simplify now we use regex 7 months ago
prx 34667eb018 Revert "test no longer required since path can't be empty with set_path"
This reverts commit 5cb310dd1b.
7 months ago
prx 5cb310dd1b test no longer required since path can't be empty with set_path 7 months ago
prx 63616a97fc remove unused function 7 months ago
prx 27549119ef simplify and fix redirections after regex 7 months ago
prx e3932483ef remove unused parameter 7 months ago
prx f8d215869d remove unused function 7 months ago
prx e2567fcf01 modify function to set path according to virtualhost 7 months ago
prx b18f3a3c7b rename function 7 months ago
prx 504dd3f759 rename check_request to read_request 7 months ago
prx f388d2a57a improve regex to handle :1234 in url 7 months ago
prx 5063f3e95b ensure errors msg are followed by \n, specify in a define the number of matches we need, remove bad structure init 7 months ago
prx be0f86df8d keep globals notation 7 months ago
prx 883bfed7a7 make tests easier to read 7 months ago
prx 26ca6c422d move regex to vger.h 7 months ago
prx 2b835bc39c import regex functions to parse request 7 months ago
solene bfd713c131 Merge pull request 'Reorganize vger code into functions' (#6) from nospaghettis into master
Reviewed-on: #6
7 months ago
prx fd0e70ab5b really fix size computation 8 months ago
prx 4d3b585951 fix wrong data size calculation 8 months ago
prx f973351945 reformat as much as possible.
Now main() is much simpler.
Removed all goto.
Less variables in main.
Simplified status_ to status().
Use a stop() function to log, send messages to stderr if necessary and close vger.
Minor fixes with defaults, mimes
There is still work to do to compare path using stat().
8 months ago
Solene Rapenne 76fafe0a9d fix a makefile source requirement 9 months ago
Solene Rapenne 4496e744e8 introduce the unit tests file 9 months ago
Solene Rapenne 9cca2408c3 Separate vger functions into a new file
This will ease the creation of unit tests
and code reusability
9 months ago
Solene Rapenne 8bd1144178 README: use repology to list where vger is packaged 11 months ago
Solene Rapenne 6743c54359 README: openbsd and arch linux has a package, mentions nix shell 11 months ago
solene bbd0f05663 Merge pull request 'fix cgi support for PATH_INFO' (#3) from phoebos/vger:merge into master
Reviewed-on: #3
12 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.
1 year ago
solene 8efcdb7512 Merge pull request 'remove any query_string before chdir' (#4) from phoebos/vger:query_string_slashes into master
Reviewed-on: #4
1 year 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.
1 year ago
Solene Rapenne 01f2503376 fix NetBSD macro check 1 year ago
Solene Rapenne ed6dc1ed12 add .gitignore for build artifacts 1 year ago
Solene Rapenne 0d3d453498 should be executable out of the box 1 year ago
Solene Rapenne 914a143c3f add Nix shell file 1 year ago