File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,15 @@ process_rst_stream_frame(const nghttp2_rst_stream *rst_stream)
293
293
log_info ("rst error code is %u" , rst_stream -> error_code );
294
294
}
295
295
296
+ static void
297
+ print_origin_extension (const nghttp2_ext_origin * origin )
298
+ {
299
+ for (size_t i = 0 ; i < origin -> nov ; i ++ ) {
300
+ nghttp2_origin_entry * ov = & origin -> ov [i ];
301
+ log_info ("origin host <%.*s>" , (int )ov -> origin_len , ov -> origin );
302
+ }
303
+ }
304
+
296
305
static void
297
306
process_http2_frame (const nghttp2_frame * frame , int c_to_s )
298
307
{
@@ -316,6 +325,16 @@ process_http2_frame(const nghttp2_frame *frame, int c_to_s)
316
325
case NGHTTP2_RST_STREAM :
317
326
process_rst_stream_frame (& frame -> rst_stream );
318
327
break ;
328
+
329
+ case NGHTTP2_ORIGIN :
330
+ {
331
+ nghttp2_ext_origin * origin = (nghttp2_ext_origin * )frame -> ext .payload ;
332
+ if (origin ) {
333
+ print_origin_extension (origin );
334
+ }
335
+ }
336
+
337
+ break ;
319
338
}
320
339
}
321
340
You can’t perform that action at this time.
0 commit comments