1
0
mirror of https://git.kore.io/kore.git synced 2024-11-12 13:19:12 +01:00
Commit Graph

771 Commits

Author SHA1 Message Date
Geenz
6e52c31d59 Include .cpp files when building.
This probably isn't an ideal way to add support for also compiling C++ in a project, but for now it works for my needs.
2015-03-31 03:17:33 -04:00
Joris Vink
b234b7ed65 Add HTTP_REQUEST_RETAIN_EXTRA flag to http_request
Signals Kore to not free any pointer set in req->hdlr_extra.
Useful in certain scenarios where you have data per request
bound to something in memory but do not want to lose it when
the request is freed by Kore.

Set this flag before your handler returns.
2015-03-27 23:23:21 +01:00
Joris Vink
eb235b3e01 shmat() returns (void *)-1 upon error. 2015-03-25 19:42:24 +01:00
Joris Vink
dbad4e7160 move towards 1.2.2-rc1 2015-03-17 09:34:33 +01:00
Joris Vink
a4a86494b8 Bring net_recv_expand() in line with others. 2015-03-16 16:52:40 +01:00
Joris Vink
a4298206a7 Fix lies in fatal message. 2015-03-16 16:50:33 +01:00
Joris Vink
ad5d662556 Use net_recv_reset() if more body bytes are coming.
Unbreaks clients that send the headers first and the
actual HTTP body after X amount of time.
2015-03-16 16:45:13 +01:00
Joris Vink
f8a9ece9a6 Set the x509 callback when initializing the SSL_CTX.
While here, fix a format string error.
2015-02-20 10:49:14 +01:00
Joris Vink
f975453565 Set X509 verification callback and log errors.
When using client certificates Kore now calls
domain_x509_verify() and logs any certificate
verification errors that might occur.

CRL validity errors are ignored.
2015-02-20 10:43:31 +01:00
Joris Vink
0288902a1b Set crlfile to NULL when initializing. 2015-02-20 10:11:15 +01:00
Joris Vink
91c44af6f0 Always include includeSubDomains for HSTS. 2015-02-10 17:14:07 +01:00
Joris Vink
1507f88ec7 Respect keepalive when throwing HTTP errors.
Report from github issue #34
2015-02-06 10:59:15 +01:00
Joris Vink
6d90291405 Set rootdir earlier in cli_create(). 2015-02-06 09:02:52 +01:00
Joris Vink
be96a93f9e Add missing ssl_dhparam to all example configs. 2015-02-06 09:02:29 +01:00
Joris Vink
12c07b79e6 Kill a warning when building with BENCHMARK 2015-02-04 19:40:49 +01:00
Joris Vink
6eec8166c6 "request" auth blocks should set their own response. 2015-02-04 12:04:07 +01:00
Joris Vink
2049bc72dc By default Kore now uses ECDH/DHE for TLS key exchanges.
This commit disables RSA key exchanges for TLS completely, while
introducing the requirement for always having DH parameters (ssl_dhparam).

Judging from ciphersuites most modern browsers now prefer this
change should be more than ok.
2015-02-03 13:17:59 +01:00
Joris Vink
b1e5a806a6 No need to assign ret when failing here. 2015-01-19 15:32:52 +01:00
Joris Vink
67efb9b04a better brackets around some if statements. 2015-01-19 15:31:36 +01:00
Joris Vink
2ee72657e1 Brackets would be great here. 2015-01-19 15:26:53 +01:00
Joris Vink
aaf00e92f8 add version correctly 2014-12-12 19:48:31 +01:00
Joris Vink
bb7cfbf08c Add 1.2.1-release to README 2014-12-12 19:47:51 +01:00
Joris Vink
b6658ef117 Bump to 1.2.1-develop 2014-12-12 19:36:56 +01:00
Joris Vink
6005c95ee6 Fix compiling under openbsd 2014-12-12 19:09:44 +01:00
Joris Vink
d9e2eb7a65 Bump to 1.2.1-release 2014-12-12 18:59:08 +01:00
Joris Vink
dbe301e58c Add a patch level to our version number. 2014-12-12 13:06:41 +01:00
Joris Vink
182126080e Merge pull request #25 from apfohl/prefix
Added ability to set path prefix during make.
2014-12-12 12:40:44 +01:00
Andreas Pfohl
24e1d3928d Added ability to set path prefix during make. 2014-12-12 10:15:30 +01:00
Joris Vink
c494126720 Make worker_clients available everywhere. 2014-12-03 20:40:44 +01:00
Joris Vink
7b286f2f70 Set correct timeout start for websockets 2014-11-25 20:00:33 +01:00
Joris Vink
8fe16c193a Link with -lcrypto even for BENCHMARK 2014-11-24 11:31:50 +01:00
Joris Vink
ffe3fdc49d Add websocket mention 2014-11-24 11:11:01 +01:00
Joris Vink
1a680d8d09 Remove lingering diff file 2014-11-24 11:09:19 +01:00
Joris Vink
f867882f43 Add websocket support to Kore.
Introduces a few new api functions:

- kore_websocket_handshake(struct http_request *):
	Performs the handshake on an HTTP request (coming from page handler)

- kore_websocket_send(struct connection *, u_int8_t, void *, size_t):
	Sends data to a websocket connection.

- kore_websocket_broadcast(struct connection *, u_int8_t, void *, size_t, int):
	Broadcast the given websocket op and data to all connected
	websocket clients on the worker. Note that as of right now
	the WEBSOCKET_BROADCAST_GLOBAL scope option does not work
	yet and messages broadcasted will be restricted to workers
	only.

- kore_worker_websocket_broadcast(struct connection *, void *, void *):
	Backend function used by kore_websocket_broadcast().
	Could prove useful for developers to have access to.

A simple example is given under examples/websocket.

Known issues:
	Kore does not support PING or CONT frames just yet.
2014-11-24 11:08:34 +01:00
Joris Vink
ac4222e929 Proper use of kore_strtonum64(). 2014-11-24 10:39:38 +01:00
Joris Vink
a1e6588085 Repopulate now when we are doing idle timer checks.
Otherwise in a weird scenario the idle timer could
be started with a more recent time then the time we
test against causing a connection to disconnect
before its idle timer was over.
2014-11-21 16:38:23 +01:00
Joris Vink
9184257d97 Properly order linker arguments.
Fixes broken linkages with LDFLAGS on certain platforms see #23.
2014-11-19 14:20:31 +01:00
Joris Vink
280cd6791e bump README 2014-11-07 17:19:41 +01:00
Joris Vink
0f2a6271b9 Bump readme 2014-11-07 09:14:53 +01:00
Joris Vink
a4d50d3ddf Remove the my_callback example. Deprecated. 2014-10-31 10:14:47 +01:00
Joris Vink
b1797231cc Properly error out in HTML5 video streaming. 2014-10-31 10:13:45 +01:00
Joris Vink
27b4447a30 Allow workers to bind to specific CPUs on FreeBSD. 2014-10-26 22:41:55 +01:00
Joris Vink
9512805c04 spacing 2014-10-26 22:11:13 +01:00
Joris Vink
6de0f8568a Rework net, worker and some http internals.
- The net code no longer has a recv_queue, instead reuse same recv buffer.
- Introduce net_recv_reset() to reset the recv buffer when needed.
- Have the workers spread the load better between them by slightly
  delaying their next accept lock and giving them an accept treshold
  so they don't go ahead and keep accepting connections if they end
  up winning the race constantly between the workers.
- The kore_worker_acceptlock_release() is no longer available.

- Prepopulate the HTTP server response header that is added to each
  response in both normal HTTP and SPDY modes.
- The path and host members of http_request are now allocated on the heap.

These changes overall result better performance on a multicore machine,
especially the worker load changes shine through.
2014-10-22 21:16:49 +02:00
Joris Vink
0e8bdf38c4 Indenting police 2014-10-22 20:50:32 +02:00
Joris Vink
0d17d2228c Bring ktunnel example client in line with reality 2014-10-22 19:00:48 +02:00
Joris Vink
ffe94ff585 KORE_LDFLAGS is no more. 2014-10-22 18:48:43 +02:00
Joris Vink
b9445e84ca Use the right ssl_ctx 2014-10-22 18:44:31 +02:00
Joris Vink
217b2749f9 Merge pull request #22 from thorduri/master
Simplify environment variables, abide by POLA.
2014-10-22 18:32:36 +02:00
Thordur Bjornsson
e980dcdd5c Simplify environment variables, abide by POLA.
KORE_COMPILER => CC
KORE_LDFLAGS => LDFLAGS
2014-10-22 17:44:43 +02:00