Go to file
Joris Vink fcb86ddb8b Massive rework of HTTP layer.
This commit is a flag day, your old modules will almost certainly
need to be updated in order to build properly with these changes.

Summary of changes:

- Offload HTTP bodies to disk if they are large (inspired by #100).
  (disabled by default)
- The http_argument_get* macros now takes an explicit http_request parameter.
- Kore will now throw 404 errors almost immediately after an HTTP request
  has come in instead of waiting until all data has arrived.

API changes:

- http_argument_get* macros now require an explicit http_request parameter.
  (no more magic invokations).
- http_generic_404() is gone
- http_populate_arguments() is gone
- http_body_bytes() is gone
- http_body_text() is gone
- http_body_read() has been added
- http_populate_post() has been added
- http_populate_get() has been added
- http_file_read() has been added
- http_file_rewind() has been added
- http_file_lookup() no longer takes name, fname, data and len parameters.
- http_file_lookup() now returns a struct http_file pointer.
- http_populate_multipart_form() no longer takes an secondary parameter.

New configuration options:

- http_body_disk_offload:
	Number of bytes after which Kore will offload the HTTP body to
	disk instead of retaining it in memory. If 0 this feature is
	disabled. (Default: 0)

- http_body_disk_path:
	The path where Kore will store temporary HTTP body files.
	(this directory does not get created if http_body_disk_offload is 0).

New example:

The upload example has been added, demonstrating how to deal with file
uploads from a multipart form.
2016-01-18 11:30:22 +01:00
conf Massive rework of HTTP layer. 2016-01-18 11:30:22 +01:00
examples Massive rework of HTTP layer. 2016-01-18 11:30:22 +01:00
includes Massive rework of HTTP layer. 2016-01-18 11:30:22 +01:00
src Massive rework of HTTP layer. 2016-01-18 11:30:22 +01:00
.gitignore Ignore DSYM on osx 2014-04-12 18:49:32 +02:00
.travis.yml Updated .travis.yml to use new container-based infrastructure. 2015-10-18 14:26:44 +02:00
LICENSE Bump copyright to 2016. 2016-01-04 12:58:51 +01:00
Makefile Kill off zlib_dict.c 2015-12-04 14:11:37 +01:00
README.md Introduce NOHTTP=1 build option. 2015-11-27 16:22:50 +01:00

README.md

About

Build Status

Kore (https://kore.io) is an easy to use web application framework for writing scalable web APIs in C. Its main goals are security, scalability and allowing rapid development and deployment of such APIs.

Because of this Kore is an ideal candidate for building robust, scalable and secure web things.

Features

  • Supports SNI
  • Supports HTTP/1.1
  • Websocket support
  • Lightweight background tasks
  • Built-in parameter validation
  • Only HTTPS connections allowed
  • Multiple modules can be loaded at once
  • Built-in asynchronous PostgreSQL support
  • Default sane TLS ciphersuites (PFS in all major browsers)
  • Load your web application as a precompiled dynamic library
  • Modules can be reloaded on-the-fly, even while serving content
  • Event driven (epoll/kqueue) architecture with per CPU core workers

License

  • Kore is licensed under the ISC license

Platforms supported

  • Linux
  • OpenBSD
  • FreeBSD
  • OSX

See https://kore.io/doc/#requirements for more information.

Latest release

Old releases

Building Kore

Requirements

  • openssl (latest is always the safest bet, right?) (note: this requirement drops away when building with NOTLS=1 NOHTTP=1)

Requirements for background tasks (optional)

  • pthreads

Requirements for pgsql (optional)

  • libpq

Normal compilation and installation:

# cd kore
# make
# make install

If you would like to build a specific flavor, you can enable those by setting a shell environment variable before running make.

  • TASKS=1 (compiles in task support)
  • PGSQL=1 (compiles in pgsql support)
  • DEBUG=1 (enables use of -d for debug)
  • NOTLS=1 (compiles Kore without TLS)
  • NOHTTP=1 (compiles Kore without HTTP support)

Example libraries

You can find example libraries under examples/.

The examples contain a README file with instructions on how to build or use them.

I apologize for unclear examples or documentation, I am working on improving those.

Bugs, contributions and more

If you run into any bugs, have suggestions or patches please contact me at joris@coders.se.

More information can be found on https://kore.io/