Joris Vink
712461b081
kore_buf_appendb(): free d once we are done with it.
2013-07-22 23:42:40 +02:00
Joris Vink
60ce2ce858
In kore_realloc() copy a minimum of old or new length bytes.
2013-07-22 22:44:42 +02:00
Joris Vink
dca6e58189
remove commented out debug defines.
2013-07-18 22:13:59 +02:00
Joris Vink
ba84a1a5e2
add osx and some flavor
2013-07-17 20:28:40 +02:00
Joris Vink
91b839f355
Add OSX support, buildable via "make osx".
...
Make sure you have OpenSSL 1.0.0d+ (available from Macports) installed.
Based on diff from Vaibhav Bhembre via github
2013-07-17 20:19:44 +02:00
Joris Vink
2c1352b226
remove versioning numbers, i hate them.
2013-07-16 15:30:20 +02:00
Joris Vink
341172f844
Do not 0 out everything we allocate, and instead fix the behaviour of the code in the appropriate places.
2013-07-16 09:56:36 +02:00
Joris Vink
19a05b0768
Remove stuff that was done
2013-07-16 09:49:26 +02:00
Joris Vink
ea0d314bd9
Bring down allowed http header size to 4K, perhaps should be tweakable?
2013-07-16 09:45:45 +02:00
Joris Vink
ae9fabb84f
No need to duplicate the received http buffer.
2013-07-16 09:33:46 +02:00
Joris Vink
ced1279f88
Properly calculate worker offset, otherwise we'll eventually run into trouble.
2013-07-15 11:24:49 +02:00
Joris Vink
1f938eb818
Only release accept lock when required.
2013-07-15 11:12:05 +02:00
Joris Vink
29fa49ba83
Add fixed size memory pools and use them throughout Kore.
2013-07-15 11:06:36 +02:00
Joris Vink
f54e7ace83
do not try to accept if accept has failed, but instead let kore continue
2013-07-13 22:24:00 +02:00
Joris Vink
cebd1c2c2b
Reduce footprint of meminfo and shuffle some stuff around
2013-07-13 22:19:50 +02:00
Joris Vink
51c8188f7a
remove cast for malloc + add missing stdlib.h
2013-07-13 21:47:04 +02:00
Joris Vink
9c7aaf179f
Remove unneeded malloc result casting, annoying habbit of mine but serves no purpose.
2013-07-13 21:08:55 +02:00
Joris Vink
94737a2a5f
If the idletimer expires for SPDY sessions use spdy_session_teardown()
...
to remove it gently.
2013-07-13 20:29:29 +02:00
Joris Vink
c999bf5001
Kore can now disconnect SPDY session if they've been idle too long.
...
Configurable via spdy_idle_time in your configuration file.
Setting this to 0 will keep SPDY sessions open indefinately.
2013-07-13 20:19:01 +02:00
Joris Vink
f59e94a7b6
Add spdy_session_teardown() which can properly teardown a SPDY session.
...
Use this throughout the spdy code to propagate session errors (if any) occur.
At the same time fix BSD's missing CONN_WRITE_BLOCK
2013-07-13 19:56:38 +02:00
Joris Vink
777cfda791
More stuff todo, woop.
2013-07-13 19:02:16 +02:00
Joris Vink
0fee1247c9
TAILQ_REMOVE() the netbuf before adding it to the HEAD of recv_queue again.
2013-07-12 15:49:49 +02:00
Joris Vink
2e3720abc9
free() -> kore_mem_free()
2013-07-12 10:49:37 +02:00
Joris Vink
5d0b82030d
Add FreeBSD
2013-07-11 23:01:54 +02:00
Joris Vink
9eb32e668e
use correct base64 alphabet (URL and Filename Safe Alphabet)
2013-07-10 15:04:01 +02:00
Joris Vink
bb09e8b2a9
add base64 encoder/decoder in prep for http/2.0 and websockets
2013-07-10 15:00:53 +02:00
Joris Vink
bb2d4903f2
remove NETBUF_RETAIN, no longer needed
2013-07-10 13:39:35 +02:00
Joris Vink
21a44589fc
If we already have all the POST data in the netbuf do not try and read more.
2013-07-10 13:34:42 +02:00
Joris Vink
0ebcbe4f18
Merge remote branch 'origin/master'
2013-07-10 10:38:52 +02:00
Joris Vink
36d603ea67
When negotiating the protocol to be used using the NPN extension keep in mind that http/1.1 can be given there as well. (Googlebot does this, and thus couldn't access Kore sites).
...
On top of that be extra careful with how many bytes we memcmp() if we receive data from the NPN extension.
This fix makes googlebot and anybody negotiating http/1.1 over NPN properly.
2013-07-10 10:37:37 +02:00
Joris Vink
9b1f0a3fab
add a skeleton framework for creating new modules.
2013-07-10 09:28:00 +02:00
Joris Vink
fa78d24948
remove WILLCLOSE, no longer needed
2013-07-09 15:23:33 +02:00
Joris Vink
94eee6a8d1
- Do not wrongly ignore WINDOW_UPDATE frames when a stream is still active.
...
- Only unblock a stream if it was actually blocked before.
2013-07-09 15:21:48 +02:00
Joris Vink
b0c67df902
fix a typo
2013-07-09 13:27:39 +02:00
Joris Vink
a17f93e896
Include sys/types.h and unistd.h for close(), getopt(), getpid(),
...
getuid(), setproctitle(), unlink() and declaration of optarg.
Makes Kore compatible with FreeBSD too.
From Ayan George <ayan@ayan.net>
2013-07-09 09:45:16 +02:00
Joris Vink
35b71353d5
update TODO list
2013-07-07 15:08:47 +02:00
Joris Vink
649e81afd7
use handler function name if available when logging a worker process that has died.
2013-07-07 14:56:50 +02:00
Joris Vink
95bacb5690
Kore will now keep track of page handlers that cause workers to die.
...
This is useful to track down any issues you might have in your module.
A log entry with a page handler causing issues looks like:
Jul 7 14:44:30 devbook kore[18191]: [parent]: worker 1 (18193)-> status 11
Jul 7 14:44:30 devbook kore[18191]: [parent]: worker 1 (pid: 18193) (hdlr: 0x242d9c0) gone
Jul 7 14:44:30 devbook kore[18191]: [parent]: hdlr serve_intro has caused 2 error(s)
2013-07-07 14:48:32 +02:00
Joris Vink
7df5339c8d
Properly fix bsd.c, sigh.
2013-07-06 21:05:17 +02:00
Joris Vink
354a3f1ad1
Fix header includes in the module example as well, from Ewan Higgs via github.
2013-07-06 21:00:48 +02:00
Joris Vink
c1723f2db5
Clean up header includes, based on a diff from Ewan Higgs via github.
...
And while we're messing in it, make sure bsd.c compiles again.
2013-07-06 20:55:22 +02:00
Joris Vink
bbc98cf2a7
Add MODULE_BUILD_DATE to static.h when building.
...
Contains %Y-%m-%d %H-%M-%S timestamp of when the module was built.
2013-07-06 18:07:06 +02:00
Joris Vink
1c8cfff1a9
add websocket support and more onto TODO list
2013-07-06 04:29:24 +02:00
Joris Vink
886c3920db
sysconf() returns -1 on failure, cpu_count is an unsigned integer, failure would never have been caught.
...
from cremno via github
2013-07-05 22:17:56 +02:00
Joris Vink
87d8fd784b
do not attempt to log the user-agent if it's not available.
2013-07-05 22:03:05 +02:00
Joris Vink
51efd84b6e
also set has_lock to 0 when a worker starts.
2013-07-05 21:17:08 +02:00
Joris Vink
e1183e22a6
If the worker that owns the accept lock dies, make sure the next one in line can grab it. Otherwise kore comes to a halt (by not accepting new connections).
2013-07-05 20:19:50 +02:00
Joris Vink
eb43fd31e1
remove unused stuff
2013-07-05 16:02:03 +02:00
Joris Vink
69df62f0ea
when receiving SETTINGS verify that the number of settings received by
...
the client matches the length of the SPDY frame we received.
Otherwise bad clients could potentially cause us to misbehave.
2013-07-01 12:34:18 +02:00
Joris Vink
0c08b57d3e
- add idle timer for normal connections (ie: !SPDY), max 20 seconds.
...
- use idle timer to make sure we don't block SPDY connections indefinately
when our window size has reached 0.
2013-07-01 12:08:51 +02:00