Skip to content

Commit 60f7bfa

Browse files
addaleaxBethGriggs
authored andcommittedOct 16, 2018
deps: update to nghttp2 1.33.0
Refs: https://github.com/nghttp2/nghttp2/releases/tag/v1.33.0 Backport-PR-URL: #22850 PR-URL: #22649 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 6a396ff commit 60f7bfa

30 files changed

+599
-78
lines changed
 

‎deps/nghttp2/lib/includes/nghttp2/nghttp2.h

+112-30
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/* Define WIN32 when build target is Win32 API (borrowed from
2929
libcurl) */
3030
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
31-
#define WIN32
31+
# define WIN32
3232
#endif
3333

3434
#ifdef __cplusplus
@@ -40,30 +40,30 @@ extern "C" {
4040
/* MSVC < 2013 does not have inttypes.h because it is not C99
4141
compliant. See compiler macros and version number in
4242
https://sourceforge.net/p/predef/wiki/Compilers/ */
43-
#include <stdint.h>
43+
# include <stdint.h>
4444
#else /* !defined(_MSC_VER) || (_MSC_VER >= 1800) */
45-
#include <inttypes.h>
45+
# include <inttypes.h>
4646
#endif /* !defined(_MSC_VER) || (_MSC_VER >= 1800) */
4747
#include <sys/types.h>
4848
#include <stdarg.h>
4949

5050
#include <nghttp2/nghttp2ver.h>
5151

5252
#ifdef NGHTTP2_STATICLIB
53-
#define NGHTTP2_EXTERN
53+
# define NGHTTP2_EXTERN
5454
#elif defined(WIN32)
55-
#ifdef BUILDING_NGHTTP2
56-
#define NGHTTP2_EXTERN __declspec(dllexport)
57-
#else /* !BUILDING_NGHTTP2 */
58-
#define NGHTTP2_EXTERN __declspec(dllimport)
59-
#endif /* !BUILDING_NGHTTP2 */
60-
#else /* !defined(WIN32) */
61-
#ifdef BUILDING_NGHTTP2
62-
#define NGHTTP2_EXTERN __attribute__((visibility("default")))
63-
#else /* !BUILDING_NGHTTP2 */
64-
#define NGHTTP2_EXTERN
65-
#endif /* !BUILDING_NGHTTP2 */
66-
#endif /* !defined(WIN32) */
55+
# ifdef BUILDING_NGHTTP2
56+
# define NGHTTP2_EXTERN __declspec(dllexport)
57+
# else /* !BUILDING_NGHTTP2 */
58+
# define NGHTTP2_EXTERN __declspec(dllimport)
59+
# endif /* !BUILDING_NGHTTP2 */
60+
#else /* !defined(WIN32) */
61+
# ifdef BUILDING_NGHTTP2
62+
# define NGHTTP2_EXTERN __attribute__((visibility("default")))
63+
# else /* !BUILDING_NGHTTP2 */
64+
# define NGHTTP2_EXTERN
65+
# endif /* !BUILDING_NGHTTP2 */
66+
#endif /* !defined(WIN32) */
6767

6868
/**
6969
* @macro
@@ -611,7 +611,12 @@ typedef enum {
611611
* The ALTSVC frame, which is defined in `RFC 7383
612612
* <https://tools.ietf.org/html/rfc7838#section-4>`_.
613613
*/
614-
NGHTTP2_ALTSVC = 0x0a
614+
NGHTTP2_ALTSVC = 0x0a,
615+
/**
616+
* The ORIGIN frame, which is defined by `RFC 8336
617+
* <https://tools.ietf.org/html/rfc8336>`_.
618+
*/
619+
NGHTTP2_ORIGIN = 0x0c
615620
} nghttp2_frame_type;
616621

617622
/**
@@ -2473,15 +2478,15 @@ nghttp2_option_set_no_auto_window_update(nghttp2_option *option, int val);
24732478
*
24742479
* This option sets the SETTINGS_MAX_CONCURRENT_STREAMS value of
24752480
* remote endpoint as if it is received in SETTINGS frame. Without
2476-
* specifying this option, before the local endpoint receives
2477-
* SETTINGS_MAX_CONCURRENT_STREAMS in SETTINGS frame from remote
2478-
* endpoint, SETTINGS_MAX_CONCURRENT_STREAMS is unlimited. This may
2479-
* cause problem if local endpoint submits lots of requests initially
2480-
* and sending them at once to the remote peer may lead to the
2481-
* rejection of some requests. Specifying this option to the sensible
2482-
* value, say 100, may avoid this kind of issue. This value will be
2483-
* overwritten if the local endpoint receives
2484-
* SETTINGS_MAX_CONCURRENT_STREAMS from the remote endpoint.
2481+
* specifying this option, the maximum number of outgoing concurrent
2482+
* streams is initially limited to 100 to avoid issues when the local
2483+
* endpoint submits lots of requests before receiving initial SETTINGS
2484+
* frame from the remote endpoint, since sending them at once to the
2485+
* remote endpoint could lead to rejection of some of the requests.
2486+
* This value will be overwritten when the local endpoint receives
2487+
* initial SETTINGS frame from the remote endpoint, either to the
2488+
* value advertised in SETTINGS_MAX_CONCURRENT_STREAMS or to the
2489+
* default value (unlimited) if none was advertised.
24852490
*/
24862491
NGHTTP2_EXTERN void
24872492
nghttp2_option_set_peer_max_concurrent_streams(nghttp2_option *option,
@@ -3797,10 +3802,13 @@ nghttp2_priority_spec_check_default(const nghttp2_priority_spec *pri_spec);
37973802
* .. warning::
37983803
*
37993804
* This function returns assigned stream ID if it succeeds. But
3800-
* that stream is not opened yet. The application must not submit
3805+
* that stream is not created yet. The application must not submit
38013806
* frame to that stream ID before
38023807
* :type:`nghttp2_before_frame_send_callback` is called for this
3803-
* frame.
3808+
* frame. This means `nghttp2_session_get_stream_user_data()` does
3809+
* not work before the callback. But
3810+
* `nghttp2_session_set_stream_user_data()` handles this situation
3811+
* specially, and it can set data to a stream during this period.
38043812
*
38053813
*/
38063814
NGHTTP2_EXTERN int32_t nghttp2_submit_request(
@@ -4516,8 +4524,7 @@ typedef struct {
45164524
* Submits ALTSVC frame.
45174525
*
45184526
* ALTSVC frame is a non-critical extension to HTTP/2, and defined in
4519-
* is defined in `RFC 7383
4520-
* <https://tools.ietf.org/html/rfc7838#section-4>`_.
4527+
* `RFC 7383 <https://tools.ietf.org/html/rfc7838#section-4>`_.
45214528
*
45224529
* The |flags| is currently ignored and should be
45234530
* :enum:`NGHTTP2_FLAG_NONE`.
@@ -4551,6 +4558,81 @@ NGHTTP2_EXTERN int nghttp2_submit_altsvc(nghttp2_session *session,
45514558
const uint8_t *field_value,
45524559
size_t field_value_len);
45534560

4561+
/**
4562+
* @struct
4563+
*
4564+
* The single entry of an origin.
4565+
*/
4566+
typedef struct {
4567+
/**
4568+
* The pointer to origin. No validation is made against this field
4569+
* by the library. This is not necessarily NULL-terminated.
4570+
*/
4571+
uint8_t *origin;
4572+
/**
4573+
* The length of the |origin|.
4574+
*/
4575+
size_t origin_len;
4576+
} nghttp2_origin_entry;
4577+
4578+
/**
4579+
* @struct
4580+
*
4581+
* The payload of ORIGIN frame. ORIGIN frame is a non-critical
4582+
* extension to HTTP/2 and defined by `RFC 8336
4583+
* <https://tools.ietf.org/html/rfc8336>`_.
4584+
*
4585+
* If this frame is received, and
4586+
* `nghttp2_option_set_user_recv_extension_type()` is not set, and
4587+
* `nghttp2_option_set_builtin_recv_extension_type()` is set for
4588+
* :enum:`NGHTTP2_ORIGIN`, ``nghttp2_extension.payload`` will point to
4589+
* this struct.
4590+
*
4591+
* It has the following members:
4592+
*/
4593+
typedef struct {
4594+
/**
4595+
* The number of origins contained in |ov|.
4596+
*/
4597+
size_t nov;
4598+
/**
4599+
* The pointer to the array of origins contained in ORIGIN frame.
4600+
*/
4601+
nghttp2_origin_entry *ov;
4602+
} nghttp2_ext_origin;
4603+
4604+
/**
4605+
* @function
4606+
*
4607+
* Submits ORIGIN frame.
4608+
*
4609+
* ORIGIN frame is a non-critical extension to HTTP/2 and defined by
4610+
* `RFC 8336 <https://tools.ietf.org/html/rfc8336>`_.
4611+
*
4612+
* The |flags| is currently ignored and should be
4613+
* :enum:`NGHTTP2_FLAG_NONE`.
4614+
*
4615+
* The |ov| points to the array of origins. The |nov| specifies the
4616+
* number of origins included in |ov|. This function creates copies
4617+
* of all elements in |ov|.
4618+
*
4619+
* The ORIGIN frame is only usable by a server. If this function is
4620+
* invoked with client side session, this function returns
4621+
* :enum:`NGHTTP2_ERR_INVALID_STATE`.
4622+
*
4623+
* :enum:`NGHTTP2_ERR_NOMEM`
4624+
* Out of memory
4625+
* :enum:`NGHTTP2_ERR_INVALID_STATE`
4626+
* The function is called from client side session.
4627+
* :enum:`NGHTTP2_ERR_INVALID_ARGUMENT`
4628+
* There are too many origins, or an origin is too large to fit
4629+
* into a default frame payload.
4630+
*/
4631+
NGHTTP2_EXTERN int nghttp2_submit_origin(nghttp2_session *session,
4632+
uint8_t flags,
4633+
const nghttp2_origin_entry *ov,
4634+
size_t nov);
4635+
45544636
/**
45554637
* @function
45564638
*

‎deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
* @macro
3030
* Version number of the nghttp2 library release
3131
*/
32-
#define NGHTTP2_VERSION "1.32.0"
32+
#define NGHTTP2_VERSION "1.33.0"
3333

3434
/**
3535
* @macro
3636
* Numerical representation of the version number of the nghttp2 library
3737
* release. This is a 24 bit number with 8 bits for major number, 8 bits
3838
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
3939
*/
40-
#define NGHTTP2_VERSION_NUM 0x012000
40+
#define NGHTTP2_VERSION_NUM 0x012100
4141

4242
#endif /* NGHTTP2VER_H */

‎deps/nghttp2/lib/nghttp2_buf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_BUF_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_callbacks.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_CALLBACKS_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_debug.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
#define NGHTTP2_DEBUG_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>
3333

3434
#ifdef DEBUGBUILD
35-
#define DEBUGF(...) nghttp2_debug_vprintf(__VA_ARGS__)
35+
# define DEBUGF(...) nghttp2_debug_vprintf(__VA_ARGS__)
3636
void nghttp2_debug_vprintf(const char *format, ...);
3737
#else
38-
#define DEBUGF(...) \
39-
do { \
40-
} while (0)
38+
# define DEBUGF(...) \
39+
do { \
40+
} while (0)
4141
#endif
4242

4343
#endif /* NGHTTP2_DEBUG_H */

‎deps/nghttp2/lib/nghttp2_frame.c

+130
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,36 @@ void nghttp2_frame_altsvc_free(nghttp2_extension *frame, nghttp2_mem *mem) {
223223
nghttp2_mem_free(mem, altsvc->origin);
224224
}
225225

226+
void nghttp2_frame_origin_init(nghttp2_extension *frame,
227+
nghttp2_origin_entry *ov, size_t nov) {
228+
nghttp2_ext_origin *origin;
229+
size_t payloadlen = 0;
230+
size_t i;
231+
232+
for (i = 0; i < nov; ++i) {
233+
payloadlen += 2 + ov[i].origin_len;
234+
}
235+
236+
nghttp2_frame_hd_init(&frame->hd, payloadlen, NGHTTP2_ORIGIN,
237+
NGHTTP2_FLAG_NONE, 0);
238+
239+
origin = frame->payload;
240+
origin->ov = ov;
241+
origin->nov = nov;
242+
}
243+
244+
void nghttp2_frame_origin_free(nghttp2_extension *frame, nghttp2_mem *mem) {
245+
nghttp2_ext_origin *origin;
246+
247+
origin = frame->payload;
248+
if (origin == NULL) {
249+
return;
250+
}
251+
/* We use the same buffer for all resources pointed by the field of
252+
origin directly or indirectly. */
253+
nghttp2_mem_free(mem, origin->ov);
254+
}
255+
226256
size_t nghttp2_frame_priority_len(uint8_t flags) {
227257
if (flags & NGHTTP2_FLAG_PRIORITY) {
228258
return NGHTTP2_PRIORITY_SPECLEN;
@@ -746,6 +776,106 @@ int nghttp2_frame_unpack_altsvc_payload2(nghttp2_extension *frame,
746776
return 0;
747777
}
748778

779+
int nghttp2_frame_pack_origin(nghttp2_bufs *bufs, nghttp2_extension *frame) {
780+
nghttp2_buf *buf;
781+
nghttp2_ext_origin *origin;
782+
nghttp2_origin_entry *orig;
783+
size_t i;
784+
785+
origin = frame->payload;
786+
787+
buf = &bufs->head->buf;
788+
789+
if (nghttp2_buf_avail(buf) < frame->hd.length) {
790+
return NGHTTP2_ERR_FRAME_SIZE_ERROR;
791+
}
792+
793+
buf->pos -= NGHTTP2_FRAME_HDLEN;
794+
795+
nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
796+
797+
for (i = 0; i < origin->nov; ++i) {
798+
orig = &origin->ov[i];
799+
nghttp2_put_uint16be(buf->last, (uint16_t)orig->origin_len);
800+
buf->last += 2;
801+
buf->last = nghttp2_cpymem(buf->last, orig->origin, orig->origin_len);
802+
}
803+
804+
assert(nghttp2_buf_len(buf) == NGHTTP2_FRAME_HDLEN + frame->hd.length);
805+
806+
return 0;
807+
}
808+
809+
int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame,
810+
const uint8_t *payload,
811+
size_t payloadlen, nghttp2_mem *mem) {
812+
nghttp2_ext_origin *origin;
813+
const uint8_t *p, *end;
814+
uint8_t *dst;
815+
size_t originlen;
816+
nghttp2_origin_entry *ov;
817+
size_t nov = 0;
818+
size_t len = 0;
819+
820+
origin = frame->payload;
821+
p = payload;
822+
end = p + payloadlen;
823+
824+
for (; p != end;) {
825+
if (end - p < 2) {
826+
return NGHTTP2_ERR_FRAME_SIZE_ERROR;
827+
}
828+
originlen = nghttp2_get_uint16(p);
829+
p += 2;
830+
if (originlen == 0) {
831+
continue;
832+
}
833+
if (originlen > (size_t)(end - p)) {
834+
return NGHTTP2_ERR_FRAME_SIZE_ERROR;
835+
}
836+
p += originlen;
837+
/* 1 for terminal NULL */
838+
len += originlen + 1;
839+
++nov;
840+
}
841+
842+
if (nov == 0) {
843+
origin->ov = NULL;
844+
origin->nov = 0;
845+
846+
return 0;
847+
}
848+
849+
len += nov * sizeof(nghttp2_origin_entry);
850+
851+
ov = nghttp2_mem_malloc(mem, len);
852+
if (ov == NULL) {
853+
return NGHTTP2_ERR_NOMEM;
854+
}
855+
856+
origin->ov = ov;
857+
origin->nov = nov;
858+
859+
dst = (uint8_t *)ov + nov * sizeof(nghttp2_origin_entry);
860+
p = payload;
861+
862+
for (; p != end;) {
863+
originlen = nghttp2_get_uint16(p);
864+
p += 2;
865+
if (originlen == 0) {
866+
continue;
867+
}
868+
ov->origin = dst;
869+
ov->origin_len = originlen;
870+
dst = nghttp2_cpymem(dst, p, originlen);
871+
*dst++ = '\0';
872+
p += originlen;
873+
++ov;
874+
}
875+
876+
return 0;
877+
}
878+
749879
nghttp2_settings_entry *nghttp2_frame_iv_copy(const nghttp2_settings_entry *iv,
750880
size_t niv, nghttp2_mem *mem) {
751881
nghttp2_settings_entry *iv_copy;

‎deps/nghttp2/lib/nghttp2_frame.h

+50-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_FRAME_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>
@@ -72,6 +72,7 @@
7272
/* Union of extension frame payload */
7373
typedef union {
7474
nghttp2_ext_altsvc altsvc;
75+
nghttp2_ext_origin origin;
7576
} nghttp2_ext_frame_payload;
7677

7778
void nghttp2_frame_pack_frame_hd(uint8_t *buf, const nghttp2_frame_hd *hd);
@@ -392,6 +393,36 @@ int nghttp2_frame_unpack_altsvc_payload2(nghttp2_extension *frame,
392393
const uint8_t *payload,
393394
size_t payloadlen, nghttp2_mem *mem);
394395

396+
/*
397+
* Packs ORIGIN frame |frame| in wire frame format and store it in
398+
* |bufs|.
399+
*
400+
* The caller must make sure that nghttp2_bufs_reset(bufs) is called
401+
* before calling this function.
402+
*
403+
* This function returns 0 if it succeeds, or one of the following
404+
* negative error codes:
405+
*
406+
* NGHTTP2_ERR_FRAME_SIZE_ERROR
407+
* The length of the frame is too large.
408+
*/
409+
int nghttp2_frame_pack_origin(nghttp2_bufs *bufs, nghttp2_extension *ext);
410+
411+
/*
412+
* Unpacks ORIGIN wire format into |frame|. The |payload| of length
413+
* |payloadlen| contains the frame payload.
414+
*
415+
* This function returns 0 if it succeeds, or one of the following
416+
* negative error codes:
417+
*
418+
* NGHTTP2_ERR_NOMEM
419+
* Out of memory.
420+
* NGHTTP2_ERR_FRAME_SIZE_ERROR
421+
* The payload is too small.
422+
*/
423+
int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame,
424+
const uint8_t *payload,
425+
size_t payloadlen, nghttp2_mem *mem);
395426
/*
396427
* Initializes HEADERS frame |frame| with given values. |frame| takes
397428
* ownership of |nva|, so caller must not free it. If |stream_id| is
@@ -489,6 +520,24 @@ void nghttp2_frame_altsvc_init(nghttp2_extension *frame, int32_t stream_id,
489520
*/
490521
void nghttp2_frame_altsvc_free(nghttp2_extension *frame, nghttp2_mem *mem);
491522

523+
/*
524+
* Initializes ORIGIN frame |frame| with given values. This function
525+
* assumes that frame->payload points to nghttp2_ext_origin object.
526+
* Also |ov| and the memory pointed by the field of its elements are
527+
* allocated in single buffer, starting with |ov|. On success, this
528+
* function takes ownership of |ov|, so caller must not free it.
529+
*/
530+
void nghttp2_frame_origin_init(nghttp2_extension *frame,
531+
nghttp2_origin_entry *ov, size_t nov);
532+
533+
/*
534+
* Frees up resources under |frame|. This function does not free
535+
* nghttp2_ext_origin object pointed by frame->payload. This function
536+
* only frees nghttp2_ext_origin.ov. Therefore, other fields must be
537+
* allocated in the same buffer with ov.
538+
*/
539+
void nghttp2_frame_origin_free(nghttp2_extension *frame, nghttp2_mem *mem);
540+
492541
/*
493542
* Returns the number of padding bytes after payload. The total
494543
* padding length is given in the |padlen|. The returned value does

‎deps/nghttp2/lib/nghttp2_hd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_HD_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_hd_huffman.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_HD_HUFFMAN_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_helper.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_HELPER_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <string.h>

‎deps/nghttp2/lib/nghttp2_http.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_HTTP_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_int.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_INT_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_map.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_MAP_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_mem.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_MEM_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_net.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
#define NGHTTP2_NET_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#ifdef HAVE_ARPA_INET_H
33-
#include <arpa/inet.h>
33+
# include <arpa/inet.h>
3434
#endif /* HAVE_ARPA_INET_H */
3535

3636
#ifdef HAVE_NETINET_IN_H
37-
#include <netinet/in.h>
37+
# include <netinet/in.h>
3838
#endif /* HAVE_NETINET_IN_H */
3939

4040
#include <nghttp2/nghttp2.h>
@@ -44,11 +44,11 @@
4444
define inline functions for those function so that we don't have
4545
dependeny on that lib. */
4646

47-
#ifdef _MSC_VER
48-
#define STIN static __inline
49-
#else
50-
#define STIN static inline
51-
#endif
47+
# ifdef _MSC_VER
48+
# define STIN static __inline
49+
# else
50+
# define STIN static inline
51+
# endif
5252

5353
STIN uint32_t htonl(uint32_t hostlong) {
5454
uint32_t res;

‎deps/nghttp2/lib/nghttp2_npn.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_NPN_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_option.c

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ void nghttp2_option_set_builtin_recv_extension_type(nghttp2_option *option,
8686
option->opt_set_mask |= NGHTTP2_OPT_BUILTIN_RECV_EXT_TYPES;
8787
option->builtin_recv_ext_types |= NGHTTP2_TYPEMASK_ALTSVC;
8888
return;
89+
case NGHTTP2_ORIGIN:
90+
option->opt_set_mask |= NGHTTP2_OPT_BUILTIN_RECV_EXT_TYPES;
91+
option->builtin_recv_ext_types |= NGHTTP2_TYPEMASK_ORIGIN;
92+
return;
8993
default:
9094
return;
9195
}

‎deps/nghttp2/lib/nghttp2_option.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_OPTION_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_outbound_item.c

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ void nghttp2_outbound_item_free(nghttp2_outbound_item *item, nghttp2_mem *mem) {
8686
case NGHTTP2_ALTSVC:
8787
nghttp2_frame_altsvc_free(&frame->ext, mem);
8888
break;
89+
case NGHTTP2_ORIGIN:
90+
nghttp2_frame_origin_free(&frame->ext, mem);
91+
break;
8992
default:
9093
assert(0);
9194
break;

‎deps/nghttp2/lib/nghttp2_outbound_item.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_OUTBOUND_ITEM_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_pq.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_PQ_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_priority_spec.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_PRIORITY_SPEC_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_queue.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_QUEUE_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include "config.h"
29+
# include "config.h"
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_rcbuf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_RCBUF_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_session.c

+157-4
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ static void session_inbound_frame_reset(nghttp2_session *session) {
348348
}
349349
nghttp2_frame_altsvc_free(&iframe->frame.ext, mem);
350350
break;
351+
case NGHTTP2_ORIGIN:
352+
if ((session->builtin_recv_ext_types & NGHTTP2_TYPEMASK_ORIGIN) == 0) {
353+
break;
354+
}
355+
nghttp2_frame_origin_free(&iframe->frame.ext, mem);
356+
break;
351357
}
352358
}
353359

@@ -1749,6 +1755,13 @@ static int session_predicate_altsvc_send(nghttp2_session *session,
17491755
return 0;
17501756
}
17511757

1758+
static int session_predicate_origin_send(nghttp2_session *session) {
1759+
if (session_is_closing(session)) {
1760+
return NGHTTP2_ERR_SESSION_CLOSING;
1761+
}
1762+
return 0;
1763+
}
1764+
17521765
/* Take into account settings max frame size and both connection-level
17531766
flow control here */
17541767
static ssize_t
@@ -2280,6 +2293,18 @@ static int session_prep_frame(nghttp2_session *session,
22802293

22812294
nghttp2_frame_pack_altsvc(&session->aob.framebufs, &frame->ext);
22822295

2296+
return 0;
2297+
case NGHTTP2_ORIGIN:
2298+
rv = session_predicate_origin_send(session);
2299+
if (rv != 0) {
2300+
return rv;
2301+
}
2302+
2303+
rv = nghttp2_frame_pack_origin(&session->aob.framebufs, &frame->ext);
2304+
if (rv != 0) {
2305+
return rv;
2306+
}
2307+
22832308
return 0;
22842309
default:
22852310
/* Unreachable here */
@@ -4385,6 +4410,12 @@ int nghttp2_session_on_settings_received(nghttp2_session *session,
43854410
return session_call_on_frame_received(session, frame);
43864411
}
43874412

4413+
if (!session->remote_settings_received) {
4414+
session->remote_settings.max_concurrent_streams =
4415+
NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS;
4416+
session->remote_settings_received = 1;
4417+
}
4418+
43884419
for (i = 0; i < frame->settings.niv; ++i) {
43894420
nghttp2_settings_entry *entry = &frame->settings.iv[i];
43904421

@@ -4821,6 +4852,11 @@ int nghttp2_session_on_altsvc_received(nghttp2_session *session,
48214852
return session_call_on_frame_received(session, frame);
48224853
}
48234854

4855+
int nghttp2_session_on_origin_received(nghttp2_session *session,
4856+
nghttp2_frame *frame) {
4857+
return session_call_on_frame_received(session, frame);
4858+
}
4859+
48244860
static int session_process_altsvc_frame(nghttp2_session *session) {
48254861
nghttp2_inbound_frame *iframe = &session->iframe;
48264862
nghttp2_frame *frame = &iframe->frame;
@@ -4836,6 +4872,25 @@ static int session_process_altsvc_frame(nghttp2_session *session) {
48364872
return nghttp2_session_on_altsvc_received(session, frame);
48374873
}
48384874

4875+
static int session_process_origin_frame(nghttp2_session *session) {
4876+
nghttp2_inbound_frame *iframe = &session->iframe;
4877+
nghttp2_frame *frame = &iframe->frame;
4878+
nghttp2_mem *mem = &session->mem;
4879+
int rv;
4880+
4881+
rv = nghttp2_frame_unpack_origin_payload(&frame->ext, iframe->lbuf.pos,
4882+
nghttp2_buf_len(&iframe->lbuf), mem);
4883+
if (rv != 0) {
4884+
if (nghttp2_is_fatal(rv)) {
4885+
return rv;
4886+
}
4887+
/* Ignore ORIGIN frame which cannot be parsed. */
4888+
return 0;
4889+
}
4890+
4891+
return nghttp2_session_on_origin_received(session, frame);
4892+
}
4893+
48394894
static int session_process_extension_frame(nghttp2_session *session) {
48404895
int rv;
48414896
nghttp2_inbound_frame *iframe = &session->iframe;
@@ -5746,6 +5801,42 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
57465801
iframe->state = NGHTTP2_IB_READ_NBYTE;
57475802
inbound_frame_set_mark(iframe, 2);
57485803

5804+
break;
5805+
case NGHTTP2_ORIGIN:
5806+
if (!(session->builtin_recv_ext_types & NGHTTP2_TYPEMASK_ORIGIN)) {
5807+
busy = 1;
5808+
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
5809+
break;
5810+
}
5811+
5812+
DEBUGF("recv: ORIGIN\n");
5813+
5814+
iframe->frame.ext.payload = &iframe->ext_frame_payload.origin;
5815+
5816+
if (session->server || iframe->frame.hd.stream_id ||
5817+
(iframe->frame.hd.flags & 0xf0)) {
5818+
busy = 1;
5819+
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
5820+
break;
5821+
}
5822+
5823+
iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
5824+
5825+
if (iframe->payloadleft) {
5826+
iframe->raw_lbuf = nghttp2_mem_malloc(mem, iframe->payloadleft);
5827+
5828+
if (iframe->raw_lbuf == NULL) {
5829+
return NGHTTP2_ERR_NOMEM;
5830+
}
5831+
5832+
nghttp2_buf_wrap_init(&iframe->lbuf, iframe->raw_lbuf,
5833+
iframe->payloadleft);
5834+
} else {
5835+
busy = 1;
5836+
}
5837+
5838+
iframe->state = NGHTTP2_IB_READ_ORIGIN_PAYLOAD;
5839+
57495840
break;
57505841
default:
57515842
busy = 1;
@@ -6583,7 +6674,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
65836674
DEBUGF("recv: [IB_READ_ALTSVC_PAYLOAD]\n");
65846675

65856676
readlen = inbound_frame_payload_readlen(iframe, in, last);
6586-
65876677
if (readlen > 0) {
65886678
iframe->lbuf.last = nghttp2_cpymem(iframe->lbuf.last, in, readlen);
65896679

@@ -6601,11 +6691,44 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
66016691
}
66026692

66036693
rv = session_process_altsvc_frame(session);
6694+
if (nghttp2_is_fatal(rv)) {
6695+
return rv;
6696+
}
6697+
6698+
session_inbound_frame_reset(session);
6699+
6700+
break;
6701+
case NGHTTP2_IB_READ_ORIGIN_PAYLOAD:
6702+
DEBUGF("recv: [IB_READ_ORIGIN_PAYLOAD]\n");
6703+
6704+
readlen = inbound_frame_payload_readlen(iframe, in, last);
6705+
6706+
if (readlen > 0) {
6707+
iframe->lbuf.last = nghttp2_cpymem(iframe->lbuf.last, in, readlen);
6708+
6709+
iframe->payloadleft -= readlen;
6710+
in += readlen;
6711+
}
6712+
6713+
DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
6714+
iframe->payloadleft);
6715+
6716+
if (iframe->payloadleft) {
6717+
assert(nghttp2_buf_avail(&iframe->lbuf) > 0);
6718+
6719+
break;
6720+
}
6721+
6722+
rv = session_process_origin_frame(session);
66046723

66056724
if (nghttp2_is_fatal(rv)) {
66066725
return rv;
66076726
}
66086727

6728+
if (iframe->state == NGHTTP2_IB_IGN_ALL) {
6729+
return (ssize_t)inlen;
6730+
}
6731+
66096732
session_inbound_frame_reset(session);
66106733

66116734
break;
@@ -7085,12 +7208,42 @@ int nghttp2_session_set_stream_user_data(nghttp2_session *session,
70857208
int32_t stream_id,
70867209
void *stream_user_data) {
70877210
nghttp2_stream *stream;
7211+
nghttp2_frame *frame;
7212+
nghttp2_outbound_item *item;
7213+
70887214
stream = nghttp2_session_get_stream(session, stream_id);
7089-
if (!stream) {
7215+
if (stream) {
7216+
stream->stream_user_data = stream_user_data;
7217+
return 0;
7218+
}
7219+
7220+
if (session->server || !nghttp2_session_is_my_stream_id(session, stream_id) ||
7221+
!nghttp2_outbound_queue_top(&session->ob_syn)) {
70907222
return NGHTTP2_ERR_INVALID_ARGUMENT;
70917223
}
7092-
stream->stream_user_data = stream_user_data;
7093-
return 0;
7224+
7225+
frame = &nghttp2_outbound_queue_top(&session->ob_syn)->frame;
7226+
assert(frame->hd.type == NGHTTP2_HEADERS);
7227+
7228+
if (frame->hd.stream_id > stream_id ||
7229+
(uint32_t)stream_id >= session->next_stream_id) {
7230+
return NGHTTP2_ERR_INVALID_ARGUMENT;
7231+
}
7232+
7233+
for (item = session->ob_syn.head; item; item = item->qnext) {
7234+
if (item->frame.hd.stream_id < stream_id) {
7235+
continue;
7236+
}
7237+
7238+
if (item->frame.hd.stream_id > stream_id) {
7239+
break;
7240+
}
7241+
7242+
item->aux_data.headers.stream_user_data = stream_user_data;
7243+
return 0;
7244+
}
7245+
7246+
return NGHTTP2_ERR_INVALID_ARGUMENT;
70947247
}
70957248

70967249
int nghttp2_session_resume_data(nghttp2_session *session, int32_t stream_id) {

‎deps/nghttp2/lib/nghttp2_session.h

+26-9
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_SESSION_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>
@@ -61,7 +61,8 @@ typedef enum {
6161
*/
6262
typedef enum {
6363
NGHTTP2_TYPEMASK_NONE = 0,
64-
NGHTTP2_TYPEMASK_ALTSVC = 1 << 0
64+
NGHTTP2_TYPEMASK_ALTSVC = 1 << 0,
65+
NGHTTP2_TYPEMASK_ORIGIN = 1 << 1
6566
} nghttp2_typemask;
6667

6768
typedef enum {
@@ -121,6 +122,7 @@ typedef enum {
121122
NGHTTP2_IB_IGN_DATA,
122123
NGHTTP2_IB_IGN_ALL,
123124
NGHTTP2_IB_READ_ALTSVC_PAYLOAD,
125+
NGHTTP2_IB_READ_ORIGIN_PAYLOAD,
124126
NGHTTP2_IB_READ_EXTENSION_PAYLOAD
125127
} nghttp2_inbound_state;
126128

@@ -301,8 +303,10 @@ struct nghttp2_session {
301303
increased/decreased by submitting WINDOW_UPDATE. See
302304
nghttp2_submit_window_update(). */
303305
int32_t local_window_size;
304-
/* Settings value received from the remote endpoint. We just use ID
305-
as index. The index = 0 is unused. */
306+
/* This flag is used to indicate that the local endpoint received initial
307+
SETTINGS frame from the remote endpoint. */
308+
uint8_t remote_settings_received;
309+
/* Settings value received from the remote endpoint. */
306310
nghttp2_settings_storage remote_settings;
307311
/* Settings value of the local endpoint. */
308312
nghttp2_settings_storage local_settings;
@@ -698,7 +702,7 @@ int nghttp2_session_on_push_promise_received(nghttp2_session *session,
698702
* NGHTTP2_ERR_NOMEM
699703
* Out of memory.
700704
* NGHTTP2_ERR_CALLBACK_FAILURE
701-
* The callback function failed.
705+
* The callback function failed.
702706
* NGHTTP2_ERR_FLOODED
703707
* There are too many items in outbound queue, and this is most
704708
* likely caused by misbehaviour of peer.
@@ -716,7 +720,7 @@ int nghttp2_session_on_ping_received(nghttp2_session *session,
716720
* NGHTTP2_ERR_NOMEM
717721
* Out of memory.
718722
* NGHTTP2_ERR_CALLBACK_FAILURE
719-
* The callback function failed.
723+
* The callback function failed.
720724
*/
721725
int nghttp2_session_on_goaway_received(nghttp2_session *session,
722726
nghttp2_frame *frame);
@@ -731,7 +735,7 @@ int nghttp2_session_on_goaway_received(nghttp2_session *session,
731735
* NGHTTP2_ERR_NOMEM
732736
* Out of memory.
733737
* NGHTTP2_ERR_CALLBACK_FAILURE
734-
* The callback function failed.
738+
* The callback function failed.
735739
*/
736740
int nghttp2_session_on_window_update_received(nghttp2_session *session,
737741
nghttp2_frame *frame);
@@ -744,11 +748,24 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
744748
* negative error codes:
745749
*
746750
* NGHTTP2_ERR_CALLBACK_FAILURE
747-
* The callback function failed.
751+
* The callback function failed.
748752
*/
749753
int nghttp2_session_on_altsvc_received(nghttp2_session *session,
750754
nghttp2_frame *frame);
751755

756+
/*
757+
* Called when ORIGIN is received, assuming |frame| is properly
758+
* initialized.
759+
*
760+
* This function returns 0 if it succeeds, or one of the following
761+
* negative error codes:
762+
*
763+
* NGHTTP2_ERR_CALLBACK_FAILURE
764+
* The callback function failed.
765+
*/
766+
int nghttp2_session_on_origin_received(nghttp2_session *session,
767+
nghttp2_frame *frame);
768+
752769
/*
753770
* Called when DATA is received, assuming |frame| is properly
754771
* initialized.
@@ -759,7 +776,7 @@ int nghttp2_session_on_altsvc_received(nghttp2_session *session,
759776
* NGHTTP2_ERR_NOMEM
760777
* Out of memory.
761778
* NGHTTP2_ERR_CALLBACK_FAILURE
762-
* The callback function failed.
779+
* The callback function failed.
763780
*/
764781
int nghttp2_session_on_data_received(nghttp2_session *session,
765782
nghttp2_frame *frame);

‎deps/nghttp2/lib/nghttp2_stream.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_STREAM_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_submit.c

+83
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,89 @@ int nghttp2_submit_altsvc(nghttp2_session *session, uint8_t flags,
571571
return rv;
572572
}
573573

574+
int nghttp2_submit_origin(nghttp2_session *session, uint8_t flags,
575+
const nghttp2_origin_entry *ov, size_t nov) {
576+
nghttp2_mem *mem;
577+
uint8_t *p;
578+
nghttp2_outbound_item *item;
579+
nghttp2_frame *frame;
580+
nghttp2_ext_origin *origin;
581+
nghttp2_origin_entry *ov_copy;
582+
size_t len = 0;
583+
size_t i;
584+
int rv;
585+
(void)flags;
586+
587+
mem = &session->mem;
588+
589+
if (!session->server) {
590+
return NGHTTP2_ERR_INVALID_STATE;
591+
}
592+
593+
if (nov) {
594+
for (i = 0; i < nov; ++i) {
595+
len += ov[i].origin_len;
596+
}
597+
598+
if (2 * nov + len > NGHTTP2_MAX_PAYLOADLEN) {
599+
return NGHTTP2_ERR_INVALID_ARGUMENT;
600+
}
601+
602+
/* The last nov is added for terminal NULL character. */
603+
ov_copy =
604+
nghttp2_mem_malloc(mem, nov * sizeof(nghttp2_origin_entry) + len + nov);
605+
if (ov_copy == NULL) {
606+
return NGHTTP2_ERR_NOMEM;
607+
}
608+
609+
p = (uint8_t *)ov_copy + nov * sizeof(nghttp2_origin_entry);
610+
611+
for (i = 0; i < nov; ++i) {
612+
ov_copy[i].origin = p;
613+
ov_copy[i].origin_len = ov[i].origin_len;
614+
p = nghttp2_cpymem(p, ov[i].origin, ov[i].origin_len);
615+
*p++ = '\0';
616+
}
617+
618+
assert((size_t)(p - (uint8_t *)ov_copy) ==
619+
nov * sizeof(nghttp2_origin_entry) + len + nov);
620+
} else {
621+
ov_copy = NULL;
622+
}
623+
624+
item = nghttp2_mem_malloc(mem, sizeof(nghttp2_outbound_item));
625+
if (item == NULL) {
626+
rv = NGHTTP2_ERR_NOMEM;
627+
goto fail_item_malloc;
628+
}
629+
630+
nghttp2_outbound_item_init(item);
631+
632+
item->aux_data.ext.builtin = 1;
633+
634+
origin = &item->ext_frame_payload.origin;
635+
636+
frame = &item->frame;
637+
frame->ext.payload = origin;
638+
639+
nghttp2_frame_origin_init(&frame->ext, ov_copy, nov);
640+
641+
rv = nghttp2_session_add_item(session, item);
642+
if (rv != 0) {
643+
nghttp2_frame_origin_free(&frame->ext, mem);
644+
nghttp2_mem_free(mem, item);
645+
646+
return rv;
647+
}
648+
649+
return 0;
650+
651+
fail_item_malloc:
652+
free(ov_copy);
653+
654+
return rv;
655+
}
656+
574657
static uint8_t set_request_flags(const nghttp2_priority_spec *pri_spec,
575658
const nghttp2_data_provider *data_prd) {
576659
uint8_t flags = NGHTTP2_FLAG_NONE;

‎deps/nghttp2/lib/nghttp2_submit.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NGHTTP2_SUBMIT_H
2727

2828
#ifdef HAVE_CONFIG_H
29-
#include <config.h>
29+
# include <config.h>
3030
#endif /* HAVE_CONFIG_H */
3131

3232
#include <nghttp2/nghttp2.h>

‎deps/nghttp2/lib/nghttp2_version.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424
*/
2525
#ifdef HAVE_CONFIG_H
26-
#include <config.h>
26+
# include <config.h>
2727
#endif /* HAVE_CONFIG_H */
2828

2929
#include <nghttp2/nghttp2.h>

0 commit comments

Comments
 (0)
Please sign in to comment.