Commit Graph

115 Commits

Author SHA1 Message Date
Jaakko Keränen 305b86ebd2
Bumped version to v0.7 2024-04-13 15:20:24 +03:00
Jaakko Keränen 8ff7ab3d17
CGI: Use path wildcards with `bin_root` executables; look for "index.gmi" files 2024-04-13 15:20:10 +03:00
Jaakko Keränen a9923d43fc
Skip the TLS SNI check when request hostname has a literal IP address 2024-04-13 14:27:37 +03:00
Jaakko Keränen d1905e688c
Respond with status 53 if an unknown hostname is requested 2024-04-13 14:05:45 +03:00
Jaakko Keränen cf91752b5b
Bumped version to 0.6.2; updated Project Gemini URL 2024-04-13 14:04:58 +03:00
Jaakko Keränen b0f725749a
Fixing the Read the Docs build 2023-11-16 16:39:10 +02:00
Jaakko Keränen 896f1e7ca0
Read the Docs needs to import the module 2023-11-16 16:37:01 +02:00
Jaakko Keränen 4b33deb4f4
Fixing Read the Docs 2023-11-16 16:34:57 +02:00
Jaakko Keränen e03c4b116d
Fixing the Read the Docs build 2023-11-16 15:53:30 +02:00
Jaakko Keränen f935ff573d
Docs: Added configuration file for Read the Docs
Nowadays required, it seems.
2023-11-16 15:39:35 +02:00
Jaakko Keränen 4c75c52c3c
Updated README 2023-11-16 15:34:53 +02:00
Jaakko Keränen c6a4530058
Fixed unquoting URLs in the "static" module when looking up files 2023-11-16 15:14:15 +02:00
Romi Hervier 5489b298c1
Translate %20 in URL into path whitespace 2023-11-16 15:13:40 +02:00
Jaakko Keränen 0e29f8d3e9
Docs: Added example of printing Gemini response meta line 2023-11-16 15:11:34 +02:00
Jaakko Keränen 812d344721
Bumped version number to 0.6.1 2023-11-16 15:10:36 +02:00
Jaakko Keränen d072c920df
Updated README 2023-10-28 22:19:25 +03:00
Jaakko Keränen ffe35e1dba Merge pull request 'Keep preformatted block language captions' (#2) from mike-cifelli/gmcapsule:fix-gitview-preformatted-captions into main
Reviewed-on: https://codeberg.org/skyjake/gmcapsule/pulls/2
2023-10-28 19:06:40 +00:00
Mike 17c7f59753 Handle special case blocks 2023-10-28 19:05:50 +00:00
Mike 48671edc00 Keep preformatted text captions 2023-10-28 19:05:50 +00:00
Jaakko Keränen 6cb93fc0ab
Bumped version number to 0.6; added streaming CGI mode 2023-08-10 21:04:10 +03:00
Jaakko Keränen c7a9ea3452
Bumped version number to 0.5.3 2023-07-17 15:07:14 +03:00
Jaakko Keränen 5cba5cc369 Merge pull request 'Allow for quick restarts' (#3) from mike-cifelli/gmcapsule:socket-updates into main
Reviewed-on: https://codeberg.org/skyjake/gmcapsule/pulls/3
2023-07-17 12:05:32 +00:00
Mike e1232ec583
Allow for quick restarts 2023-07-11 16:17:52 -04:00
Jaakko Keränen 8f98b5b638
Bumped version number to 0.5.2 2023-07-09 14:12:56 +03:00
Jaakko Keränen d671c1a615 Merge pull request 'Fix replacement paths' (#1) from mike-cifelli/gmcapsule:fix-replacement-paths into main
Reviewed-on: https://codeberg.org/skyjake/gmcapsule/pulls/1
2023-07-09 11:09:05 +00:00
Mike c46496b966
Fix replacement paths 2023-07-08 14:16:26 -04:00
Jaakko Keränen 8b8dba5b91
Bumped version number to 0.5.1; make `gmcapsule.Identity` visible 2023-06-19 15:34:34 +03:00
Jaakko Keränen c2d9da0604
Cleanup: Removed debug message 2023-06-17 14:20:24 +03:00
Jaakko Keränen 276ad28816
Updated README 2023-06-17 13:13:29 +03:00
Jaakko Keränen 332e57006d
Restored previous `shutdown_event` API 2023-06-17 10:51:25 +03:00
Jaakko Keränen ce775ed35a
Updated docs 2023-06-17 10:42:33 +03:00
Jaakko Keränen e54db584a4
Use multiple processes to handle requests
Normal Python threading is subject to the Global Interpreter Lock,
which means only one thread gets to execute Python code at once.
This still allows concurrent I/O operations, but if request handling
requires long-running Python code, only one request would be handled
at any given time, slowing things down.

This commit adds a configurable number of RequestHandlers
that offload the processing of requests to separately running
processes. Several changes were necessary to allow passing data
between the main process and the workers, mostly to ensure that
everything is pickleable.

The main process still uses multiple threads to handle incoming
connections and do I/O with the clients.
2023-06-17 10:24:30 +03:00
Jaakko Keränen d17e4e2f7b
Note about parallel caches 2023-06-16 18:09:36 +03:00
Jaakko Keränen 5ab0ba40b8
Process Gemini/Titan via a scheme handler; updated docs, change log
IssueID #2
2023-06-16 16:02:34 +03:00
Jaakko Keränen 6ac505666d
SIGHUP reloads config and restarts workers
Server socket and TLS configuration are unchanged.
2023-06-16 13:58:29 +03:00
Jaakko Keränen 9d266a5cb3
Switch back to regular threading; fixed refactoring issues 2023-06-16 13:17:14 +03:00
Jaakko Keränen 28d6cb6148
Refactoring to isolate workers better (trying `multiprocessing`)
Each worker loads their own extension modules. This will enable
starting and stopping workers independently.

`multiprocessing` would be nice, but there must be a way to pass
the incoming connections to the worker process somehow. Pickling
the connection doesn't seem to work.
2023-06-16 13:09:37 +03:00
Jaakko Keränen 3fc06fae08
Updated change log 2023-06-01 15:10:25 +03:00
Jaakko Keränen d167347a10
Rewrite: Allow including the query string in a status response 2023-06-01 15:07:48 +03:00
Jaakko Keränen 8592a8d314
Bumped version to v0.4.1 2023-06-01 15:07:19 +03:00
Jaakko Keränen 375360214c
Added "rewrite" module; updated documentation
The Server class was refactored to make it possible to call the
entry point for a given request via extension modules.
2023-05-31 22:19:37 +03:00
Jaakko Keränen ddd6046f87
Bumped version to 0.3.2
GitView: Escape backslashes in commit log.
2023-05-22 12:22:19 +03:00
Jaakko Keränen cb6fe5ea2d
CGI: Fixed handling empty query string; bumped version to 0.3.1 2023-05-13 21:52:49 +03:00
Jaakko Keränen e05f9fa4e1
Bumped version to 0.3.0
Added server shutdown event for notifying background threads, and
`Request` query member is None if no query is string is present
at all.
2023-05-12 06:07:55 +03:00
Jaakko Keränen 1ffcdf9b87
Fixed importlib error 2023-03-12 13:55:34 +02:00
Jaakko Keränen 88dd8e0f53
Bumped version to v0.2.5; fixed exception handling 2023-03-01 07:58:19 +02:00
Jaakko Keränen ce4c652c88
Bumped version to 0.2.4; fixed Markdown parsing error 2022-12-15 21:18:57 +02:00
Jaakko Keränen 1fcaa08434
Added a future note 2022-12-11 18:57:19 +02:00
Jaakko Keränen 7385d5a8f5
Tweaking the CSS 2022-12-11 17:50:18 +02:00
Jaakko Keränen ecb114093a
Updated README
Link to the user manual.
2022-12-11 13:35:59 +02:00