Joris Vink
ff613f4665
Use SSL_OP_CIPHER_SERVER_PREFERENCE by default.
2013-08-07 20:42:19 +02:00
Joris Vink
bbfbfc4c61
add ssl_no_compression option to allow one to disable OpenSSL compression.
2013-08-07 16:59:45 +02:00
Joris Vink
429768ba37
Add ssl_dhparam
2013-08-07 16:55:13 +02:00
Joris Vink
04ee544982
Add support for ephemeral key exchange mechanisms, ssl_dhparam configuration option must be set (and point to a file containing a generated DH key).
2013-08-07 16:51:39 +02:00
Joris Vink
bb9f37f029
remove KORE_DEBUG define that sneaked in
2013-08-07 14:59:59 +02:00
Joris Vink
db7ed69f2a
Add kore_buf_replace_string().
...
kore_buf_replace_string allows you to replace occurances of a certain
string with something else.
Example:
char *username = "Joris";
page = kore_buf_create(static_len_html_profile);
kore_buf_append(page, static_html_profile, static_len_html_profile);
kore_buf_replace_string(page, "%name%", username, strlen(username));
2013-08-07 14:56:14 +02:00
Joris Vink
ef814a677d
Add http_argument_multiple_lookup() and http_argument_multiple_free().
...
Prototypes:
int http_argument_multiple_lookup(struct http_req *req,
struct http_arg *args);
void http_argument_multiple_free(struct http_arg *args);
These functions can be used to lookup arguments in a single call.
args points to an array of struct http_arg elements. Each of them
have the argument name set and its value set to NULL.
The array must have its last element name field set to NULL.
Upon return http_argument_multiple_lookup() gives the caller the
number of arguments that were successfully found. It makes their values
available under the value field in the struct http_arg array passed.
Example:
int v;
struct http_args args[4];
memset(args, 0, sizeof(args));
args[0].name = "email";
args[1].name = "password1";
args[2].name = "password2";
args[3].name = NULL;
v = http_argument_multiple_lookup(req, args);
if (v != 3) {
kore_debug("argument %s was not present", args[v].name);
} else {
for (v = 0; args[v].name != NULL; v++)
kore_debug("%s -> %s", args[v].name, args[v].value);
}
http_argument_multiple_free(args);
2013-08-07 14:41:16 +02:00
Joris Vink
6dbcb30eb9
properly calculate if we need to expand the header block in spdy_header_block_add().
2013-08-06 15:58:21 +02:00
Joris Vink
89f12a61e5
Add osx to makefile options.
...
From Vaibhav Bhembre via github
2013-07-28 20:02:01 +02:00
Joris Vink
d40bd805f5
s/support/supported
2013-07-28 19:25:46 +02:00
Joris Vink
3eb3665600
Detect right amount of cpu's available under osx. From Vaibhav Bhembre via github.
2013-07-28 19:21:49 +02:00
Joris Vink
659e19f92f
add IPv6 support and support for multiple listeners.
2013-07-27 20:56:15 +02:00
Joris Vink
20f02ced23
remove meminuse and list of allocated memory blocks, we don't need it.
2013-07-25 23:41:00 +02:00
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