1
1
Fork
You've already forked libhurl
0
Relatively simple HTTP, HTTPS and Gopher client/file grabber library
  • C 89.2%
  • Makefile 5.9%
  • Roff 4.9%
2026年05月07日 08:05:21 +00:00
hurl_cli fix: hurl_cli makefile 2026年05月07日 08:05:21 +00:00
hurl.c fix: no FILE 2026年04月28日 10:17:58 +00:00
hurl.h feat: hurl.h comments 2026年04月28日 08:03:25 +00:00
libhurl.pc.in feat: pkgconfig file 2026年04月28日 16:29:43 +00:00
LICENSE Initial commit 2026年04月28日 09:35:16 +02:00
Makefile feat: mirror original hurl 2026年04月23日 06:41:37 +00:00
README feat: use posix make 2026年04月28日 08:57:14 +00:00

libhurl (based on https://git.codemadness.org/hurl)
----
Relatively simple HTTP, HTTPS and Gopher client/file grabber library.
Why?
----
Sometimes (or most of the time?) you just want to fetch a file via the HTTP,
HTTPS or Gopher protocol.
The focus of this tool is only this.
Dependencies
------------
- C compiler (C99).
- libc + some BSD functions like err() and strlcat().
- BearSSL
- libtls-bearssl
Build dependencies
---------------------
- POSIX make(1) (for Makefile).
Features
--------
- Uses OpenBSD pledge(2) and unveil(2). Allow no filesystem access (writes to
 stdout).
- Impose time-out and maximum size limits.
- Use well-defined exitcodes for reliable scripting (curl isn't great at this).
- Send as little information as possible (no User-Agent etc by default).
Anti-features
-------------
- No HTTP byte range support.
- No HTTP User-Agent.
- No HTTP If-Modified-Since/If-* support.
- No HTTP auth support.
- No HTTP/2+ support.
- No HTTP keep-alive.
- No HTTP chunked-encoding support.
- No HTTP redirect support.
- No (GZIP) compression support.
- No cookie-jar or cookie parsing support.
- No Gopher text handling (".\r\n").
- ... etc...
Get self-signed certificates of a host
--------------------------------------
To show the certificates of a host the following openssl command can be used.
This can be used to create a CA file also, useful for self-signed certificates:
	openssl s_client -showcerts -connect "codemadness.org:443" </dev/null | \
		sed -n '/^-----BEGIN CERTIFICATE-----/,/^-----END CERTIFICATE-----/p'