{"action":"closed","issue":{"url":"https://api.github.com/repos/warmcat/libwebsockets/issues/341","labels_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/341/comments","events_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/341/events","html_url":"https://github.com/warmcat/libwebsockets/issues/341","id":115648517,"number":341,"title":"No LWS_CALLBACK_CLOSED_HTTP if connected client sends nothing","user":{"login":"github-user-7","id":15474343,"avatar_url":"https://avatars.githubusercontent.com/u/15474343?v=3","gravatar_id":"","url":"https://api.github.com/users/github-user-7","html_url":"https://github.com/github-user-7","followers_url":"https://api.github.com/users/github-user-7/followers","following_url":"https://api.github.com/users/github-user-7/following{/other_user}","gists_url":"https://api.github.com/users/github-user-7/gists{/gist_id}","starred_url":"https://api.github.com/users/github-user-7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-user-7/subscriptions","organizations_url":"https://api.github.com/users/github-user-7/orgs","repos_url":"https://api.github.com/users/github-user-7/repos","events_url":"https://api.github.com/users/github-user-7/events{/privacy}","received_events_url":"https://api.github.com/users/github-user-7/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-07T08:58:08Z","updated_at":"2015-11-07T10:19:10Z","closed_at":"2015-11-07T10:19:10Z","body":"Found on libwebsockets 1.5, repro steps:\r\nopenssl s_client -host <libwebsockets server IP> -port <libwebsockets listen port>\r\nEnter no data after it negotiates SSL, connection will get closed by the server after a brief amount of time.\r\n\r\nlibwebsockets calls LWS_CALLBACK_FILTER_NETWORK_CONNECTION and LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED, but not LWS_CALLBACK_CLOSED_HTTP even though the fd gets closed out by libwebsockets.  This could become a DOS attack against servers depending on connection closed callbacks to free up stuff.\r\n\r\nIf you instead hit the enter key after openssl has negotiated ssl with the server, then the LWS_CALLBACK_CLOSED_HTTP callback is called as expected."}}