aboutsummaryrefslogtreecommitdiff
path: root/gg.c
AgeCommit message (Collapse)Author
2024-08-03gg: support IPv6 addresses in -POmar Polo
2024-06-10gg: use snprintfOmar Polo
2024-05-29gg: unbreak -nOmar Polo
2024-05-29gg: add -q to avoid printing "Server says"Omar Polo
2023-10-18gg: prepend "Server says" to the reply codeOmar Polo
2023-10-18gg: print the response header for non-2x replies to standard errorOmar Polo
2023-10-15gg: exit with the gemini response codeOmar Polo
0 is still used for 2X replies, and "external" failures (e.g. network, tls, ...) are still using exit code 1. Gemini non-2x replies now get their response code reported as-is as status code.
2023-10-14copyright#Omar Polo
2023-07-23revert previousOmar Polo
Somehow the compat for __dead is not working properly on macos (cirrus ci) since it complains that parse_debug() does not return a value in all control paths when it uses usage() (marked as __dead) to catch a wrong usage.
2023-07-22use __dead instead of __attribute__((noreturn))Omar Polo
2023-07-22gg: warn when the TLS layer is not closed properlyOmar Polo
various servers are not handling correctly the close notify so for the moment don't turn this into an hard error but just warn. Hopefully, given some time, most servers will be fixed. while here, drop the gotos and just use a break to exit the main loop.
2023-06-13avoid arithmetic on void pointers (GNU extension)Omar Polo
not really sold on this one, I don't see what other interpretation could be given, but it's not standard so...
2023-06-06call setlocale()Omar Polo
2022-11-17always cast is*() arguments to unsigned charOmar Polo
2022-10-30remove -v from ggOmar Polo
undocumented flag to dump to stdout the request before doing it. Not useful, it's debugging leftover.
2022-09-10specify custom version strings for the various cmdsOmar Polo
2022-01-27s/whole/allOmar Polo
2022-01-13shuffle the code a bit to improve readabilityOmar Polo
2022-01-13fix and sync gg usageOmar Polo
2021-12-29reimplement ggOmar Polo
This is a better version of gg. Initially it grew with flags directly needed to the specific test cases I wanted to write, so it's ugly to use but handy for tests. This is a new and re-thought implementation that it is (hopefully) easier to use both and "curl-like for gemini" but also for scripts and tests cases. One completely new feature is the proxying support with -P to send the request to the given host.
2021-05-24move gg to regressOmar Polo
2021-02-12fix various compilation errorsOmar Polo
Include gmid.h as first header in every file, as it then includes config.h (that defines _GNU_SOURCE for instance). Fix also a warning about unsigned vs signed const char pointers in openssl.
2021-02-09gg: add support for client certsOmar Polo
2021-01-27customizable servname & verbose + misc tweaksOmar Polo
* add -H for explicit servname (for SNI) * add -v to print also the request * misc tweaks: move *flag variables to global scope (initialisation to 0 for free!) and explicit handshake.
2021-01-23reuse the same buffer for the request and responseOmar Polo
2021-01-23handle TLS_WANT_POLL{IN,OUT}Omar Polo
libtls doesn't seem to return when doing blocking I/O, but libretls does every single time.
2021-01-23don't alter the struct iriOmar Polo
2021-01-23add gg, a barebones Gemini clientOmar Polo