Solderpunk
713616d556
Refactor of networking logic.
...
1. Move client certificate handling stuff inside of _send_request().
2. Change _fetch_over_network() to not be recursive, by just looping
through calls to _send_request(). This facilitates moving the
redirect-tracking state inside _fetch_over_network(), instead of
keeping it in GeminiClient.
3. Also allow _fetch_over_network() to save response to a provided
filename, and use this to implement do_save(), rather than
_go_to_gi(). This avoids the need for awkward gymnastics with
the internal state.
2023-11-14 19:40:40 +01:00
Solderpunk
01da844141
Pull response parsing inside of _send_request().
2023-11-14 08:56:39 +01:00
Solderpunk
7f1aa5cbf3
Remove unused imports.
2023-11-14 00:38:00 +01:00
Solderpunk
33e66b439b
Test for saveability against a fetched GI, not a tempfile.
2023-11-14 00:36:43 +01:00
Solderpunk
d689cbd04f
Fix _get_active_tmpfile to handle local file GIs.
2023-11-14 00:35:47 +01:00
Solderpunk
3aedd549e5
Remove unecessary duplication of handling code between _handle_gemtext() and _go_to_gi().
2023-11-14 00:33:48 +01:00
Solderpunk
e4a44679dc
Fix saving of local files.
2023-11-14 00:29:59 +01:00
Solderpunk
588d599cb4
Add actual support for reading local files, use it for bookmarks.
2023-11-14 00:15:32 +01:00
Solderpunk
c6886d7eb9
Don't clutter go_to_gi() with error logging.
2023-11-13 23:58:12 +01:00
Solderpunk
cdb2b0282c
Don't expose Cache object's trim method.
2023-11-13 20:24:54 +01:00
Solderpunk
053dcb7254
Factor out certificate validation into its own class/file.
2023-11-12 15:36:54 +01:00
Solderpunk
79a6187eac
Restore debugging output from cache using logging module.
2023-11-12 15:14:05 +01:00
Solderpunk
e678bca089
Factor out caching functionality into own class/file.
2023-11-12 14:49:01 +01:00
Solderpunk
87473fee1b
Acknowledge contributors of recently merged PRs.
2023-11-12 14:19:23 +01:00
Solderpunk
522047a209
Merge pull request 'Pass extra information to _handle_cert_request' ( #29 ) from govynnus/AV-98:fix-cert-request into master
...
Reviewed-on: #29
2023-11-12 10:37:28 +00:00
Solderpunk
b9d0633f38
Merge pull request 'Add support for touring a range where the start index is bigger than the end index' ( #25 ) from rmgr/AV-98:reverse-range into master
...
Reviewed-on: #25
2023-11-12 10:33:10 +00:00
Solderpunk
24b02327b0
Merge pull request 'Add support for http/https -> gemini proxy' ( #24 ) from rmgr/AV-98:http into master
...
Reviewed-on: #24
2023-11-12 10:28:52 +00:00
Solderpunk
d5666c9c19
Merge pull request 'Swap GUS for geminispace.info' ( #36 ) from sario528/AV-98:search-fix into master
...
Reviewed-on: #36
2023-11-12 10:22:39 +00:00
Solderpunk
a1cb220113
Merge pull request 'improve compatibility with Python 3.10' ( #40 ) from nic/AV-98:master into master
...
Reviewed-on: #40
2023-11-12 10:18:29 +00:00
Solderpunk
cb1cbfec85
Merge pull request 'Fix: ValueError if MIME is empty string (like a #20 )' ( #42 ) from continue/AV-98:fix-empty-mime into master
...
Reviewed-on: #42
2023-11-12 10:12:37 +00:00
Aleksey Ryndin
d84872d23f
Revert "Fix: input() UnicodeDecodeError tolerance"
...
This reverts commit 8f1642c9a1
.
2023-09-06 23:08:27 +03:00
Aleksey Ryndin
8f1642c9a1
Fix: input() UnicodeDecodeError tolerance
2023-09-06 13:15:29 +03:00
Aleksey Ryndin
22c7efce7c
Fix: ValueError if MIME is empty string (like a #20 )
2023-08-27 16:49:36 +03:00
Nic Waller
6ee2a0716d
improve compatibility with Python 3.10
2022-06-29 20:57:34 -07:00
sario528
5dfe62fc63
Swap GUS for geminispace.info
2021-04-15 05:04:58 -05:00
Callum Brown
92da876795
Pass extra information to _handle_cert_request
...
This fixes a bug introduced in f45630 when handling a certificate request was
factored out of _fetch_over_network.
Also make the options consistent in terms of grammar.
2021-01-03 11:07:22 +00:00
Solderpunk
265a69a6ed
Document RC files. Closes #27 .
2020-12-24 13:27:18 +01:00
rmgr
ab913ebf54
Add support for touring a range where the start index is bigger than the end index
2020-09-15 20:19:32 +09:30
rmgr
20395cb826
Add support for http/https -> gemini proxy
2020-09-15 20:02:29 +09:30
Solderpunk
129c56c1d4
Fix another hasty cache hack bug.
2020-09-03 21:21:04 +02:00
Solderpunk
ba0f707669
Ignore the cache when reloading a page.
2020-09-01 23:27:59 +02:00
Solderpunk
67f9c662b3
Add option to disable caching.
2020-09-01 23:11:55 +02:00
Solderpunk
545d5f917d
Count cache hits in black box output.
2020-09-01 21:14:17 +02:00
Solderpunk
f45630450f
Make sure early terminations of _fetch_over_network happen via an exception, not by returning None. Factor out certificate handling interface.
2020-08-31 21:18:15 +02:00
Solderpunk
4e8f3dcd05
Fix variable name bug introduced by hasty hacking of cache system.
2020-08-31 21:17:06 +02:00
Solderpunk
08c60e202b
Turn some magic numbers into constants.
2020-08-30 23:17:21 +02:00
Solderpunk
0f328141b9
Initial implementation of short-term caching.
2020-08-30 20:21:15 +02:00
Solderpunk
4d652e0fef
Remove more transient client certificate stuff.
2020-08-30 18:16:31 +02:00
Solderpunk
da8b6cc7f3
Visually distinguish non-Gemini links from Gemini links.
2020-08-30 17:23:36 +02:00
Solderpunk
969d3c1b18
Permit use of ~ in key/cert files.
2020-08-30 16:52:06 +02:00
Solderpunk
e20ac17107
Stop treating transient client certificates as a special case.
2020-08-18 21:41:51 +02:00
Solderpunk
d39cddcc84
Make default MIME handlers more generic.
2020-08-18 21:14:04 +02:00
Solderpunk
03be5bfebf
Use proper handler resolution logic for the text/gemini case (so that settings for text/* can apply).
2020-08-18 21:13:26 +02:00
Solderpunk
72754114f4
Error out if a URL attempts to redirect to itself.
2020-08-18 21:06:12 +02:00
Solderpunk
1509f895f1
Rename handle_index handle_gemtext, for clarity. It should have been called handle_menu in VF-1 in the first place, anyway.
2020-08-18 21:05:49 +02:00
Solderpunk
4e634a539b
Merge pull request 'Fix some bugs in the 'cert' UI' ( #22 ) from govynnus/AV-98:bugfix-cert into master
...
Reviewed-on: #22
2020-08-15 11:40:32 +00:00
govynnus
99e5ceec65
Fix some bugs in the 'cert' UI
...
- os.path.exists() allows directories so use os.path.isfile() instead
- os.path.isfile() does not interpret '~' as /home/<user> so add note to users
- Use right certificate directory in `mycert` example
- Display a message and abort if no previously generated certs
2020-08-14 22:13:21 +01:00
Solderpunk
ce834dd231
Use correct handler for text/gemini content.
2020-08-11 22:01:47 +02:00
Solderpunk
96cf8e13fe
ACTUALLY fix time conversion bug as attempted in 76d7d, grumble, grumble...
2020-06-14 12:28:34 +02:00
Solderpunk
097458754e
Bump version for development.
2020-06-13 23:42:36 +02:00