Skip to content

Commit 232d38d

Browse files
Fallback for ALPN is now http 1.1. We'll likely change this up a bit … (#34)
* Fallback for ALPN is now http 1.1. We'll likely change this up a bit when we add h2 support. * Addressed PR feedback.
1 parent 0bd63cc commit 232d38d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

source/connection.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,11 @@ static struct aws_http_connection *s_connection_new(
9494
} else if (aws_string_eq_byte_buf(s_alpn_protocol_http_2, &protocol)) {
9595
version = AWS_HTTP_VERSION_2;
9696
} else {
97-
AWS_LOGF_ERROR(
98-
AWS_LS_HTTP_CONNECTION,
99-
"static: Unrecognized ALPN protocol '" PRInSTR "'.",
100-
AWS_BYTE_BUF_PRI(protocol));
97+
AWS_LOGF_WARN(AWS_LS_HTTP_CONNECTION, "static: Unrecognized ALPN protocol. Assuming HTTP/1.1");
98+
AWS_LOGF_DEBUG(
99+
AWS_LS_HTTP_CONNECTION, "static: Unrecognized ALPN protocol " PRInSTR, AWS_BYTE_BUF_PRI(protocol));
101100

102-
aws_raise_error(AWS_ERROR_HTTP_UNSUPPORTED_PROTOCOL);
103-
goto error;
101+
version = AWS_HTTP_VERSION_1_1;
104102
}
105103
}
106104
}

0 commit comments

Comments
 (0)