Lines Matching defs:origin

2428   static const uint8_t origin[] = "nghttp2.org";
2446 nghttp2_frame_hd_init(&hd, 2 + sizeof(origin) - 1 + sizeof(field_value) - 1,
2450 nghttp2_put_uint16be(buf.last, sizeof(origin) - 1);
2452 buf.last = nghttp2_cpymem(buf.last, origin, sizeof(origin) - 1);
2466 /* size of origin is larger than frame length */
2471 nghttp2_frame_hd_init(&hd, 2 + sizeof(origin) - 1 - 1, NGHTTP2_ALTSVC,
2475 nghttp2_put_uint16be(buf.last, sizeof(origin) - 1);
2477 buf.last = nghttp2_cpymem(buf.last, origin, sizeof(origin) - 1 - 1);
2492 nghttp2_frame_hd_init(&hd, 2 + sizeof(origin) - 1, NGHTTP2_ALTSVC,
2496 nghttp2_put_uint16be(buf.last, sizeof(origin) - 1);
2498 buf.last = nghttp2_cpymem(buf.last, origin, sizeof(origin) - 1);
2508 /* non-empty origin to a stream other than 0 */
2515 nghttp2_frame_hd_init(&hd, 2 + sizeof(origin) - 1 + sizeof(field_value) - 1,
2519 nghttp2_put_uint16be(buf.last, sizeof(origin) - 1);
2521 buf.last = nghttp2_cpymem(buf.last, origin, sizeof(origin) - 1);
2532 /* empty origin to stream 0 */
2562 nghttp2_put_uint16be(buf.last, sizeof(origin) - 1);
2564 buf.last = nghttp2_cpymem(buf.last, origin, sizeof(origin) - 1);
2589 nghttp2_put_uint16be(buf.last, sizeof(origin) - 1);
2591 buf.last = nghttp2_cpymem(buf.last, origin, sizeof(origin) - 1);
2608 nghttp2_frame_hd_init(&hd, 2 + sizeof(origin) - 1 + sizeof(field_value) - 1,
2612 nghttp2_put_uint16be(buf.last, sizeof(origin) - 1);
2614 buf.last = nghttp2_cpymem(buf.last, origin, sizeof(origin) - 1);
2637 nghttp2_ext_origin origin;
2643 frame.payload = &origin;
2645 ov.origin = (uint8_t *)nghttp2;
2676 /* The length of origin is larger than payload length. */
4545 uint8_t origin[] = "nghttp2.org";
4561 nghttp2_frame_altsvc_init(&frame.ext, 0, origin, sizeof(origin) - 1,
4572 /* Receiving empty origin with stream ID == 0 */
4577 nghttp2_frame_altsvc_init(&frame.ext, 0, origin, 0, field_value,
4588 /* Receiving non-empty origin with stream ID != 0 */
4595 nghttp2_frame_altsvc_init(&frame.ext, 1, origin, sizeof(origin) - 1,
4606 /* Receiving empty origin with stream ID != 0; this is OK */
4613 nghttp2_frame_altsvc_init(&frame.ext, 1, origin, 0, field_value,
4629 nghttp2_frame_altsvc_init(&frame.ext, 1, origin, 0, field_value,
6699 const uint8_t origin[] = "nghttp2.org";
6706 rv = nghttp2_submit_altsvc(session, NGHTTP2_FLAG_NONE, 0, origin,
6707 sizeof(origin) - 1, field_value,
6716 CU_ASSERT(len == NGHTTP2_FRAME_HDLEN + 2 + sizeof(origin) - 1 +
6721 CU_ASSERT(2 + sizeof(origin) - 1 + sizeof(field_value) - 1 == hd.length);
6727 CU_ASSERT(sizeof(origin) - 1 == origin_len);
6729 memcmp(origin, data + NGHTTP2_FRAME_HDLEN + 2, sizeof(origin) - 1));
6731 data + NGHTTP2_FRAME_HDLEN + 2 + sizeof(origin) - 1,
6732 hd.length - (sizeof(origin) - 1) - 2));
6734 /* submitting empty origin with stream_id == 0 is error */
6740 /* submitting non-empty origin with stream_id != 0 is error */
6741 rv = nghttp2_submit_altsvc(session, NGHTTP2_FLAG_NONE, 1, origin,
6742 sizeof(origin) - 1, field_value,
6752 rv = nghttp2_submit_altsvc(session, NGHTTP2_FLAG_NONE, 0, origin,
6753 sizeof(origin) - 1, field_value,
6781 nghttp2_ext_origin origin;
6789 frame.ext.payload = &origin;
6811 CU_ASSERT(2 == origin.nov);
6812 CU_ASSERT(0 == memcmp(nghttp2, origin.ov[0].origin, sizeof(nghttp2) - 1));
6813 CU_ASSERT(sizeof(nghttp2) - 1 == origin.ov[0].origin_len);
6814 CU_ASSERT(0 == memcmp(examples, origin.ov[1].origin, sizeof(examples) - 1));
6815 CU_ASSERT(sizeof(examples) - 1 == origin.ov[1].origin_len);