MCPcopy Create free account
hub / github.com/apache/trafficserver / rcv_goaway_frame

Method rcv_goaway_frame

src/proxy/http2/Http2ConnectionState.cc:876–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874}
875
876Http2Error
877Http2ConnectionState::rcv_goaway_frame(const Http2Frame &frame)
878{
879 Http2Goaway goaway;
880 char buf[HTTP2_GOAWAY_LEN];
881 char *end;
882 const Http2StreamId stream_id = frame.header().streamid;
883
884 Http2StreamDebug(this->session, stream_id, "Received GOAWAY frame");
885
886 // An endpoint MUST treat a GOAWAY frame with a stream identifier other
887 // than 0x0 as a connection error of type PROTOCOL_ERROR.
888 if (stream_id != 0x0) {
889 return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR,
890 "goaway id non-zero");
891 }
892
893 end = frame.reader()->memcpy(buf, sizeof(buf), 0);
894
895 if (!http2_parse_goaway(make_iovec(buf, end - buf), goaway)) {
896 return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR,
897 "goaway failed parse");
898 }
899
900 Http2StreamDebug(this->session, stream_id, "GOAWAY: last stream id=%d, error code=%d", goaway.last_streamid,
901 static_cast<int>(goaway.error_code));
902
903 this->rx_error_code = {ProxyErrorClass::SSN, static_cast<uint32_t>(goaway.error_code)};
904 this->session->get_proxy_session()->do_io_close();
905
906 return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_NONE);
907}
908
909Http2Error
910Http2ConnectionState::rcv_window_update_frame(const Http2Frame &frame)

Callers

nothing calls this directly

Calls 8

Http2ErrorClass · 0.85
http2_parse_goawayFunction · 0.85
make_iovecFunction · 0.85
memcpyMethod · 0.80
headerMethod · 0.45
readerMethod · 0.45
do_io_closeMethod · 0.45
get_proxy_sessionMethod · 0.45

Tested by

no test coverage detected