From a8eeea0b182824802a05113c7a8506db5e80ba44 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 15 Nov 2014 11:30:01 +0900 Subject: [PATCH] Initialize frame header for upgrade SETTINGS frame --- lib/nghttp2_session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 80757bd1..bbdd0fe4 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -6067,7 +6067,8 @@ int nghttp2_session_upgrade(nghttp2_session *session, } if(session->server) { - memset(&frame.hd, 0, sizeof(frame.hd)); + nghttp2_frame_hd_init(&frame.hd, settings_payloadlen, NGHTTP2_SETTINGS, + NGHTTP2_FLAG_NONE, 0); frame.settings.iv = iv; frame.settings.niv = niv; rv = nghttp2_session_on_settings_received(session, &frame, 1 /* No ACK */);