Commit Graph

13 Commits

Author SHA1 Message Date
styan 0fddfb0dfd Deduplicate error printing 2020-06-20 22:07:15 +00:00
styan 16a5bbc031 Replace strlcpy(3) with strncpy(3) 2020-06-20 11:26:48 +00:00
styan 7e7e35e5d4 Fix missing field in `gemini_init' 2020-06-20 08:39:28 +00:00
styan 5dcddc7077 Add `gemini_envinit', add proxy support, simplfy header handling
Add `gemini_envinit' which initializes some parts of the structure
from the environment.
Add proxy support in the form of a `proxy' field in the structure
that can hold a host string.
Simplfy header handling in `gemini_read', removing the
`GEMINI_STRICT' flag.
Add the `-h' option to gemini-cat(1) to set the proxy host.
Remove the `-e' option from gemini-cat(1).
Add environment variable support to gemini-cat(1), including
`GEMINI_TOFU_WRITE', which will set the corresponding flag.
2020-06-20 04:56:34 +00:00
styan 52a7ddb92c Re-allow line-feeds in META when in strict mode 2020-05-05 11:36:20 +00:00
styan d03242fd28 Allow for line-feed terminated responses
Also, remove old flags from the the `flags' list in `libgeminiclient.3'
2020-05-05 11:25:38 +00:00
styan 7f7cb29305 Fix compiling on Linux 2020-05-05 00:11:59 +00:00
styan 0f7e8cdb8c Fix the redirect counter 2020-05-01 09:43:04 +00:00
styan a96621e3fd Large refactoring and renaming
`gemini_open' is now `gemini_connect'
`gemini_close' is now `gemini_fini'
`gemini_connect' will try to use the `socketfd' struct member, if valid.
`gemini_read' now returns 0 whenever the response header has been read.
`gemini_read' no longer handles user-input (status 10) itself.
`gemini_connect_query' has been added so callers can handle user-input.
`libgeminiclient.c' no longer needs `readpassphrase' and `libbsd'.
2020-05-01 04:22:05 +00:00
styan df1d8b0518 Fix probable NULL dereference 2020-04-30 01:32:02 +00:00
styan fddb209549 Use TOFU even without a file 2020-04-29 10:24:17 +00:00
styan 15db86f766 Support URL's `:port' 2020-04-29 10:17:07 +00:00
styan f8f55b167c Initial commit 2020-04-29 05:03:38 +00:00