do not send pseudo-headers when in HTTP/1

This commit is contained in:
Kazuho Oku 2015-03-09 11:40:13 +09:00
parent bff5a28d12
commit 2a4f347dbc
1 changed files with 3 additions and 1 deletions

View File

@ -807,7 +807,9 @@ int HttpClient::on_upgrade_connect() {
if (i < initial_headerslen) { if (i < initial_headerslen) {
continue; 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"; req += " HTTP/1.1\r\n";