Files
scylladb/http
Amnon Heiman f06c12e031 http: fix crash due to set_routes() not managing lifetime correctly
When using the set_routes with the registry builder, the shared_ptr of
the registry builder should be captured.

In the original implementation the api_registery_builder captured this
parameter, but as the shared_ptr was not captured it was deleted,
causing the http to crash when running in debug.

In this implementation the method that use the registry creates a lambda
function and inside it calls the set_api_doc method, this allows to
catch the shared_ptr so it lives until the function complete.

It also replaces the c style cast to static_cast and add a FIXME note to
the routes implementation, that handlers should be deleted to prevent
memory leak.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-04-26 13:09:26 +03:00
..
2015-04-05 11:39:48 +03:00
2015-03-08 21:55:57 +02:00
2015-03-30 15:38:41 +03:00
2015-03-30 15:38:41 +03:00
2015-03-30 15:38:41 +03:00
2015-03-08 21:55:57 +02:00
2015-03-08 21:55:57 +02:00
2015-03-08 21:55:57 +02:00
2015-03-08 21:55:57 +02:00
2015-03-30 15:38:41 +03:00