Joris Vink
8f8ab92521
upon quit time, workers will not accept new connections but will
...
handle all outstanding http requests.
2013-06-04 13:43:11 +02:00
Joris Vink
0de28488a6
move from multithreads to single threaded worker processes.
2013-06-04 11:55:38 +02:00
Joris Vink
b65cc93426
allow handlers to return KORE_RESULT_RETRY. This will tell the worker to reschedule the page request again at the end of its list. (Allows module creators to write truely nonblocking modules).
2013-05-31 00:40:06 +02:00
Joris Vink
7dfa7e6ec0
be carefull when we reload the module to not reload it when workers are inside the module callbacks.
...
do this by implementing a pthread rwlock, and locking it for reading when going into a callback and locking it for writing when we need to reload the mod.
2013-05-31 00:06:54 +02:00
Joris Vink
fecbd058cb
rework the worker thread so there's actually time to schedule more then one request at a time on them.
2013-05-31 14:24:00 +02:00
Joris Vink
e428886e16
decrement the worker load on HTTP_REQUEST_DELETE
2013-05-31 13:30:51 +02:00
Joris Vink
bb4001d119
ok that was wrong, disconnect http clients whne we're done sending or upon error, not immediately after queueing everything.
2013-05-30 21:57:14 +02:00
Joris Vink
ca1c884e43
attempt to clear out send buffer before we shutdown ssl connection.
...
remove superfleaous debug
2013-05-30 21:39:01 +02:00
Joris Vink
ec5ac40706
wake up the workers once in a while to process anything that is waiting.
2013-05-30 20:55:50 +02:00
Joris Vink
f9b3cfcee4
reschedule events if we cannot lock the connection at the time being.
2013-05-30 20:38:25 +02:00
Joris Vink
9ad263e287
do not remove disconnected connections until we actually are ready to disconnect them.
2013-05-30 20:07:06 +02:00
Joris Vink
9243f409cc
move to a worker based threading approach where we delegate http requests to workers in a round robin basis (later this should be swapped to find the laziest worker and assign the request to that instead).
2013-05-30 19:36:42 +02:00
Joris Vink
8478d8df54
add chroot and runas directives so we can chroot and drop privilegs properly
2013-05-04 22:18:27 +02:00
Joris Vink
ce729010f7
- simplify header building using kore_buf_appendf() for normal HTTP requests.
...
- make sure we dont free nb->buf if its NULL. (semantics).
- remove some superfluffy debug.
- make sure we call [inflate|deflate]End when we dc a client that used zlib.
2013-05-04 20:44:16 +02:00
Joris Vink
088d877715
switch dynamic handlers to regex based patterns, much easier.
2013-05-29 14:29:46 +02:00
Joris Vink
0be748ee0f
use SSL_CTX_use_certificate_chain_file instead when loading certificates so we can properly use our intermediate authority.
2013-05-29 12:27:30 +02:00
Joris Vink
90588913d4
allow sending SIGHUP to kore, which will then reload its content module
2013-05-03 00:04:06 +02:00
Joris Vink
f61bbe8ff4
move buf stuff back into kore.h, wont need it separately
2013-05-02 15:14:00 +02:00
Joris Vink
84428f7133
move buf stuff into its own header, so we can use it in spdy.h
2013-05-02 14:55:57 +02:00
Joris Vink
60ed3e0fd2
the net qeueuing functions don't need to return status codes, simplifies a lot of other code that revolves around those.
...
prepare for POST support
2013-05-02 14:47:02 +02:00
Joris Vink
f1fa108f98
begin processing window_update messages
2013-05-02 10:10:03 +02:00
Joris Vink
364dc58219
rework disconnecting clients and fix bug where spdy ocnnections could segfault after disconnecting
2013-05-02 09:10:35 +02:00
Joris Vink
f46bba50ef
add very basic support for HTTP/1.1.
2013-05-02 03:51:04 +02:00
Joris Vink
5f983d575b
add flags to net_recv_queue() and net_send_queue(),.
...
NETBUF_CALL_CB_ALWAYS flag, calls the registered cb everytime data has
been received or sent.
2013-05-02 00:28:49 +02:00
Joris Vink
a228cdba0e
introduce kore_split_string() to properly split strings apart.
...
introduce kore_date_to_time() to conver http-date formatted strings to time_t.
2013-05-01 20:10:45 +02:00
Joris Vink
d9bbb0b1f1
initial module support
2013-05-01 16:03:48 +02:00
Joris Vink
a074258dcc
rework the way events trigger and the way we handle them. follow the manual for once, as edge trigger does not refire until we got an EAGAIN.
...
introduce net_send_flush() and net_recv_flush() for this purpose, we attempt to make as much headway as possible until we reach EAGAIN or until we can simply pickup again later.
should merge all the stuff in http_response() into a single send buffer, **out is in place in net_send_queue() for that purpose.
2013-05-01 13:43:47 +02:00
Joris Vink
d59847c448
SPDY works, we can serve content. Now for dynamic modules so we can
...
get stuff on the road.
TODO: add plain HTTP support if SPDY isnt working in the browser.
2013-05-01 12:23:21 +02:00
Joris Vink
848704f74b
lots of new stuff, including processing of http requests and an attempt
...
to build an initial spdy response (SYN frame + header block content).
2013-05-01 08:09:04 +02:00
Joris Vink
bb3b804222
add beginnings of zlib inflation, not really working. nap time.
2013-04-29 23:35:36 +02:00
Joris Vink
c8b422d29d
allow us to expand receive buffers automatically so we can keep chaining data into the same netbuf. This gives us the possibility to retain the ctrl_frame by the time we reach the proper cb for the actual frame message.
2013-04-28 23:42:13 +02:00
Joris Vink
23c0ec67c6
begin with the ability to read control frames. something feels fishy with epoll() and its triggering of events. I probably got it wrong.
2013-04-28 19:11:44 +02:00
Joris Vink
c6c6b1823f
read next protocol properly and remember it for later.
2013-04-21 20:35:47 +02:00
Joris Vink
68d0523817
Add initial SSL stuff + bare bones NPN advertisement. So far chrome connects and
...
shows our connection as SPDY/3, good start.
2013-04-21 20:21:46 +02:00
Joris Vink
857c3f9121
first commit
2013-04-17 22:34:27 +02:00