Commit Graph

104 Commits

Author SHA1 Message Date
int 80h
827a9c1481 Bug fix: File path is checked to make sure it's in the root directory or in ~/public_gemini 2022-02-17 22:56:49 -05:00
int 80h
eb129467f1 Bug fix: Another traversal bug. This time /..%2F 2022-02-09 22:01:40 -05:00
int 80h
406fea7b6c Bug Fix: file system traversal bug where %2F is treated as / 2022-02-02 18:03:04 -05:00
int 80h
2eabc3e893 Bug fix: the server would hang if there was an error with the config file 2021-12-30 17:28:46 -05:00
int 80h
0f07e7c2be Added Reload on SIGHUP 2021-12-29 22:40:01 -05:00
int 80h
f7429f3ad6 Updated Cargo.toml to v0.6.2 2021-12-27 20:47:21 -05:00
int 80h
0230134e39 Bug fix: time-rs crate panics when changing time to local so for now the logger uses utc 2021-12-27 20:33:06 -05:00
int 80h
57113d61c4 Added release-linux.yml to automatically build and upload tagged releases for linux 2021-12-27 19:54:34 -05:00
int 80h
34494da320 Added docker.yml 2021-12-27 15:01:53 -05:00
int 80h
6d11676da4 Bug fix: If text file wasn't utf8 it would fail and not send any
response to clients.
2021-12-24 10:23:06 -05:00
int 80h
f23fa8668b Added Dockerfile, updated README and pumped Version 2021-12-05 15:30:52 -05:00
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
9ece7c3d3b Updated version to 0.5.0 and updated deps 2021-11-26 20:32:55 -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
c7677ce2f2 Added .build.yml 2021-11-21 15:32:18 -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
76a5dabe94 Changed homepage to https to be able to upload to crates.io 2021-11-14 20:52:53 -05:00
int 80h
f91113d96f Removed mut from runtime 2021-11-14 20:46:24 -05:00
int 80h
fc1f2cbf33 Added fields in Cargo.toml 2021-11-14 20:36:53 -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
Jessica Stokes
d68b815be4 Quote the "proxy_all" option
The "proxy_all" option from the sample configuration not being quoted was throwing this error when running the server:

    Config error: invalid TOML value, did you mean to use a quoted string? at line 38 column 13

This patch makes sure the program will run against the included example config.toml.
2021-04-03 21:22:29 -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
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