MCPcopy Create free account
hub / github.com/apache/httpd / on_begin_headers_cb

Function on_begin_headers_cb

modules/http2/h2_session.c:285–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285static int on_begin_headers_cb(nghttp2_session *ngh2,
286 const nghttp2_frame *frame, void *userp)
287{
288 h2_session *session = (h2_session *)userp;
289 h2_stream *s = NULL;
290
291 /* We may see HEADERs at the start of a stream or after all DATA
292 * streams to carry trailers. */
293 (void)ngh2;
294 s = get_stream(session, frame->hd.stream_id);
295 if (s) {
296 /* nop */
297 }
298 else if (session->local.accepting) {
299 s = h2_session_open_stream(userp, frame->hd.stream_id, 0);
300 }
301 return s? 0 : NGHTTP2_ERR_START_STREAM_NOT_ALLOWED;
302}
303
304static int on_header_cb(nghttp2_session *ngh2, const nghttp2_frame *frame,
305 const uint8_t *name, size_t namelen,

Callers

nothing calls this directly

Calls 2

get_streamFunction · 0.85
h2_session_open_streamFunction · 0.85

Tested by

no test coverage detected