You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Mid Favila 61415b6069 Remove redundant malloc+memset calls in favor of calloc. 2 days ago
src Remove redundant malloc+memset calls in favor of calloc. 2 days ago
CHANGES Touch up gopher support. Rewrite the main loop in main(). 2 days ago
LICENSE Rewrite main (again). Add Gopher support. Add TLS support. 1 week ago
README Touch up gopher support. Rewrite the main loop in main(). 2 days ago

README

What is it?
===========
Terrible attempt at writing a smaller replacement for cURL. Will include
a library in the future to make network operations in C convenient.

Why?
====
Because there weren't any HTTPS clients that were small, readable, and
portable with the features I needed. Also I needed to learn sockets.

Okay, but you should still use cURL in your other projects.
===========================================================
No, I shouldn't. cURL is huge, doesn't build with smaller compilers, and
has way too many features. Apportate is a cantrip, cURL is a level nine
spell.

What's apportate's featureset, anyway?
======================================
Right now, it retrieves data over HTTP or Gopher, and can support TLS,
at least when it comes to HTTPS. I'd like a more general approach to
TLS support in the future.

Its source code is small (< 400 lines of C total according to cloc right
now) and uses only POSIX routines -- there's no temptation to use GNU
or BSD features because I develop against musl and tcc, and I don't even
have the Linux manpages on any of my systems.

Furthermore, it has a relatively well-modularized design, at least for
my current ability. It could be much better, if I had more experience,
but it's still quite easy to add support for new protocols. For example,
adding support for Gopher took me less than five minutes, and required
no real edits to main aside from a kludge to avoid seeking for an HTTP
response header terminator.

Apportate also aims to have actually useful diagnostics; that is,
compared to other tools, apportate aims to only provide useful error
output. In the case of success, it follows the Rule of Silence; on
unrecoverable errors, it aborts immediately. It supports multiple levels
of verbosity, and exposes almost all of its internals.

Its simple design and use should also make it relatively convenient
for inclusion in shell scripts.