X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-websock.c;h=23d489ab405bd35dcbd15b50a242ccd458d3da1b;hb=1205c90cccd3144bab24b4b5fd8dcbf0d0e6b570;hp=b6044326d5fa9ca68276e3ee47b8265f02ed3513;hpb=cc4b56b6710624c069642d1a510d0060949fe5b9;p=src%2Fapp-framework-binder.git diff --git a/src/afb-websock.c b/src/afb-websock.c index b6044326..23d489ab 100644 --- a/src/afb-websock.c +++ b/src/afb-websock.c @@ -172,7 +172,7 @@ int afb_websock_check(struct afb_hreq *hreq, int *later) /* is a supported version ? */ vernum = atoi(version); if (vernum != 13) { - response = MHD_create_response_from_data(0,NULL,0,0); + response = MHD_create_response_from_buffer(0, NULL, MHD_RESPMEM_PERSISTENT); MHD_add_response_header (response, sec_websocket_version_s, "13"); MHD_queue_response (hreq->connection, MHD_HTTP_BAD_REQUEST, response); MHD_destroy_response (response); @@ -185,7 +185,7 @@ int afb_websock_check(struct afb_hreq *hreq, int *later) /* send the accept connection */ make_accept_value(key, acceptval); - response = MHD_create_response_from_data(0,NULL,0,0); + response = MHD_create_response_from_buffer(0, NULL, MHD_RESPMEM_PERSISTENT); MHD_add_response_header (response, sec_websocket_accept_s, acceptval); MHD_add_response_header (response, MHD_HTTP_HEADER_CONNECTION, MHD_HTTP_HEADER_UPGRADE); MHD_add_response_header (response, MHD_HTTP_HEADER_UPGRADE, websocket_s);