|
This allows us to test the server side of the code as well as the client,
and also to make our tests more self-contained.
This splits out a lot of functions and some structs into common.[ch],
and moves all the C test code into tests/. To have a somewhat more
realistic test, the server keeps connections alive after a request, and
so the client has to judge the end of a response by a Content-Length
header. That in turn required the introduction of a growable buffer
to hold the headers, and some basic header parsing. So far only the
client parses Content-Length, and neither the client nor the server
fully supports connection reuse, but the scaffolding is there.
The server uses a local root, and the client is configured to trust that root.
|