Yorick de Wid
86d85dd10b
Message shutdown request ( #168 )
...
* Set server version
* Message shutdown request
* Update messaging example
* Set server verion in generic example
* Allow shutdown with NOHTTP=1
2017-01-17 18:18:01 +01:00
Yorick de Wid
565bf5bdec
Set server version ( #157 )
2017-01-13 13:03:47 +01:00
Joris Vink
57840a8366
Deal with the Host header in a way IPv6 hosts work
...
Fixes #164 .
2017-01-11 11:01:58 +01:00
Joris Vink
10929189a0
make sure we can call pgsql_conn_cleanup() properly.
2017-01-10 15:29:03 +01:00
Manuel Kniep
ec5e93010f
add missing includes ( #163 )
...
to make includes order independent
2017-01-07 23:07:34 +01:00
Joris Vink
f5ad76a2c3
better description.
2016-12-29 20:15:01 +01:00
Joris Vink
fe7237fd74
Take over linker from env if present.
2016-12-29 20:14:16 +01:00
Joris Vink
6faed21a24
Revert "Invoke platform alternatives #158 ( #160 )"
...
This reverts commit 857a3cfb79a6d79b24e100a9fcf22f1b3b25b78e.
2016-12-29 20:12:46 +01:00
Yvan Sraka
857a3cfb79
Invoke platform alternatives #158 ( #160 )
2016-12-28 09:29:13 +01:00
Joris Vink
c16461c6c1
adjust format after changing it earlier.
2016-12-27 09:45:27 +01:00
Joris Vink
be5d1f310f
initialize mime_types when swapping flavors as well.
2016-12-27 09:39:06 +01:00
Joris Vink
8b528e0334
Add asset_sha1_* and asset_serve_* to assets.h.
2016-12-27 09:22:13 +01:00
Joris Vink
4f9044c6e0
fix count in kore_pgsql_query_params().
...
should fix #159 .
2016-12-27 09:10:31 +01:00
Joris Vink
31d14d028a
add compile-time configurable mime types.
...
these types are used for the new builtin asset_serve_* functions.
must be defined in conf/build.conf.
2016-12-26 23:37:05 +01:00
Joris Vink
d783a1d22d
Add auto generated serving functions for assets.
...
These functions are created by the cli tool when building
and follow the naming format: asset_serve_<name>_<ext>().
Those serving functions can be used directly in handlers and
callthrough to a http_serveable() function that uses the SHA1
of the asset as its ETag and automatically checks for if-none-match.
2016-12-26 21:15:03 +01:00
Joris Vink
facc8b9d6c
set req->owner to NULL when the connection removes it.
2016-12-26 20:08:53 +01:00
Joris Vink
543a329ef6
run the connection timeout test per event loop.
2016-12-26 20:03:01 +01:00
Joris Vink
194b575ebf
Add SHA1 digests for assets.
2016-12-22 19:44:35 +01:00
Joris Vink
583d75edcb
remove unneeded parenthesis.
2016-12-05 14:45:29 +01:00
Joris Vink
ae28f51d56
ERR_clear_error() in front of SSL_accept as well.
2016-12-05 14:44:58 +01:00
Joris Vink
cb13190e0d
Call ERR_clear_error() before SSL_read() and SSL_write() calls.
2016-12-05 14:24:22 +01:00
Joris Vink
16166d37bd
remove debug macro
2016-12-04 16:52:11 +01:00
Joris Vink
652833a979
set worker_active_connections to 0 always.
...
fixes a bug where if a worker died it contained garbled data...
2016-12-04 16:49:42 +01:00
Joris Vink
cb62a6a8a8
Clamp netwait to maximum 100ms.
2016-12-04 12:16:27 +01:00
Tobias Kortkamp
950977f2be
Fix fd leak in cli_buildopt_parse() ( #156 )
...
The build.conf file is left open when using kore run.
2016-12-01 09:01:51 +01:00
Tobias Kortkamp
7eced6f035
Fix #153 ( #155 )
...
Compiling with Clang 3.9 on FreeBSD raises the following error (see [1]):
```
src/pgsql.c:222:17: error: passing an object that undergoes default argument promotion to 'va_start'
has undefined behavior [-Werror,-Wvarargs]
va_start(args, count);
^
src/pgsql.c:217:45: note: parameter of type 'u_int8_t' (aka 'unsigned char') is declared here
const char *query, int result, u_int8_t count, ...)
```
More information about this warning can be found on [2].
To solve this we can change the type of `count` to `int` in
`kore_pgsql_query_params()` and `kore_pgsql_v_query_params()`. This
also matches the signatures of both `PQexecParams()` [3] and
`PQsendQueryParams()` [4].
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214639
[2] https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start
[3] https://www.postgresql.org/docs/9.2/static/libpq-exec.html
[4] https://www.postgresql.org/docs/9.2/static/libpq-async.html
2016-11-19 12:56:51 +01:00
Joris Vink
5b379a9185
add a kore_preload() call for single binaries.
...
This is run on the parent before workers are spawned.
2016-11-17 10:05:16 +01:00
Joris Vink
5abb56d6fb
remove unused define.
2016-11-04 09:21:09 +01:00
Joris Vink
5e1cb53f13
use a copy of args when falling back to vasprintf.
2016-11-04 09:16:05 +01:00
Joris Vink
552d59248c
constify delim in kore_split_string().
2016-10-06 16:50:41 +02:00
Joris Vink
4a72877f4e
count active connections properly
2016-10-06 16:50:02 +02:00
Tobias Kortkamp
c071d64bdd
Fix #144 . Always initialize va_list in kore_pgsql_query_params. ( #146 )
2016-09-05 16:22:46 +02:00
john721
f15558ed98
Fix no response in case kore was built with NOTLS=1. ( #142 )
2016-08-16 10:19:07 +02:00
Joris Vink
7d1d5329c9
Link to latest release.
2016-08-01 15:12:30 +02:00
Joris Vink
176bd204b2
Update README
2016-08-01 15:03:22 +02:00
Joris Vink
8b723479ec
bump
2016-08-01 15:01:19 +02:00
Joris Vink
a16348d524
Remove links to kore.io for releases
2.0.0-release
2016-08-01 09:59:32 +02:00
Joris Vink
c2dd274c40
update with latest
2016-08-01 09:41:12 +02:00
Joris Vink
441cc34f31
bump to release
2016-08-01 09:38:40 +02:00
Joris Vink
77adb35193
JSONRPC requires HTTP, let users figure that out the hard way.
2016-08-01 09:25:56 +02:00
Joris Vink
db4f6cf01f
align pointers from kore_malloc() properly.
2016-07-28 14:52:15 +02:00
Joris Vink
0b92afe53d
Explicitly set offset to 0 for http_file.
2016-07-27 16:43:05 +02:00
Joris Vink
46cee2ff46
Typo.
2016-07-15 22:34:21 +02:00
Joris Vink
f5923af1c6
Add /usr/local/[include|lib] for BSD / JSONRPC.
2016-07-15 22:33:58 +02:00
Joris Vink
6ba8dd439b
Merge pull request #135 from raphaelmonrouzeau/master
...
Add conditional JSON-RPC support
2016-07-15 22:25:52 +02:00
Raphaël Monrouzeau
06d9ca96da
JSONRPC Updated to last kore_buf* commit
2016-07-15 13:17:30 +02:00
Raphaël Monrouzeau
cd9ce057ea
JSONRPC Changed Makefile option location
2016-07-15 13:08:08 +02:00
Raphaël Monrouzeau
32ac27d4c3
JSONRPC Reverted explicit deallocation calls
...
The possibility to call jsonrpc_destroy_request was left. Someone may
want to abruptly interrupt the process of its request for some odd
reason, in that case an exlicit call still would be to be made.
2016-07-15 13:08:08 +02:00
Raphaël Monrouzeau
7a4e4223c4
JSONRPC If support compiled in log it at start
2016-07-15 13:08:08 +02:00
Raphaël Monrouzeau
a818555c96
JSONRPC use size_t to get in line with last commit
...
Kore now uses size_t for kore_buf and http_response() so response size
check is useless and u_int32_t variables should be converted.
2016-07-15 13:08:08 +02:00