Skip to content

Commit

Permalink
Fallback for ALPN is now http 1.1. We'll likely change this up a bit … (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
JonathanHenson authored Apr 16, 2019
1 parent 0bd63cc commit 232d38d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions source/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,11 @@ static struct aws_http_connection *s_connection_new(
} else if (aws_string_eq_byte_buf(s_alpn_protocol_http_2, &protocol)) {
version = AWS_HTTP_VERSION_2;
} else {
AWS_LOGF_ERROR(
AWS_LS_HTTP_CONNECTION,
"static: Unrecognized ALPN protocol '" PRInSTR "'.",
AWS_BYTE_BUF_PRI(protocol));
AWS_LOGF_WARN(AWS_LS_HTTP_CONNECTION, "static: Unrecognized ALPN protocol. Assuming HTTP/1.1");
AWS_LOGF_DEBUG(
AWS_LS_HTTP_CONNECTION, "static: Unrecognized ALPN protocol " PRInSTR, AWS_BYTE_BUF_PRI(protocol));

aws_raise_error(AWS_ERROR_HTTP_UNSUPPORTED_PROTOCOL);
goto error;
version = AWS_HTTP_VERSION_1_1;
}
}
}
Expand Down

0 comments on commit 232d38d

Please sign in to comment.