diff --git a/CHANGELOG.md b/CHANGELOG.md index e0d96631c..e7690ef07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This is a small bug fix release. ### Changelog +- Fix: Import of scripts - Fix: Lua wrapper for `mympd.api` - Fix: Emmit correct trigger event for INTERNAL_API_TRIGGER_EVENT_EMIT diff --git a/src/web_server/proxy.c b/src/web_server/proxy.c index f1aebbfe8..eb68c05e9 100644 --- a/src/web_server/proxy.c +++ b/src/web_server/proxy.c @@ -106,6 +106,7 @@ void send_backend_request(struct mg_connection *nc) { "User-Agent: myMPD/"MYMPD_VERSION" (https://github.com/jcorporation/myMPD)\r\n" "Accept: */*\r\n" "Accept-Encoding: none\r\n" + "Connection: close\r\n" "\r\n", mg_url_uri(backend_nc_data->uri), (int)host.len, host.buf @@ -126,7 +127,12 @@ struct mg_connection *create_backend_connection(struct mg_connection *nc, struct sds uri, mg_event_handler_t fn, bool stream) { if (backend_nc == NULL) { - MYMPD_LOG_INFO(NULL, "Creating new http backend connection to \"%s\"", uri); + if (stream == false) { + MYMPD_LOG_INFO(NULL, "Creating new http backend connection to \"%s\"", uri); + } + else { + MYMPD_LOG_INFO(NULL, "Creating new stream backend connection to \"%s\"", uri); + } struct t_backend_nc_data *backend_nc_data = malloc(sizeof(struct t_backend_nc_data)); backend_nc_data->uri = sdsdup(uri); backend_nc_data->frontend_nc = nc; @@ -135,8 +141,8 @@ struct mg_connection *create_backend_connection(struct mg_connection *nc, struct : mg_connect(nc->mgr, uri, fn, backend_nc_data); // tcp connection with MG_EV_READ event if (backend_nc == NULL) { //no backend connection, close frontend connection - MYMPD_LOG_WARN(NULL, "Can not create http backend connection"); - webserver_send_error(nc, 502, "Could not create backend connection"); + MYMPD_LOG_WARN(NULL, "Failure creating backend connection"); + webserver_send_error(nc, 502, "Failure creating backend connection"); nc->is_draining = 1; //free backend_nc_data free_backend_nc_data(backend_nc_data);