• Bence Béky's avatar
    Do not crash if WebSocket server negotiates HTTP/2. · fbeb883a
    Bence Béky authored
    I overzealously landed https://crrev.com/c/990493 assuming that if a TCP
    connection is open (directly, not through a proxy) with an empty ALPN
    list, then the server cannot negotiate HTTP/2.  While there are no
    crashes seen during the first day of Canary, https://crbug.com/828865
    shows that it is unwise to rely on the TLS layer to fail connection
    negotiation if server's ALPN response does not match the client
    handshake.  While it is still unclear if this crash can occur in the
    while, I am adding a unittest in this CL that triggers it, and removing
    the CHECK in favor of just return ERR_NOT_IMPLEMENTED in this weird
    case.
    
    Bug: 819101
    Change-Id: I2c2f70c62485714e61176d75f95d93a67484b800
    Reviewed-on: https://chromium-review.googlesource.com/997152
    Commit-Queue: Bence Béky <bnc@chromium.org>
    Reviewed-by: default avatarRyan Hamilton <rch@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548609}
    fbeb883a
spdy_network_transaction_unittest.cc 296 KB