910 Commits

Author SHA1 Message Date
Joris Vink
e9b56c81a5 Do not fatal if no listeners are defined. 2016-01-07 10:09:44 +01:00
Joris Vink
2f4387e0cd correct headers. 2016-01-07 09:24:45 +01:00
Joris Vink
07ed037a00 Reduce memory footprint for NOTLS builds. 2016-01-07 09:20:09 +01:00
Stig Telfer
18d3cc032d rename *_fini to *_cleanup 2016-01-04 21:40:14 +00:00
Joris Vink
2fc326c0ce Remove whitespace. 2016-01-04 13:09:45 +01:00
Joris Vink
c4b1206ae3 Bump copyright to 2016. 2016-01-04 12:58:51 +01:00
Joris Vink
a281fd5713 Introduce synchronous pgsql queries.
Semantics for using pgsql API have changed quite heavily
with this commit. See the examples for more information.

Based on Github issue #95 by PauloMelo (paulo.melo@vintageform.pt)
with several modifications by me.
2016-01-04 11:12:43 +01:00
Stig Telfer
223c5c4c28 net_send_queue: Handle case where new data exactly fits available buffer. 2015-12-29 22:07:24 +00:00
Stig Telfer
ac45e8cd62 Revert incorrect parameter validation 2015-12-29 21:29:35 +00:00
Stig Telfer
0c51d9da53 Add resource management as part of the kore shutdown process. 2015-12-29 19:39:39 +00:00
Joris Vink
8368f6d471 Updated comment section on worker_accept_threshold. 2015-12-20 11:21:40 +01:00
Joris Vink
6bfeb8e037 Clearify worker configuration directive. 2015-12-20 11:19:07 +01:00
Joris Vink
4356c3e628 Allow domain wildcards in the configuration. 2015-12-16 19:51:06 +01:00
Joris Vink
519c3c16d4 Do not run kore_split_string() on original cookie
This broke after http_request_header() started returning
a pointer to the actual header value instead of a copy.

Reminded by PauloMelo via github.
2015-12-14 18:48:48 +01:00
Joris Vink
5f7709211b Merge pull request #92 from PauloMelo/master
add kore_buf_reset
2015-12-11 23:41:52 +01:00
PauloMelo
a6ccf2bae9 correct tabsize 2015-12-11 22:31:14 +00:00
PauloMelo
d811bf71dc add kore_buf_reset 2015-12-11 21:31:59 +00:00
Joris Vink
8a6f4a935e Set handle function pointer for message callbacks. 2015-12-10 09:26:24 +01:00
Joris Vink
6ac15d37cb Make sure user agent is still set properly. 2015-12-10 09:25:22 +01:00
Joris Vink
c3401fe348 Make the TLS proxy example much better.
Now allows multiple backends based on SNI that was
set during TLS handshake.

The connection phase for the backends is now fully
non blocking.
2015-12-09 21:29:53 +01:00
Joris Vink
d3332d5921 Add kore_platform_schedule_write(). 2015-12-09 21:29:44 +01:00
Joris Vink
3c0cc79e6b More incompatible changes incoming, make it clear
Semver demands it.
2015-12-09 16:29:35 +01:00
Joris Vink
ef708bd3b7 Merge pull request #89 from Houdini/master
fix typo: -r for skip privs
2015-12-08 08:50:37 +01:00
Dmitrii Golub
3eaa325eb5 fix typo: -r for skip privs 2015-12-08 04:42:16 +03:00
Joris Vink
c95aac54a2 Merge pull request #87 from Houdini/master
Better CFLAGS and CFLAGS limit
2015-12-04 22:57:32 +01:00
Dmitrii Golub
ab391df7ff Better CFLAGS and CFLAGS limit 2015-12-04 17:16:56 +03:00
Joris Vink
d7bbb54424 Remove zlib.h 2015-12-04 14:12:06 +01:00
Joris Vink
b4611ee38d Kill off zlib_dict.c 2015-12-04 14:11:37 +01:00
Joris Vink
77364e49cd Do not call handle if not set, similar to bsd.c. 2015-12-02 21:57:16 +01:00
Joris Vink
1ed96b12a9 correct certificate path in example 2015-12-02 21:53:42 +01:00
Joris Vink
d02f9e549f Add TLS proxy example. 2015-12-02 21:52:26 +01:00
Joris Vink
961a2e3685 Allow apps to override connection handling.
Setting the handle callback allows your application
to take care of network events for the connection.

Look at the connection state and flags to determine
if read/write is possible and go from there.

See kore_connection_handle() for more details.
2015-12-01 20:55:00 +01:00
Joris Vink
428802afc8 More cleanup after introducing NOHTTP=1.
* The cli tools must know when building as KORE_NO_HTTP.
* Reshuffle some structs around to avoid forward declarations.
* Move wscbs under !KORE_NO_HTTP as its for websockets.
* Remove unused members from struct connection.

Applications that use the connect callbacks for new connections
must now set the connection state themselves, see nohttp example.
2015-11-30 16:23:34 +01:00
Joris Vink
4fd6d8a7a4 Correct usage of http_request_header().
Since latest change we no longer need free its result.
2015-11-29 17:22:30 +01:00
Joris Vink
7bdae240cf Change semantics for http_request_header().
The result returned by this function no longer needs to
be freed by the caller.
2015-11-29 14:19:44 +01:00
Joris Vink
948dafb19c Unbreak SSE example after latest changes. 2015-11-27 18:26:30 +01:00
Joris Vink
fd52d4c39d Spacing 2015-11-27 18:12:08 +01:00
Joris Vink
e576240e2b Remove spdy references 2015-11-27 16:31:52 +01:00
Joris Vink
769c78a6e8 Introduce NOHTTP=1 build option.
This basically turns off the HTTP layer for Kore. It does not
compile in anything for HTTP.

This allows Kore to be used as a network application platform as well.
Added an example for this called nohttp.

Other changes that sneaked in while hacking on this:
* Use calloc(), kill pendantic malloc option.
* Killed off SPDY/3.1 support completely, will be superseded by http2

Note that comes with massive changes to a lot of the core API
functions provided by Kore, these might break your application.
2015-11-27 16:22:50 +01:00
Joris Vink
a88e56ae25 Do not call TAILQ_INIT() on domain list twice. 2015-11-27 11:15:36 +01:00
Joris Vink
963bdfdb2c Move towards 1.3.0-devel target, skipping 1.2.4.
Mostly done due to incoming library changes.
2015-11-12 09:20:14 +01:00
Joris Vink
036a4e4d3c NOTLS means no tls, not no openssl. 2015-11-05 09:18:14 +01:00
Joris Vink
cc2e317d30 Merge pull request #82 from fourdollars/master
Fix typos.
2015-11-04 08:53:25 +01:00
Shih-Yuan Lee (FourDollars)
384ac824ee Fix typos. 2015-11-04 09:54:55 +08:00
Joris Vink
0b0ba0f6f5 Manually add cpipe to connection list in example. 2015-10-23 12:13:23 +02:00
Joris Vink
02c667e940 Merge pull request #77 from apfohl/apfohl-travis
Updated .travis.yml to use new container-based infrastructure.
2015-10-19 08:47:16 +02:00
Andreas Pfohl
6dba32c66c Updated .travis.yml to use new container-based infrastructure. 2015-10-18 14:26:44 +02:00
Joris Vink
656931380c Bump to 1.2.4-rc1 2015-09-17 12:33:40 +02:00
Joris Vink
b5736ef158 Unbreak ktunnel example after recent changes. 2015-09-03 08:24:55 +02:00
Joris Vink
63dc498807 Unbreak the sse example. 2015-08-06 08:21:28 +02:00