To reproduce the error, it is sufficient to initialize an HTTPS server and send a request. The assertion error occours using both HTTP/1.1 and HTTP/2, without difference. It is to be noted that the program never enters the static if clause (line 169) and the else clause (line 172) fails before reaching assert(false).
It looks like a type check which is never true (the assert is thrown at runtime after a typeid check in vibe.internal.interfaceproxy:132), but removing the compile time checks to allow for a direct cast of http_stream to type TLSStream does not work either, so I guess we should change how the http_stream is declared / managed in case of a TLS connection.
Note: This issue affects only the use of client certificates, therefore it is not critical to HTTP/2 introduction.
While testing ALPN with HTTP/2 I ran into the following
AssertError
:The error above regards the following snipped of code in
vibe.http.internal.http1
:To reproduce the error, it is sufficient to initialize an HTTPS server and send a request. The assertion error occours using both HTTP/1.1 and HTTP/2, without difference. It is to be noted that the program never enters the
static if
clause (line 169) and theelse
clause (line 172) fails before reachingassert(false)
.It looks like a type check which is never true (the assert is thrown at runtime after a
typeid
check invibe.internal.interfaceproxy:132
), but removing the compile time checks to allow for a direct cast ofhttp_stream
to typeTLSStream
does not work either, so I guess we should change how the http_stream is declared / managed in case of a TLS connection.Note: This issue affects only the use of client certificates, therefore it is not critical to HTTP/2 introduction.