Commit Graph

75 Commits

Author SHA1 Message Date
Melody Horn
f9c41edcb4 don't round-trip CGI response through UTF-8
this fixes sending binary files from a CGI script
2021-02-19 20:15:42 -05:00
Remco van 't Veer
7be0d5fa1f Typo in ProxyRequestRefused meta 2020-12-24 09:36:11 -05:00
Remco van 't Veer
6fceccd2cd Avoid logging 0 characters 2020-12-24 09:31:47 -05:00
int 80h
ddecdbccb3 Updated lock and fixed dir list 2020-12-24 09:05:00 -05:00
int 80h
ebc229643a Bump version and dependencies 2020-08-15 19:36:48 -04:00
Kirk Strauser
d75af48844 Sort directory listings, grouped by dirs then files
Heya! Thanks for putting Gemserv out there!
This changes directory listings so that all directories are listed (sorted), then all filenames are listed (sorted). You can see the output of this patch running at gemini://gemini.freeradical.zone/log/ . The downside is that now you’ll temporarily have 2 copies of the directory listing in RAM during the request: one in `list`, and a second copy divided across `dirs` and `files`. It seems unlikely that anyone’s currently using Gemserv to serve directories that just barely fit in RAM, so that seems pretty low risk. 🙂
- Kirk
2020-08-15 19:27:40 -04:00
int 80h
b3879e3733 update config.toml and bumb version 2020-07-11 15:01:31 -04:00
Hannu Hartikainen
7f3248e92d Implement proxy_all for proxying entire domains
I wanted to add another domain behind a reverse proxy. The existing
reverse proxy functionality seemed to only work for subpaths so I
implemented this. (I'm happy with another better way if you can point one
to me.)

I also implemented streaming responses when reverse proxying. That way
the responses stay as similar as possible to the upstream server.
2020-07-11 14:43:59 -04:00
int 80h
cb4ee95620 Stopped ignoring Cargo.lock in git 2020-07-05 18:27:45 -04:00
int 80h
12b1cf3923 Added CGI vars AUTH_TYPE, REMOTE_USER and TLS_CLIENT_HASH 2020-07-05 18:08:12 -04:00
int 80h
2582d1db45 Bumped version number 2020-07-05 14:16:08 -04:00
Hannu Hartikainen
e0e426694b Add CGI env parameter PATH_INFO
This means that a CGI script, say, /cgi-bin/foo can be requested using a
subpath like /cgi-bin/foo/bar/baz. In that case, PATH_INFO is set to
"/bar/baz". As it is easy to compute SCRIPT_NAME along with PATH_INFO,
we also refactor it. SCRIPT_NAME now contains the URL to the script, not
just the basename of it. This is typical CGI behavior.

Since the cgi handling code was needed in two places, it was refactored
a bit. Other parts of handle_connection could be refactored similarly.

The code now supports executables inside subdirectories of cgipath.
Previously the executable had to be in cgipath, subdirs not allowed.
2020-07-05 14:09:28 -04:00
int 80h
ecba9a266d Url encoding and decoding 2020-06-08 13:21:45 -04:00
int 80h
ac3b98d72f Add lang option 2020-06-08 00:05:45 -04:00
int 80h
543ce4c15e CFG 2020-06-06 17:22:27 -04:00
int 80h
b1743749ab Strip CRLN 2020-06-06 13:41:05 -04:00
int 80h
cfcaf3f7c7 Error handling 2020-05-29 23:34:49 -04:00
int 80h
213bd81803 Updated Readme 2020-05-29 16:35:52 -04:00
int 80h
258d2b9ef6 Added log levels 2020-05-28 17:56:42 -04:00
int 80h
44f37e139b If there's no extension or unknown file type it will send text/plain 2020-05-28 17:28:00 -04:00
int 80h
014b7c938b Added UPDATING FILE. also fixed a few bugs 2020-05-28 16:58:03 -04:00
int 80h
2f89d8cb9a Fixed typo in config.toml 2020-05-28 15:30:48 -04:00
int 80h
cc757b3bdd Added Openrc init script 2020-05-28 15:25:12 -04:00
int 80h
bec2d0e858 Added timeout to readme 2020-05-26 17:45:46 -04:00
int 80h
77fdc18097 Timeout for request and cgi 2020-05-26 17:31:28 -04:00
int 80h
e9f71f600d SCGI 2020-05-26 17:31:28 -04:00
int 80h
5c7f0f2275 Updated README 2020-05-26 17:31:28 -04:00
int 80h
5c00fb24fd Fixed bugs in cgi-everywhere 2020-05-26 17:31:28 -04:00
int 80h
16f9358128 Fixed bug with index 2020-05-26 17:31:28 -04:00
int 80h
56384f35d0 CGI Everywhere 2020-05-26 17:31:28 -04:00
int 80h
8ebe1becf1 Bug fix: removed unwrap in mime guess 2020-05-23 16:45:51 -04:00
int 80h
fadd8fd8b9 Bump version 2020-05-23 13:20:31 -04:00
int 80h
d63152bc5b Changed tab to space in header 2020-05-23 13:16:13 -04:00
int 80h
5060977fd9 Added timeout to readme 2020-05-22 15:52:17 -04:00
int 80h
12ed0e7c03 Timeout for request and cgi 2020-05-22 15:46:02 -04:00
int 80h
e80abd0553 Fixed bug where usrdir could be false but still pass 2020-05-20 12:22:24 -04:00
int 80h
c27688d7d7 Updated README 2020-05-19 16:42:59 -04:00
int 80h
41d3447b83 Reorginized config 2020-05-19 14:30:18 -04:00
int 80h
0cc3f8205e Added NetBSD instructions 2020-05-15 16:59:04 -04:00
int 80h
4ebc2ff8fb The index file is now configurable 2020-05-14 20:59:00 -04:00
int 80h
b5c85a3f70 Fixed bug with pocket gemini 2020-05-14 16:31:48 -04:00
int 80h
3fff95daec Added default server if client doesn't use sni 2020-05-14 15:33:45 -04:00
int 80h
dfae3705c4 Added redirect and cgienv 2020-05-13 21:42:00 -04:00
int 80h
929a11a91c Added init script. Cleaned up imports 2020-05-12 23:55:32 -04:00
int 80h
57e370b52c Added logger.rs 2020-05-12 21:17:29 -04:00
int 80h
ea2c67c72f Added to_str for Status 2020-05-12 19:45:21 -04:00
int 80h
51a78ad04a Fixed bug with base url and proxy enabled 2020-05-10 20:48:46 -04:00
int 80h
4eb65aabef Updated config.toml and README 2020-05-10 17:26:26 -04:00
int 80h
26b55f7d1e Revproxy is working. Added example cgi script 2020-05-10 17:21:28 -04:00
int 80h
ae2d7e0092 Merge branch 'openssl' into revproxy-openssl 2020-05-09 20:56:58 -04:00