Releases: pascal-fb-martin/echttp
Bug fixes, static analysis checks, minor refactoring
This release includes the following changes:
- Fix a bug when the received request comes in multiple packets.
- Run static analysis and fix some security issues.
- Split echttp_catalog.c to provide a generic and reusable hash table module.
- Ignore SIGPIPE..
- Rely more on OpenSSH defaults.
- Give access to the latest echttp error (for logging purpose).
HTTPS client & more flexible resource allocation
- Support for HTTPS client (automatically activated when using a "https://.." URL).
- Add new API functions: echttp_forget(), echttp_json_estimate(), echttp_xml_estimate().
- Number of clients is now determined by the kernel file descriptor limit, with lazy allocation of context as needed.
- Minor XML attribute fix (well.. improvement, not yet fully compliant to any official syntax).
Additional features to support HouseSprinkler and HousePortal
This release contains the following improvements:
- Support for IPv6 (IPv4 is still supported).
- A simple API for the application to overwrite the echttp default options. This is mostly used to force the dynamic port mechanism as the default in applications designed to work with HousePortal.
- support a global protect callback. This was created to support CORS (see below)
- API extension to handle CORS mechanism: allow restricted cross-origin requests.
Bug fixes (mostly)
Bug fixes:
- Install the XML parser's header file.
- free the memory allocated by getaddrinfo().
- Accept both -name=value and --name=value in command line options, because I never remember which form to use.
XML Parser
This release contains the following changes:
- New XML parser. This is a minimal parser to decode simple XML content (e.g. RSS data). That parser piggybacks on the JSON parser environment and interfaces.
- Add function to load JSON or XML file to RAM, since this is needed in multiple applications when loading configuration data.
- Fix regression with file transfer (size counted twice) introduced with the HTTP client code.
- UTF-16 support tested for all cases.
UTF-16 bug fix
This release fix encoding and decoding bugs with UTF-16 escapes (\uXXXX)
JSON Parser & HTTP Client
This release contains new major feature additions:
-
JSON parser and generator functions. An echttp application can now decode JSON data, and the new library provides a method to generate JSON data that is easier to maintain that s long sequence or printf statements.
-
HTTP client: an echttp application may now issue HTTP requests to other web servers. The API is asynchronous. Conbined with the JSON parser above, this can be used to aggregate data from multiple web applications, as well as loading JSON configuration.
Full embedded web server implementation
This version provides a complete set of feature for a minimal web server. It is in active use in several applications: HouseClock, HouseSensor and HousePortal.
The major differences with previous versions are:
- multiple bug fixes.
- support transfer of static files up to 2 GB.
- add helper function to make it easier for application code (most common cases made simple)
- add base mechanism for implementing an access security mechanism
First version to have been embedded in an actual application
This release introduces a few changes to make the API and web site more usable:
- Add short hand functions to make common cases simpler for the application.
- Add background listener.
- Add special handling for the root URI, mapped to index.html found in any of the declared paths
- Some fixes to the documentation.
Fix security issue, minor API reorganization
This release provides three significant changes:
- Fix a security issue (did not check for ".." in path, opening access to the whole file system).
- Reorganize the files and build to separate the test code from the echttp implementation.
- Refactor echttp_static.c as an optional extension to echttp.c (remove dependency in echttp.c).
The last changes causes a small incompatibility in the echttp API that may requires an application code change. This only impacts applications using echttp_route static(), which becomes echttp_static_route() and requires to include echttp_static.h.