17 Commits

Author SHA1 Message Date
Auke Kok
e6dea92c4a Log referrer URL, if any. 2019-07-12 22:40:37 -07:00
Auke Kok
d622bff175 Make arr a map instead of array.
Saves many iterations, costs hash lookups. hopefully faster.
2019-07-12 22:40:05 -07:00
Auke Kok
8b7a7649fc v6: properly handle os.IsExist(). 2019-01-02 21:41:39 -08:00
Auke Kok
2d846f2e2e Fix duplicate file crash (#2) 2018-12-29 23:00:32 -08:00
Auke Kok
5f6c4fd0c1 Use a map for outgoing checksums instead.
Attempt to filter duplicates so the client doesn't request the
same hash file multiple times.
2018-06-10 23:57:23 -07:00
Auke Kok
dd12d125de Fix(?) nil deref again.
Upon closer inspection, it seems that err.Error() isn't actually
set here, since no error occurred, we're just rejecting the non-
POST method. Oops.
2018-02-05 12:42:50 -08:00
Auke Kok
162f259a73 Don't crash on 405 here - fix null deref of http. 2018-01-25 23:07:54 -08:00
Auke Kok
46a398e079 Reject non-POST methods. 2018-01-13 19:29:47 -08:00
Auke Kok
27fecb9e61 Strip port from remote address. 2018-01-13 19:26:54 -08:00
Auke Kok
753c767b31 Print out IP address when getting bad requests. 2018-01-13 19:24:00 -08:00
Auke Kok
c07cee0937 Use journal friendly log output format. 2018-01-13 19:17:16 -08:00
Auke Kok
b07664cf70 Catch the last error. 2018-01-03 09:00:24 -08:00
Auke Kok
4e66c88944 gofmt -s -w main.go 2018-01-03 08:54:52 -08:00
Auke Kok
780f1c5561 Bug: incorrect chmod permissions. 2017-12-28 22:54:07 -08:00
Auke Kok
87ae4b1d7a Add media scanning and collection.
This removes the need entirely for any other script. At startup
the program will scan all folders recursively and hardlink or copy
the content over to the webroot, and then serve the index.mth.
2017-04-19 11:28:43 -07:00
Auke Kok
d538d5dd07 Make a simple Makefile to automate some basic package level things. 2017-04-19 09:12:21 -07:00
Auke Kok
bd018d25e4 Initial commit. 2017-04-19 00:39:42 -07:00