Commit Graph

13 Commits

Author SHA1 Message Date
Omar Polo dd3f04b227 titan: accept either one or two positional arguments 2024-01-08 08:39:18 +00:00
Omar Polo fd48b7c0c4 titan: usage and exit on unknown flags 2024-01-08 08:38:47 +00:00
Omar Polo 5d38e5d88d titan: clean up IRI/URI/URL mess; it's a IRI what we parse 2023-08-04 10:02:18 +00:00
Omar Polo 11ff7f934e titan: error if the URI is not titan:// 2023-08-04 10:01:18 +00:00
Omar Polo d671434bc7 titan: better logging for unexpected EOFs
upon an unexpected EOF, tls_error() returns NULL, so log the real
reason iomux returned -1.
2023-08-04 09:57:27 +00:00
Omar Polo 5905156665 titan: rename parse_err to errstr 2023-08-04 09:53:18 +00:00
Omar Polo 1b1a6fb7ee titan: iomux: return -1 on EOF without receving anything
otherwise it enters an infinite loop where it tries to read, return
zero, and tries again...
2023-08-04 09:52:27 +00:00
Omar Polo fcc5a371b1 titan: fix appending of path parameters
the parameters need to be added at the end of the path, not at the
end of the URL.
2023-08-04 09:49:01 +00:00
Omar Polo 3927336855 titan: parse the response code and exit accordingly
Exit with 0 if the response code was in the 2x or 3x range, or with
2 for other codes.  It already exits with 1 upon any other error
(including parsing errors.)

Print the redirect code on 3x to stdout and the meta to stderr for
the 1x, 4x, 5x and 6x ranges.
2023-07-24 09:56:37 +00:00
Omar Polo 32b1638ebc run tls_connect_socket() after dropping the "inet dns" pledge promises 2023-07-24 09:28:01 +00:00
Omar Polo 9888507cd4 read from stdin if no file is given 2023-07-24 09:28:01 +00:00
Omar Polo da3fc66ee8 titan: add compat shims to compile on !OpenBSD 2023-07-22 15:50:22 +00:00
Omar Polo 2ff1e2a923 add titan(1) -- a draft titan client 2023-07-22 15:47:02 +00:00