| v0.3.5 |
| - Added evhtp_request_t accessors |
| |
| evbuf_t * evhtp_request_get_input(evhtp_request_t *); |
| evbuf_t * evhtp_request_get_output(evhtp_request_t *); |
| evbase_t * evhtp_request_get_evbase(evhtp_request_t *); |
| evserv_t * evhtp_request_get_listener(evhtp_request_t *); |
| evhtp_method evhtp_request_get_method(evhtp_request_t *); |
| evhtp_proto evhtp_request_get_proto(evhtp_request_t *); |
| evhtp_conn_t * evhtp_request_get_conn(evhtp_request_t *); |
| evhtp_hdrs_t * evhtp_request_get_headers_in(evhtp_request_t *); |
| evhtp_hdrs_t * evhtp_request_get_headers_out(evhtp_request_t *); |
| evhtp_callback_cb evhtp_request_get_cb(evhtp_request_t *); |
| void * evhtp_request_get_cbarg(evhtp_request_t *); |
| int evhtp_request_get_sock(evhtp_request_t *); |
| const char * evhtp_request_get_path(evhtp_request_t *); |
| const char * evhtp_request_get_uri(evhtp_request_t *); |
| const char * evhtp_request_method_str(evhtp_request_t *); |
| int evhtp_request_get_matched_soff(evhtp_request_t *); |
| int evhtp_request_get_matched_eoff(evhtp_request_t *); |
| int64_t evhtp_request_get_content_length(evhtp_request_t *); |
| |
| - Better callback return error and response handling. |
| * Callbacks which return an evhtp_res code now must use |
| EVHTP_RES_*, where each EVHTP_RES_* definition is a HTTP |
| status code. For example "return EVHTP_RES_400;" will |
| send a 404 error to the client, along with terminating |
| the parser. |
| |
| - All static functions prefixed with _htp_* are now just static htp_ |
| - Various small bugfixes. |
| |
| v0.3.4 |
| - Added optional OpenSSL support (with optional threading abstractions). |
| * In order to properly enable SSL for your server two things must happen: |
| evhtp_ssl_cfg structure must be filled with your settings: |
| |
| evhtp_ssl_cfg scfg = { |
| .pemfile = ssl_pem, |
| .privfile = ssl_pem, |
| .cafile = ssl_ca, |
| .ciphers = "RC4+RSA:HIGH:+MEDIUM:+LOW", |
| .ssl_opts = <SSL SPECIFIC FLAGS>, |
| .enable_scache = 1, |
| .scache_timeout = 1024, |
| .scache_init = evhtp_ssl_scache_builtin_init, |
| .scache_add = evhtp_ssl_scache_builtin_add, |
| .scache_get = evhtp_ssl_scache_builtin_get, |
| .scache_del = NULL, |
| }; |
| * please note that .scache_init, .scache_add, .scache_get, and .scace_del |
| are function points to allow for a user to define their own session cache |
| mechanism. Libevhtp has a few default built-in cache functions: |
| evhtp_ssl_scache_builtin_init, |
| evhtp_ssl_scache_builtin_add, |
| evhtp_ssl_scache_builtin_get, |
| evhtp_ssl_scache_builtin_del |
| |
| Another side note here is that currently the builtin functions do not expire, |
| this will be fixed in the next beta-release. |
| |
| * The second step is to enable the use of the SSL backend by calling |
| evhtp_use_ssl(evhtp_t *, evhtp_ssl_cfg *); |
| |
| - Regular expression based path callback functions added: |
| evhtp_set_regex_cb(evhtp_t *, "^(/path_w_regex/).*", callback, args); |
| |
| Using the case above, any path/uri in the request with /path_w_regex/*, the API |
| will execute your defined callback function. The output of which is the same as |
| any other defined callback. |
| |
| - Added _htp_callbacks_find_callback_woffsets(), which (if regex) will set 2 integer |
| variables in the evhtp_rquest_t structure defining the beginning and end of a matched |
| URI/path. |
| |
| - _htp_callback_new() has been modified to create regex based evhtp_callback_t's |
| |
| - Made the evhtp_request_t structure private, various get/set functions have been added |
| to deal with the internals. |
| |
| - Modified compile to support libonigurmura, a BSD licensed cross-platform regular expression |
| library. Currently this is only used to support posix regex functionality. |