Commit b7711b17 authored by jan.koester's avatar jan.koester
Browse files

ping http2 fix

parent 623f6e1d
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -557,8 +557,15 @@ bool libhttppp::HttpEvent::Http2RequestEvent(netplus::con &curcon,
        }

        case H2_FRAME_PING:
            // RFC 7540: respond only to non-ACK PING frames, payload must be 8 bytes.
            if (!(fflags & H2_FLAG_ACK) && flen == 8) {
                out += h2BuildFrame(H2_FRAME_PING, H2_FLAG_ACK, 0,
                                    std::string(data + off, flen));
                if (!out.empty()) {
                    cureq.SendData.append(out.data(), out.size());
                    out.clear();
                }
            }
            break;

        case H2_FRAME_GOAWAY: