Commit Graph

74 Commits

Author SHA1 Message Date
int 80h
2de9594c0c Fixed regression in get_binary 2021-12-05 15:00:33 -05:00
int 80h
f332604088 Cleaning up code 2021-12-04 20:42:59 -05:00
int 80h
0223e31622 Switched from openssl to Rustls 2021-12-01 21:25:37 -05:00
int 80h
cecc6f5793 Changed host/port to interface and can now listen on multiple interface/ports 2021-11-26 20:21:40 -05:00
int 80h
a022203074 Refactoring 2021-11-25 18:08:55 -05:00
int 80h
0e39b3dc80 Refactoring 2021-11-23 12:40:52 -05:00
int 80h
0afdf8075f Changed hostname check to be case insensitive 2021-11-21 16:02:38 -05:00
int 80h
4fb31bec38 Small amount of refactoring 2021-11-21 15:04:26 -05:00
int 80h
e5c44c2c53 Fixed redirect and scgi path when its the root url 2021-11-17 21:33:26 -05:00
int 80h
077357e0d9 Fixed clean shutdown 2021-11-15 21:32:23 -05:00
int 80h
f91113d96f Removed mut from runtime 2021-11-14 20:46:24 -05:00
int 80h
9deac53413 Updated all deps 2021-11-14 18:24:37 -05:00
Jessica Stokes
2388cbda98 Handle macOS user paths when running on macOS
This updates the usrdir option to look in /Users/ rather than /home/ when running on macOS, as this is where users' home directories live on this OS.

It also updates the config file's description of the option to hopefully be home directory agnostic.
2021-04-03 21:24:32 -04:00
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
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
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
12b1cf3923 Added CGI vars AUTH_TYPE, REMOTE_USER and TLS_CLIENT_HASH 2020-07-05 18:08:12 -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
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
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
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
d63152bc5b Changed tab to space in header 2020-05-23 13:16:13 -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
41d3447b83 Reorginized config 2020-05-19 14:30:18 -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
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