Commit Graph

  • e547818455 Remove unused import. Solderpunk 2020-07-01 23:06:05 +0200
  • 37e177fbe0 Move .molly file parsing function into config.go. Solderpunk 2020-07-01 23:05:49 +0200
  • 3cd4a072fd More and better error logging. Solderpunk 2020-07-01 22:58:07 +0200
  • f7e588dfae More and better error logging. Solderpunk 2020-07-01 20:15:52 +0200
  • 821a862036 Use standard library logging facilities for error log. Solderpunk 2020-07-01 19:57:39 +0200
  • 3c4c447bd3 Broader config file error handling. Solderpunk 2020-07-01 19:56:43 +0200
  • 54f659c03f Add example OpenRC script, and put all init examples in a contrib directory. Solderpunk 2020-07-01 17:00:18 +0200
  • 2a263e5e70 Rewrite SCGI support to use prefixes, not regexps, and provide the same SCRIPT_PATH / PATH_INFO break as CGI. Solderpunk 2020-07-01 16:40:51 +0200
  • d87ecfd20f gofmt. Solderpunk 2020-07-01 16:19:38 +0200
  • f4f14320df Expand CGI path globs once on startup, not for each request. Solderpunk 2020-07-01 16:18:49 +0200
  • 35bf4d16c3 Handle all requests which don't involve the filesystem before all which do. Solderpunk 2020-07-01 16:05:39 +0200
  • 9bce54882a Consolidate some quick-failing path tests. Solderpunk 2020-07-01 16:05:09 +0200
  • 36378eb1c6 Make sure CGI files are world-readable as well as world-executable. Solderpunk 2020-07-01 16:04:48 +0200
  • f291e5863c Enforce certificate zones before anything else. Solderpunk 2020-07-01 14:16:27 +0200
  • 4ae154faed Convert CGIPath handling from regexs to prefixes. Solderpunk 2020-07-01 14:10:20 +0200
  • cc5410494e Handle redirects using regular expressions, not just literal paths. Solderpunk 2020-07-01 11:13:38 +0200
  • b30fc0923b Handle CGI requests with URI components after the script. Solderpunk 2020-07-01 10:38:31 +0200
  • 68398ef0be Extensive refactor, trying to keep the main request handling function relatively simple. Solderpunk 2020-06-30 22:25:37 +0200
  • fd31094cb6 Allow .molly files to set certificate zones. Solderpunk 2020-06-30 20:39:26 +0200
  • 702cc73a63 Add redirect members to Molly File struct. Should have been part of an earlier commit! Solderpunk 2020-06-30 20:38:46 +0200
  • 35f58f50e7 Correct README to indicate that redirects are not done using regular expressions but literal path matches. Solderpunk 2020-06-30 20:23:50 +0200
  • 1794ff643b Allow .molly files to configure redirects. Solderpunk 2020-06-30 20:19:13 +0200
  • d7663ab688 Removing debugging print. Solderpunk 2020-06-30 19:34:01 +0200
  • e43fc7877c Big rearrange: resolve URL to filesystem earlier, so we can check for .molly files ASAP, so that they can handle redirects, certificate zones, etc. Solderpunk 2020-06-30 19:31:27 +0200
  • 990b7071d0 gofmt fixes. Solderpunk 2020-06-30 19:13:02 +0200
  • 44af303de6 Fix silly mistake in hasty port checking fix. Solderpunk 2020-06-30 19:11:49 +0200
  • 4c27911e8f Check that request port matches configured server port. Should fix #9. Solderpunk 2020-06-30 17:27:53 +0200
  • b0fd07f58a Provide full coverage of settings in example.conf. Solderpunk 2020-06-30 17:19:27 +0200
  • 6c8e11c9ed Change default port in example.conf Solderpunk 2020-06-30 17:02:18 +0200
  • 4dbe52adf8 Permit .molly files to specify MIME overrides. Solderpunk 2020-06-30 17:01:19 +0200
  • 520e1ecc95 Big documentation push. Solderpunk 2020-06-29 21:08:29 +0200
  • 18c056167f Make it possible to toggle handling of .molly files on and off via main config. Solderpunk 2020-06-29 17:17:43 +0200
  • 77691d6983 Introduce error log. Solderpunk 2020-06-28 18:34:50 +0200
  • 31161cf21c Permit multiple authorised certificates per zone. Solderpunk 2020-06-28 14:47:36 +0200
  • a0dacf4bbd Basic implementation of certificate zones - only one authorised cert per zone. Solderpunk 2020-06-28 13:47:30 +0200
  • 5377c2941f Allow overriding MIME types based on path regexes. Solderpunk 2020-06-28 00:12:32 +0200
  • a07645dd2e Allow overriding directory listing options with .molly files. Solderpunk 2020-06-27 23:44:15 +0200
  • 7066bad570 Use headings in .gmi files instead of filenames in directory listings. Solderpunk 2020-06-27 22:57:03 +0200
  • 3f98a9edf1 Permit sorting of files in automatic directory listings by various factors. Solderpunk 2020-06-27 18:52:29 +0200
  • 6da5ec79dd Fix typo. Solderpunk 2020-06-17 15:22:21 +0200
  • 30a5369f8a Add missing return, fixes #4. Solderpunk 2020-06-13 09:08:04 +0200
  • 15863eb253 Fix typo in CGI environment variable. Solderpunk 2020-06-12 19:00:36 +0200
  • e57a3d5ecf Read header for directory listings from .mollyhead. Solderpunk 2020-06-11 22:43:13 +0200
  • b0b18971f4 Run gofmt on everything for the first time ever! Solderpunk 2020-06-10 21:31:13 +0200
  • 3e80488f92 Add DefaultLang config variable to set text/gemini lang parameter. Overridable via .molly file. Solderpunk 2020-06-10 21:22:15 +0200
  • 7fb5ca052b Fix parent directory walking logic to work at the DocRoot. Solderpunk 2020-06-10 21:20:01 +0200
  • cb1e0da7d5 Read .molly files from parent directories of served file, permitting overrides to text/gemini file extension. Solderpunk 2020-06-10 20:40:13 +0200
  • 599bbf4b52 Proper tilde path clean up. Solderpunk 2020-06-10 19:43:49 +0200
  • 8d2309f889 Quick hacky fix to tilde path transformation. Solderpunk 2020-06-08 23:03:19 +0200
  • 3e5e4353e6 Update example config file. Solderpunk 2020-06-08 21:48:35 +0200
  • b8034c1576 Make text/gemini extension configurable. Solderpunk 2020-06-08 21:47:33 +0200
  • 4681d3f971 Support multiple CGI paths. Solderpunk 2020-06-08 21:46:39 +0200
  • bec952c66a Use log.Fatal instead of fmt.Println and os.Exit. Solderpunk 2020-06-08 20:02:29 +0200
  • 8f395d7932 Add link to parent directory in directory listings. Solderpunk 2020-06-08 20:01:03 +0200
  • 301d3409f1 Support temporary and permanent redirects. Solderpunk 2020-06-08 19:59:16 +0200
  • 433c43e98e Add file size and modification dates to automatically generated directory listings. Solderpunk 2020-06-06 21:28:12 +0200
  • 11beddcfb1 Add rudimentary support for specifying redirects. Solderpunk 2020-06-06 13:36:10 +0200
  • 548697b094 Get rid of debugging prints. Solderpunk 2020-06-06 13:35:47 +0200
  • 2c99228610 Pass pointers to the log entry to functions which can set the status code, so changes are reflected in the main handle function. Solderpunk 2020-06-06 12:08:34 +0200
  • b0a08f8231 Break CGI and SCGI stuff out into its own file. Solderpunk 2020-06-06 11:46:29 +0200
  • 54ed1ab265 Merge CGI and SCGI variable preparation. Solderpunk 2020-06-06 11:33:00 +0200
  • d78c840056 First step toward unstubbing SCGI. Solderpunk 2020-06-06 00:12:46 +0200
  • b384105d86 Factor out request reading code. Solderpunk 2020-06-05 20:13:48 +0200
  • 7ffbb6c6ef Pass some client cert information to CGI programs. Solderpunk 2020-06-05 19:55:24 +0200
  • 6f3887bdc4 Request client certificates, check validity dates of received certs and pass certs to handleCGI. Solderpunk 2020-06-05 19:39:28 +0200
  • 4e262d634a Fix line endings in response headers. Solderpunk 2020-06-05 19:37:56 +0200
  • fc730c8b1c Refuse to serve any sensitive files. Solderpunk 2020-06-04 23:24:19 +0200
  • 532dd83414 Make sure to always provide a MIME type. Solderpunk 2020-06-04 23:12:09 +0200
  • a16a5fac12 Switch CGI implementation to actual CGI. Solderpunk 2020-06-04 22:38:22 +0200
  • de119aa0bb Fix trailing slash redirects. Solderpunk 2020-06-04 21:32:20 +0200
  • 920f06597f Stub implementation of SCGI. Solderpunk 2020-06-04 20:41:40 +0200
  • 44d72c2bf2 Make it clear what is wrong with a config file. Solderpunk 2020-06-04 20:36:03 +0200
  • 93f3c9e620 Break handleGeminiRequest up into smaller, clearer functions. Solderpunk 2020-06-04 20:35:14 +0200
  • 9c51f26d74 Do not crash if os.Stat returns an error other than not found or no permission, which seems to mysteriously happen sometimes... Solderpunk 2020-06-01 21:27:15 +0200
  • 5fdb3622e9 Remove vestigial generic response code. Solderpunk 2020-06-01 21:23:24 +0200
  • 79dd948a9f Merge pull request 'Add initial systemd service example' (#3) from strega-nil/molly-brown:add-systemd into master solderpunk 2020-05-23 11:21:25 -0400
  • d14198aeba Add missing import from previous commit. Solderpunk 2020-05-21 22:50:33 +0200
  • 85a94a43b9 modify README #3 Nicole Mazzuca 2020-05-21 10:13:52 -0700
  • dcf23cbd97 add initial systemd service example Nicole Mazzuca 2020-05-21 10:08:56 -0700
  • 30cbdad2a2 config.Port now does something muahahahaha #2 Nicole Mazzuca 2020-05-21 00:09:11 -0700
  • 203c259e7f Honour port setting from config file. Solderpunk 2020-05-19 22:05:48 +0200
  • 06809edfcc URL escape filenames in directory lisitngs. Solderpunk 2020-05-19 22:03:44 +0200
  • 590aa672a2 Be more careful with permission issues on index.gmi Solderpunk 2020-05-17 14:12:11 +0200
  • 1d0af7a541 Add example config file and expand README.me to document basic setup. Solderpunk 2020-03-28 21:38:33 +0100
  • db4ff190be Fix default port. Solderpunk 2020-03-24 22:05:26 +0100
  • 8239e7fd3f Limit CGI processes to a particular path. Solderpunk 2020-01-12 13:39:38 +0100
  • cadb7b2ea5 Check CGI responses for a valid status code. Solderpunk 2020-01-12 12:50:01 +0100
  • 40ad09f9bc Close stdin of CGI process after sending URL. Solderpunk 2019-11-30 19:52:20 +0200
  • 0b4fefd0ba Terminate CGI processes after 10 seconds. Solderpunk 2019-11-24 21:05:32 +0200
  • efc1ecf7a7 Basic implementation of getting dynamic content from executables. Solderpunk 2019-11-24 20:24:35 +0200
  • 10a169a7f3 Remove port number from hostname before comparing against configured hostname. Solderpunk 2019-11-24 12:29:38 +0200
  • c13acf9c4b Trying a different logging format... Solderpunk 2019-11-22 21:51:47 +0200
  • a67d1b113a Don't list dot files. Solderpunk 2019-11-22 21:35:51 +0200
  • 0de58e031a Only list world readable files. Solderpunk 2019-11-21 23:03:39 +0200
  • 23a6284cc4 Check that request hostname matches configured hostname. Solderpunk 2019-11-21 22:39:25 +0200
  • b3a87c3739 Serve files and directories. Solderpunk 2019-11-06 22:23:51 +0200
  • b4cbd47bce Defer sending log entry to channel. Solderpunk 2019-11-06 18:50:44 +0200
  • dc92fbd228 Set missing scheme to gemini://, and return status 53 for non-Gemini schemes. Solderpunk 2019-11-06 18:46:44 +0200
  • 7566636c97 Add basic logging. Solderpunk 2019-11-06 18:38:41 +0200
  • 0ddf8ca2ae Initial bare bones implementation. Solderpunk 2019-11-06 17:08:44 +0200