• Tatsuhiro Tsujikawa's avatar
    nghttpx: Fix connection preface is not read by upstream_http2_connhd_readcb · 4ab594b1
    Tatsuhiro Tsujikawa authored
    It seems that if readcb is not set before SSL/TLS handshake, the
    incoming data already available when eventcb (BEV_EVENT_CONNECTED
    event) is fired is not further notified after setting new readcb.  We
    knew this fact and call upstream->on_read() in eventcb, but it is
    wrong for HTTP/2.  We have to call upstream_http2_connhd_readcb to
    check connection preface.  Otherwise, we consume it by nghttp2 session
    and it is treated as unknown frame and connection preface is not
    detected properly.
    4ab594b1
shrpx_client_handler.cc 16.1 KB