diff --git a/lib/llhttp/api.c b/lib/llhttp/api.c index 36f42fd..1a3bf7b 100644 --- a/lib/llhttp/api.c +++ b/lib/llhttp/api.c @@ -46,17 +46,23 @@ extern int wasm_on_url(llhttp_t* p, const char* at, size_t length); extern int wasm_on_status(llhttp_t* p, const char* at, size_t length); extern int wasm_on_header_field(llhttp_t* p, const char* at, size_t length); extern int wasm_on_header_value(llhttp_t* p, const char* at, size_t length); -extern int wasm_on_headers_complete(llhttp_t * p); +extern int wasm_on_headers_complete(llhttp_t * p, int status_code, + uint8_t upgrade, int should_keep_alive); extern int wasm_on_body(llhttp_t* p, const char* at, size_t length); extern int wasm_on_message_complete(llhttp_t * p); +static int wasm_on_headers_complete_wrap(llhttp_t* p) { + return wasm_on_headers_complete(p, p->status_code, p->upgrade, + llhttp_should_keep_alive(p)); +} + const llhttp_settings_t wasm_settings = { wasm_on_message_begin, wasm_on_url, wasm_on_status, wasm_on_header_field, wasm_on_header_value, - wasm_on_headers_complete, + wasm_on_headers_complete_wrap, wasm_on_body, wasm_on_message_complete, NULL, diff --git a/lib/llhttp/llhttp.h b/lib/llhttp/llhttp.h index 2ecba18..336234c 100644 --- a/lib/llhttp/llhttp.h +++ b/lib/llhttp/llhttp.h @@ -3,7 +3,7 @@ #define LLHTTP_VERSION_MAJOR 6 #define LLHTTP_VERSION_MINOR 0 -#define LLHTTP_VERSION_PATCH 2 +#define LLHTTP_VERSION_PATCH 4 #ifndef LLHTTP_STRICT_MODE # define LLHTTP_STRICT_MODE 0 diff --git a/uxplay.cpp b/uxplay.cpp index 1a987ba..8fe3b74 100755 --- a/uxplay.cpp +++ b/uxplay.cpp @@ -33,7 +33,7 @@ #include "renderers/video_renderer.h" #include "renderers/audio_renderer.h" -#define VERSION "1.32" +#define VERSION "1.33" #define DEFAULT_NAME "UxPlay" #define DEFAULT_DEBUG_LOG false @@ -355,7 +355,7 @@ int main (int argc, char *argv[]) { } running = true; while (running) { - if ((video_renderer_listen(video_renderer))||(had_connection&&(!open_connections))) { + if ((video_renderer_listen(video_renderer)) || (had_connection && !open_connections)) { stop_server(); LOGI("Re-launching server..."); goto relaunch;