From 2a4f347dbc349fa47db09ff8e39c6ab5da476eb9 Mon Sep 17 00:00:00 2001 From: Kazuho Oku Date: Mon, 9 Mar 2015 11:40:13 +0900 Subject: [PATCH] do not send pseudo-headers when in HTTP/1 --- src/nghttp.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nghttp.cc b/src/nghttp.cc index c696ac6f..aa40ef7e 100644 --- a/src/nghttp.cc +++ b/src/nghttp.cc @@ -807,7 +807,9 @@ int HttpClient::on_upgrade_connect() { if (i < initial_headerslen) { continue; } - headers.emplace_back(kv.name, kv.value, kv.no_index); + if (kv.name.size() != 0 && kv.name[0] != ':') { + headers.emplace_back(kv.name, kv.value, kv.no_index); + } } req += " HTTP/1.1\r\n";