Joris Vink
da13e1e768
undef _POSIX_C_SOURCE and _XOPEN_SOURCE before Python.h
2017-01-25 22:41:57 +01:00
Joris Vink
ef441fb9a1
bah, be gone.
2017-01-25 22:38:43 +01:00
Joris Vink
ff48aed926
initial python example.
...
don't look too much into this yet.
2017-01-25 22:38:06 +01:00
Joris Vink
21f9c29f31
style + move pyhttp_dealloc() into !KORE_NO_HTTP.
2017-01-25 22:33:39 +01:00
Joris Vink
f56938283d
Merge branch 'master' of github.com:jorisvink/kore
2017-01-25 22:23:34 +01:00
Joris Vink
38df26f59c
add first mentions of python support to README.
2017-01-25 22:22:05 +01:00
Joris Vink
5d09214591
only rebuild with "kore build" when we can.
2017-01-25 22:21:40 +01:00
Joris Vink
a9537bc6ec
add python flavor string to -v
2017-01-25 22:21:30 +01:00
Joris Vink
9976022a47
let python use kore backed memory allocators.
2017-01-25 22:07:58 +01:00
Joris Vink
e47806c669
allow memory allocators to deal with 0 bytes.
...
we just increase the lenght requested to 8 bytes if we get a 0 byte request.
additionally when kore_realloc() is called check if we actually have
to do the work, if not just return the original pointer.
2017-01-25 22:07:08 +01:00
Joris Vink
620cc231dc
validators now work in python.
2017-01-25 21:17:12 +01:00
Joris Vink
7c74a0824b
push all integers exported to python in a struct.
2017-01-25 20:56:57 +01:00
Joris Vink
bbcdec82fc
Add initial python support.
...
Based on work done by Stanislav Yudin.
2017-01-24 20:18:12 +01:00
Yorick de Wid
f7e8954609
BSD required AF_INET* headers ( #171 )
2017-01-18 22:24:49 +01:00
Joris Vink
98148155dc
bump copyright year
2017-01-18 10:27:44 +01:00
Joris Vink
a572cdbfa6
update copyright year
2017-01-18 10:27:40 +01:00
Joris Vink
2f8c173042
Improve ipv6 host parsing if we get a literal.
...
Fixes #169 .
2017-01-18 10:27:04 +01:00
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