mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
Compare commits
1096 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
957abacf99 | ||
|
|
83d362c6d2 | ||
|
|
a76d0723b5 | ||
|
|
db2f612a30 | ||
|
|
7ffc239b5f | ||
|
|
bc886a0e0d | ||
|
|
a3a14a9cde | ||
|
|
acfb360770 | ||
|
|
bdfd14c2b7 | ||
|
|
cddc09feaa | ||
|
|
3c3b6ae8ca | ||
|
|
2f83aa9e1b | ||
|
|
fc591d0cd6 | ||
|
|
9a17c3efc6 | ||
|
|
b7220f075c | ||
|
|
a1556fd11f | ||
|
|
77f1c872b1 | ||
|
|
49ce44e1f5 | ||
|
|
f54b3ffc0e | ||
|
|
b0f5e5cc79 | ||
|
|
8d6ecd66cc | ||
|
|
f82fb52187 | ||
|
|
2e1975ddf6 | ||
|
|
97ce392bcc | ||
|
|
afefbda518 | ||
|
|
4fca2502d8 | ||
|
|
6975c336fc | ||
|
|
0288093caf | ||
|
|
a3a034813b | ||
|
|
c64d2573dc | ||
|
|
f028cc4392 | ||
|
|
302e37460f | ||
|
|
3cdbc5f525 | ||
|
|
a69251864b | ||
|
|
45d63d2006 | ||
|
|
cbba1ebf8f | ||
|
|
e86d1378da | ||
|
|
4a9d200554 | ||
|
|
acf6a9229d | ||
|
|
4ff4582132 | ||
|
|
42dce01ec1 | ||
|
|
a35059e3f1 | ||
|
|
5a30fafdda | ||
|
|
dce91ad37c | ||
|
|
2cff8b43cf | ||
|
|
be96654d56 | ||
|
|
ce962c3fdf | ||
|
|
f931504e1c | ||
|
|
d978f351da | ||
|
|
ec519f22dc | ||
|
|
e8b213e367 | ||
|
|
cfb47d30a5 | ||
|
|
dbbe4e017a | ||
|
|
371bc3a8f7 | ||
|
|
5e7889c5ef | ||
|
|
b1b2ad5017 | ||
|
|
e043ca83c5 | ||
|
|
c2434dfbbc | ||
|
|
816ad2102f | ||
|
|
f5feb16ef4 | ||
|
|
adf09f2124 | ||
|
|
2591960e2f | ||
|
|
d93842db3e | ||
|
|
8dc2b263ba | ||
|
|
8d842701b5 | ||
|
|
de85b0fda5 | ||
|
|
5d6beed590 | ||
|
|
1ff9de4c87 | ||
|
|
34482ed4df | ||
|
|
9b6ced66f3 | ||
|
|
e7e8ee5fe6 | ||
|
|
b3b4e33535 | ||
|
|
bd93d90a89 | ||
|
|
ea69c84b33 | ||
|
|
783b649bb1 | ||
|
|
eb21e6f8f7 | ||
|
|
ab2aa5672b | ||
|
|
ff87a54202 | ||
|
|
439dbce679 | ||
|
|
e9c9838cdc | ||
|
|
803d4ba948 | ||
|
|
732245e562 | ||
|
|
9e8d5433e7 | ||
|
|
fdcdb21c38 | ||
|
|
11d0533cfc | ||
|
|
dbb5f00d68 | ||
|
|
9cc412e2fd | ||
|
|
5b2efc0a12 | ||
|
|
7e4c48a461 | ||
|
|
082e162f3c | ||
|
|
7cc7c06c7b | ||
|
|
12ebeb30d0 | ||
|
|
c78abbe1d2 | ||
|
|
124c7848c0 | ||
|
|
ce9667c4f5 | ||
|
|
f3f40840b3 | ||
|
|
2c1570595e | ||
|
|
302abf1b46 | ||
|
|
089a03be42 | ||
|
|
de4fe72861 | ||
|
|
d1b3a83f59 | ||
|
|
eb6792533d | ||
|
|
6800d317e7 | ||
|
|
c98362eab1 | ||
|
|
e520469b3e | ||
|
|
54067256eb | ||
|
|
c4d2eeeec7 | ||
|
|
f51e696e4a | ||
|
|
a433b132fc | ||
|
|
cf48a56d2e | ||
|
|
6cad1b243b | ||
|
|
3c393dca58 | ||
|
|
172924457f | ||
|
|
f6644a92af | ||
|
|
48998f7239 | ||
|
|
15ff52f9fb | ||
|
|
6c03bb142b | ||
|
|
524b439221 | ||
|
|
859bf2bc41 | ||
|
|
b5619fb156 | ||
|
|
dcbe0c690f | ||
|
|
2996c28456 | ||
|
|
42e8ceb656 | ||
|
|
1daf9ce8b7 | ||
|
|
d68edf56c0 | ||
|
|
0c4e9fef29 | ||
|
|
571404c6e8 | ||
|
|
4d562b773b | ||
|
|
e62258713e | ||
|
|
4bd075defd | ||
|
|
b46a324943 | ||
|
|
4bd44b9cdf | ||
|
|
1b42110d4f | ||
|
|
0735ec55f3 | ||
|
|
00554779e1 | ||
|
|
0963f38935 | ||
|
|
1abfa3ca5f | ||
|
|
f2159bc2c1 | ||
|
|
b0eb68ee9e | ||
|
|
e7b7b037f6 | ||
|
|
5e4f434fd8 | ||
|
|
20ea964f2f | ||
|
|
d105619bc3 | ||
|
|
ec5729b1fa | ||
|
|
6c9196953e | ||
|
|
46576178a3 | ||
|
|
5e925f873e | ||
|
|
153531d4d0 | ||
|
|
f7287df03f | ||
|
|
2b085815b7 | ||
|
|
986fa30264 | ||
|
|
7c8cb3a0ce | ||
|
|
334c439ce0 | ||
|
|
6c17ed7e61 | ||
|
|
6700626c30 | ||
|
|
15162addc4 | ||
|
|
9327077741 | ||
|
|
aeb92bbbe2 | ||
|
|
fc7489e044 | ||
|
|
87ac872fdc | ||
|
|
c278adde7a | ||
|
|
f94d720909 | ||
|
|
9b9baa6bd9 | ||
|
|
02566ee383 | ||
|
|
3002f31b1f | ||
|
|
d2a594a753 | ||
|
|
651e147711 | ||
|
|
a42faf1cc2 | ||
|
|
4aac05e193 | ||
|
|
b80dfaa8a0 | ||
|
|
a19d8f5d31 | ||
|
|
33f6e90a56 | ||
|
|
ed7fabcbc2 | ||
|
|
8753b6da14 | ||
|
|
f2de733bdf | ||
|
|
88ff8c69a0 | ||
|
|
a63558a1eb | ||
|
|
3575a1325e | ||
|
|
e2de2fee69 | ||
|
|
9f415979fb | ||
|
|
4bfc0cd196 | ||
|
|
9c824b87fe | ||
|
|
a1ea1696be | ||
|
|
dfc0f248c6 | ||
|
|
ed7c9db2a6 | ||
|
|
5b42815afb | ||
|
|
cfe7fa9a75 | ||
|
|
cb8a9d58fd | ||
|
|
023b94480b | ||
|
|
9b03c64f68 | ||
|
|
b8eccec62d | ||
|
|
9f21258720 | ||
|
|
47f6012407 | ||
|
|
770e44de4d | ||
|
|
2ab319c137 | ||
|
|
3992302432 | ||
|
|
b30f312a70 | ||
|
|
c5cdb78a95 | ||
|
|
d82811303b | ||
|
|
f79a58120e | ||
|
|
9d843334d6 | ||
|
|
23cb3f38a6 | ||
|
|
1d682dcdae | ||
|
|
601fbbb4ae | ||
|
|
f44aa2466f | ||
|
|
dd74a6dd34 | ||
|
|
e959e7338e | ||
|
|
fb9a204de2 | ||
|
|
cd096802bd | ||
|
|
7417fd71a4 | ||
|
|
2d1a981c81 | ||
|
|
45acc922eb | ||
|
|
214d089910 | ||
|
|
31fd707d0c | ||
|
|
9a2e38e058 | ||
|
|
d24527e7e6 | ||
|
|
6195d747ce | ||
|
|
fb97f596e1 | ||
|
|
0ccc7a770d | ||
|
|
32826466f5 | ||
|
|
0422f8a844 | ||
|
|
e329479a99 | ||
|
|
f80a7873ba | ||
|
|
866ac6ab27 | ||
|
|
b574ae6aa2 | ||
|
|
de4fd7cd35 | ||
|
|
32d7883c47 | ||
|
|
9b24e19763 | ||
|
|
13ffece12d | ||
|
|
9d5b781df6 | ||
|
|
11d822c2a7 | ||
|
|
4098512b5d | ||
|
|
7e06ac1072 | ||
|
|
c6d8c4013c | ||
|
|
e5b3f9addd | ||
|
|
880f948684 | ||
|
|
bda7e079e2 | ||
|
|
fc94018b97 | ||
|
|
159c5e446a | ||
|
|
bfd4d8b052 | ||
|
|
388e785822 | ||
|
|
2ba1389993 | ||
|
|
d65a417306 | ||
|
|
575bc309b9 | ||
|
|
00909d0742 | ||
|
|
a7e38724e7 | ||
|
|
325612bcde | ||
|
|
8034221525 | ||
|
|
2e6593e5a5 | ||
|
|
572735e496 | ||
|
|
e8d693c395 | ||
|
|
f44dfcd9dc | ||
|
|
1f1b0d93d4 | ||
|
|
ce8c749b77 | ||
|
|
3e4f257b91 | ||
|
|
86fab997b4 | ||
|
|
c3ecd44592 | ||
|
|
c65ca20a49 | ||
|
|
a5c408c5e3 | ||
|
|
06379b2861 | ||
|
|
e04de48ed9 | ||
|
|
009646421c | ||
|
|
8d0b4544f8 | ||
|
|
d8a34131e1 | ||
|
|
5db17d0af9 | ||
|
|
1bf69b5662 | ||
|
|
3febaef1fa | ||
|
|
b1bd6035e8 | ||
|
|
b48bcb214a | ||
|
|
6f3ce2c72d | ||
|
|
2f9121cf44 | ||
|
|
e65e7711ca | ||
|
|
636ef51b0f | ||
|
|
400934e5a3 | ||
|
|
4c3a3acf9b | ||
|
|
9aa6002c37 | ||
|
|
f342260bfe | ||
|
|
a6dd497016 | ||
|
|
842509dab6 | ||
|
|
4add618a3f | ||
|
|
6e74466231 | ||
|
|
478eac099f | ||
|
|
88e2029e37 | ||
|
|
45d76cf501 | ||
|
|
54573f28a8 | ||
|
|
17793e99dc | ||
|
|
5eac3c9025 | ||
|
|
e70195ae91 | ||
|
|
fe51e7fa1a | ||
|
|
eb951c2ce4 | ||
|
|
39f0ce7c25 | ||
|
|
65157811d4 | ||
|
|
e8af7afc65 | ||
|
|
38abfd1863 | ||
|
|
ff3edc09ed | ||
|
|
0bb1540682 | ||
|
|
f0836c7e39 | ||
|
|
25db178b7d | ||
|
|
1b6713e6ec | ||
|
|
c1a496cf4e | ||
|
|
e098a21132 | ||
|
|
0ba4bf51e4 | ||
|
|
6deee2037d | ||
|
|
6761a933fe | ||
|
|
5cc3d159e1 | ||
|
|
652f57e79d | ||
|
|
acd6b40e4c | ||
|
|
0fbb46edd6 | ||
|
|
6ad629de47 | ||
|
|
74754982f1 | ||
|
|
a31a2e3b2c | ||
|
|
a776b0dbcc | ||
|
|
cfd926f09b | ||
|
|
72f52716ae | ||
|
|
439b9b6c6a | ||
|
|
4849845292 | ||
|
|
d30f38163c | ||
|
|
cff9ebe1dd | ||
|
|
4d1139f653 | ||
|
|
48f574076c | ||
|
|
c1f14d73c7 | ||
|
|
216f4dad83 | ||
|
|
a4e27d766b | ||
|
|
96df14d2ec | ||
|
|
2365f12e39 | ||
|
|
96ea9cdaf7 | ||
|
|
03f7ec0f60 | ||
|
|
a941699962 | ||
|
|
2056e812bd | ||
|
|
04348ff20e | ||
|
|
d8e378fea9 | ||
|
|
1ebb6810a1 | ||
|
|
2a694b270a | ||
|
|
a3ebeeafba | ||
|
|
422ad1be32 | ||
|
|
97f1735cf5 | ||
|
|
939ad5ddbe | ||
|
|
24d92b979d | ||
|
|
4c92ff1843 | ||
|
|
280db5c6ba | ||
|
|
7fbcb2d005 | ||
|
|
53aeb2c3d7 | ||
|
|
ff200bfcf3 | ||
|
|
fee3151fd2 | ||
|
|
99a85159ae | ||
|
|
2a981a3f56 | ||
|
|
0028275d7b | ||
|
|
ee8bfddfc9 | ||
|
|
194acb1f2c | ||
|
|
43a2a70ae7 | ||
|
|
73344ae9aa | ||
|
|
c479f6122f | ||
|
|
eca0a3025b | ||
|
|
4720c5cb3d | ||
|
|
cd55ab28ab | ||
|
|
d402cfdf16 | ||
|
|
22502182d0 | ||
|
|
05e1fd5e77 | ||
|
|
943d7923f9 | ||
|
|
568ecbfb28 | ||
|
|
f5ddd7f43b | ||
|
|
88abbce7e7 | ||
|
|
16e9036568 | ||
|
|
fa7945c627 | ||
|
|
daca43f0dd | ||
|
|
16bc11e670 | ||
|
|
6f7e94cdba | ||
|
|
61efa15a14 | ||
|
|
8c0ea56bb8 | ||
|
|
549053710b | ||
|
|
6010d39325 | ||
|
|
be5c39a1cf | ||
|
|
b8fda6808b | ||
|
|
e29b9c1261 | ||
|
|
539e27812b | ||
|
|
7008afd40e | ||
|
|
77a41756db | ||
|
|
b15045d60e | ||
|
|
03084f7517 | ||
|
|
60baca27e4 | ||
|
|
86990db236 | ||
|
|
cb376bcd80 | ||
|
|
f2b8edd1e2 | ||
|
|
c4f8afcfde | ||
|
|
1a1a216d5a | ||
|
|
9f80a82c1a | ||
|
|
c573c80bd3 | ||
|
|
3cd6817e21 | ||
|
|
d4a69658a1 | ||
|
|
8e06fe4971 | ||
|
|
aaeeec8f1c | ||
|
|
66d5e24606 | ||
|
|
e8907a073f | ||
|
|
9656ac0254 | ||
|
|
75624617ce | ||
|
|
1a8f6578b3 | ||
|
|
4f0548b018 | ||
|
|
5119e82b93 | ||
|
|
3be5856c82 | ||
|
|
a319143901 | ||
|
|
17c88d60c7 | ||
|
|
7601511fdf | ||
|
|
f507b5eee4 | ||
|
|
93821165be | ||
|
|
aaa0b858e4 | ||
|
|
5fa1938691 | ||
|
|
56ee3d4820 | ||
|
|
c2d9a1ed6f | ||
|
|
fcf9ab2798 | ||
|
|
35e445bd04 | ||
|
|
88ce3c31b7 | ||
|
|
16320a0f81 | ||
|
|
8c72fb3539 | ||
|
|
8ffe389daa | ||
|
|
189a4516a1 | ||
|
|
2576855ded | ||
|
|
7d4d48a35e | ||
|
|
cc6f759190 | ||
|
|
c23fc86a23 | ||
|
|
d2324bdda1 | ||
|
|
6f0ae9d49a | ||
|
|
0389af5724 | ||
|
|
1766e25f45 | ||
|
|
323001238a | ||
|
|
91f062f873 | ||
|
|
650a0cfbff | ||
|
|
e6b8b3d1d3 | ||
|
|
a170023f23 | ||
|
|
4be4c0cddc | ||
|
|
0de9d374df | ||
|
|
0df199198a | ||
|
|
7646e376e0 | ||
|
|
5996798a34 | ||
|
|
6fec532012 | ||
|
|
15713e0b7c | ||
|
|
a6a561af47 | ||
|
|
09c468a4b4 | ||
|
|
bcda1c2409 | ||
|
|
afcd8d9ab1 | ||
|
|
c9b1c91944 | ||
|
|
5d9434eb09 | ||
|
|
1a44b5d52a | ||
|
|
6635ca5e26 | ||
|
|
9c6c78833b | ||
|
|
9a9ab0813c | ||
|
|
0ccaaa48ce | ||
|
|
3f2fe98dd1 | ||
|
|
0d91e9c255 | ||
|
|
af926fbe1f | ||
|
|
83039ae2d4 | ||
|
|
4c53da6961 | ||
|
|
eb306f463e | ||
|
|
788835c5fd | ||
|
|
4d76606fa2 | ||
|
|
1baf7d34b3 | ||
|
|
c78159469a | ||
|
|
b72ca0289c | ||
|
|
46f670f8a2 | ||
|
|
4b44362b9f | ||
|
|
d068a29798 | ||
|
|
0836a51408 | ||
|
|
566cee8fe7 | ||
|
|
e85698e131 | ||
|
|
5f3c541c4c | ||
|
|
3c43e00d8a | ||
|
|
92d686d356 | ||
|
|
0f69e9c825 | ||
|
|
217d979458 | ||
|
|
cc289972fc | ||
|
|
c601e603c2 | ||
|
|
1002c6da1c | ||
|
|
0911337689 | ||
|
|
3bcc416e13 | ||
|
|
65837806f5 | ||
|
|
b0772dcc66 | ||
|
|
c6d65aad3b | ||
|
|
18dd20ce55 | ||
|
|
0f6d76a501 | ||
|
|
0f1320109f | ||
|
|
defa28c618 | ||
|
|
b7c95be47c | ||
|
|
a18d154e0e | ||
|
|
52195a12ee | ||
|
|
59c78d5809 | ||
|
|
be164fc8f9 | ||
|
|
5833ef1efc | ||
|
|
28f88d46f3 | ||
|
|
6ec7683991 | ||
|
|
fb2d8f79d6 | ||
|
|
8f7fa1b1bf | ||
|
|
e5889ce622 | ||
|
|
3a6f83394c | ||
|
|
acf36f3d1a | ||
|
|
63e6a8bab2 | ||
|
|
5361cc6bd1 | ||
|
|
cabac55394 | ||
|
|
db7483ef10 | ||
|
|
4b51ccbefe | ||
|
|
74c2f1257a | ||
|
|
1428a5e3ae | ||
|
|
fe021c1524 | ||
|
|
c57bf21306 | ||
|
|
1743b7d92d | ||
|
|
7f31278c4c | ||
|
|
8401e16a15 | ||
|
|
07fb5854f3 | ||
|
|
b56a99bfba | ||
|
|
b91e4e4df1 | ||
|
|
52a4d6ac31 | ||
|
|
796ab87b14 | ||
|
|
ed1fad3bd4 | ||
|
|
9c1876f542 | ||
|
|
7d111d9963 | ||
|
|
8c2ce0cf3f | ||
|
|
1b442cb16f | ||
|
|
2bf3680d87 | ||
|
|
0d4f0f0db5 | ||
|
|
e17ff8fd32 | ||
|
|
14edd12304 | ||
|
|
e6ffdb23a4 | ||
|
|
98fdedac06 | ||
|
|
255037264a | ||
|
|
d3fcbe9a02 | ||
|
|
bcdd588c6e | ||
|
|
b5007d45f7 | ||
|
|
a584cf5a4f | ||
|
|
77f7a2fa7f | ||
|
|
f2c539dc70 | ||
|
|
78d7160a99 | ||
|
|
196673bbce | ||
|
|
794d13082c | ||
|
|
5f5cf4107e | ||
|
|
6f3ec54b9f | ||
|
|
58043a6b04 | ||
|
|
a885315ef5 | ||
|
|
d7581525ac | ||
|
|
385068eb91 | ||
|
|
1085f68018 | ||
|
|
21af775ce0 | ||
|
|
bf16fee6e9 | ||
|
|
2358a2137a | ||
|
|
66baa7dc25 | ||
|
|
d63b4c1034 | ||
|
|
963e220a1c | ||
|
|
2f146e4d4c | ||
|
|
f796eede5a | ||
|
|
c89453be95 | ||
|
|
c3f5f5ca36 | ||
|
|
911d12f7c4 | ||
|
|
34d3c45d35 | ||
|
|
17614312e0 | ||
|
|
977779ae8d | ||
|
|
a2e35a0757 | ||
|
|
a4a2b6403b | ||
|
|
8ce8e289c9 | ||
|
|
03be97e437 | ||
|
|
2c5cf5a82a | ||
|
|
0a2d1965df | ||
|
|
c8a5f1e335 | ||
|
|
5e00cf9620 | ||
|
|
ce6370e25c | ||
|
|
3f8c1e4b34 | ||
|
|
25cda200be | ||
|
|
a1bc83a2ba | ||
|
|
bc3949db9e | ||
|
|
6cfa885207 | ||
|
|
899588e0b5 | ||
|
|
49af52a68d | ||
|
|
ec908af19c | ||
|
|
e61ac4682e | ||
|
|
4d10dce61d | ||
|
|
c569830dfc | ||
|
|
2d9fd87029 | ||
|
|
2670bfb8ba | ||
|
|
cc9190ab37 | ||
|
|
980570de71 | ||
|
|
ef92b54db3 | ||
|
|
0130124cea | ||
|
|
e2a7e867f9 | ||
|
|
32ce0ce5d9 | ||
|
|
28082ff5f5 | ||
|
|
46ccc4332c | ||
|
|
3a1217e667 | ||
|
|
39fd0c1278 | ||
|
|
4e6bd54dd1 | ||
|
|
5c9f46a6b0 | ||
|
|
7d53866157 | ||
|
|
9a2e948c42 | ||
|
|
223e971c7e | ||
|
|
df814223ff | ||
|
|
82b326e684 | ||
|
|
6aa581d2f0 | ||
|
|
8c0b2c684a | ||
|
|
62324781bd | ||
|
|
7ae0b2dc09 | ||
|
|
058122b804 | ||
|
|
69f63c529d | ||
|
|
e17a6b29b6 | ||
|
|
b12c2a13c0 | ||
|
|
236c835abc | ||
|
|
b41a5afe04 | ||
|
|
ad338bfa44 | ||
|
|
a899522679 | ||
|
|
b9b58c781e | ||
|
|
aa1eec4642 | ||
|
|
0c8d9469ea | ||
|
|
079e1bdffc | ||
|
|
b4337d1b54 | ||
|
|
e6a11c5e12 | ||
|
|
dbe287ff5e | ||
|
|
61dc1a7c62 | ||
|
|
dc1e0c0195 | ||
|
|
041531458b | ||
|
|
1374bb81fd | ||
|
|
f41ac103d3 | ||
|
|
f6301714db | ||
|
|
7dc39b1ee9 | ||
|
|
696a7ce407 | ||
|
|
d28d788623 | ||
|
|
99122ee7bb | ||
|
|
19ee7ec794 | ||
|
|
cd9ec0d20f | ||
|
|
e77883e980 | ||
|
|
0994c92550 | ||
|
|
465c7208cc | ||
|
|
4f9f181f07 | ||
|
|
b7e7a4bf26 | ||
|
|
c7df65309b | ||
|
|
26900262f3 | ||
|
|
9b5ce36368 | ||
|
|
f69b52b1aa | ||
|
|
1e1d908c12 | ||
|
|
6c69d675da | ||
|
|
feabd6f739 | ||
|
|
1ea590c364 | ||
|
|
b21779e685 | ||
|
|
12a4e7c3a2 | ||
|
|
799a76de74 | ||
|
|
b1fee8ff63 | ||
|
|
9cc223d419 | ||
|
|
20edd64301 | ||
|
|
9aee518352 | ||
|
|
6ca515ea70 | ||
|
|
51b933c5f0 | ||
|
|
3f13d33543 | ||
|
|
85a12429ee | ||
|
|
3e0e3f5459 | ||
|
|
801869a5d5 | ||
|
|
54f4b85beb | ||
|
|
fa074145a4 | ||
|
|
b2d6550179 | ||
|
|
62dd1f5177 | ||
|
|
dc7c12d474 | ||
|
|
a6dda5f91c | ||
|
|
c1f7795dd6 | ||
|
|
4989e6e419 | ||
|
|
d4963bcd32 | ||
|
|
d725255784 | ||
|
|
5f4159a0d7 | ||
|
|
0a2a5e6604 | ||
|
|
acd05f2aa5 | ||
|
|
bb7718a64a | ||
|
|
e59fc725ab | ||
|
|
4fcd0fc144 | ||
|
|
373be22d7e | ||
|
|
b647a7c5b7 | ||
|
|
46ba9e080d | ||
|
|
e1b8317ae8 | ||
|
|
ea67864e08 | ||
|
|
6b286e0d94 | ||
|
|
d10ea5ea06 | ||
|
|
2af57c3cfc | ||
|
|
0c8b1a4f74 | ||
|
|
9d16292fe4 | ||
|
|
e2b9590c0f | ||
|
|
24fb640a55 | ||
|
|
e6a05cb66d | ||
|
|
12f9b09845 | ||
|
|
102b98813f | ||
|
|
1f55e5d34d | ||
|
|
5618e1bbc9 | ||
|
|
450ffaa6f0 | ||
|
|
dc15832030 | ||
|
|
0797e89a90 | ||
|
|
9f1543f81e | ||
|
|
a7c780a732 | ||
|
|
1bd6893084 | ||
|
|
ae21130b13 | ||
|
|
e06ed85747 | ||
|
|
83fd72c97e | ||
|
|
ace40f298d | ||
|
|
1133cc0bbc | ||
|
|
6960039aee | ||
|
|
bf5eeb831b | ||
|
|
e5b84fad09 | ||
|
|
cfb39171a7 | ||
|
|
2f6e1ac336 | ||
|
|
9e8d9d658a | ||
|
|
6ecfac6954 | ||
|
|
368775c2ed | ||
|
|
1e9a094edd | ||
|
|
ceb4dcf3b2 | ||
|
|
d2ef80fe3a | ||
|
|
79ae5aed67 | ||
|
|
56e86cd944 | ||
|
|
19a311ad62 | ||
|
|
b36e53cccd | ||
|
|
f3a5a0a0ec | ||
|
|
001d45efad | ||
|
|
56c455bca4 | ||
|
|
4bf3cb2cc0 | ||
|
|
c78528d54b | ||
|
|
f994664934 | ||
|
|
44e290da66 | ||
|
|
8aed101585 | ||
|
|
54ba1bebf2 | ||
|
|
e44c58282e | ||
|
|
c02b1041d9 | ||
|
|
0d20e07436 | ||
|
|
b7f956c967 | ||
|
|
786f52a81c | ||
|
|
23209baaf5 | ||
|
|
9d2503f9c0 | ||
|
|
1c31213aef | ||
|
|
fdb75ba5fe | ||
|
|
8f888b29bd | ||
|
|
298808f276 | ||
|
|
a231874e1e | ||
|
|
2101f4ae3f | ||
|
|
4a06f9684f | ||
|
|
5f31c09410 | ||
|
|
9a85c5264a | ||
|
|
fd475e4b2f | ||
|
|
5dc1d116c9 | ||
|
|
c566d3f475 | ||
|
|
68a724cf7b | ||
|
|
779ec50e73 | ||
|
|
aad3e275d1 | ||
|
|
1649948e78 | ||
|
|
6d3e010ae7 | ||
|
|
7dddac081e | ||
|
|
588dd33241 | ||
|
|
f0b6b9508d | ||
|
|
14ccb24be5 | ||
|
|
025ec85144 | ||
|
|
bd97886d8e | ||
|
|
0b1ddad62b | ||
|
|
540853bde8 | ||
|
|
c757f7d848 | ||
|
|
052f3a3871 | ||
|
|
2ae83e871b | ||
|
|
1cc08c0a51 | ||
|
|
16be89f9cc | ||
|
|
3ddc446ba2 | ||
|
|
b72c5f104e | ||
|
|
7e6eb7e02a | ||
|
|
712b08e8ed | ||
|
|
fbf156d22d | ||
|
|
965a0e87e5 | ||
|
|
2b55ca1ce6 | ||
|
|
534c01896c | ||
|
|
c25197ac40 | ||
|
|
becae65257 | ||
|
|
ba9f2c3ae2 | ||
|
|
0387525b77 | ||
|
|
5311185333 | ||
|
|
2fc2a27ac1 | ||
|
|
db938afd66 | ||
|
|
89ddc47616 | ||
|
|
90b7849af1 | ||
|
|
3176e872b3 | ||
|
|
16206d5f67 | ||
|
|
0f33749790 | ||
|
|
5e7e4c0cc0 | ||
|
|
25503ad763 | ||
|
|
8f513fceca | ||
|
|
91af4ed70d | ||
|
|
685e926494 | ||
|
|
a2afd393ed | ||
|
|
4e9098bccf | ||
|
|
33aa327ef5 | ||
|
|
9067ff5eee | ||
|
|
efeede4192 | ||
|
|
6a8749873f | ||
|
|
b1b8308555 | ||
|
|
9b574a5a76 | ||
|
|
0567f1f038 | ||
|
|
4be5de1163 | ||
|
|
9db1c9467c | ||
|
|
3444b42d44 | ||
|
|
6595ae26ea | ||
|
|
41d8a3ac09 | ||
|
|
175001a8d9 | ||
|
|
7cf9e00283 | ||
|
|
8a3eb3f066 | ||
|
|
7e1a0d204b | ||
|
|
cbca2e35b5 | ||
|
|
fc9bdf024f | ||
|
|
3f97e6cd3a | ||
|
|
4fa150c494 | ||
|
|
e8b2508036 | ||
|
|
ac399e41ac | ||
|
|
95dd908834 | ||
|
|
9c7e54d9b5 | ||
|
|
3c03024881 | ||
|
|
36dfc0a56a | ||
|
|
55bf6cdb15 | ||
|
|
0abc220013 | ||
|
|
c28900990a | ||
|
|
5108193d7b | ||
|
|
79a24f5dd9 | ||
|
|
83c759572c | ||
|
|
1a07fb000b | ||
|
|
4aab15999d | ||
|
|
441982674f | ||
|
|
8256c6e070 | ||
|
|
ae87a44b94 | ||
|
|
87d1692e27 | ||
|
|
1d2f008656 | ||
|
|
b064d8a9ff | ||
|
|
528af200b6 | ||
|
|
c6827a7dac | ||
|
|
55ecb082ee | ||
|
|
5f2cf461e6 | ||
|
|
b313386988 | ||
|
|
3933280d29 | ||
|
|
2b6073900f | ||
|
|
d1ba43a69f | ||
|
|
a0779edec4 | ||
|
|
d70fefe72f | ||
|
|
b52db072f1 | ||
|
|
ab0b98db61 | ||
|
|
4245d98653 | ||
|
|
93b4866f5b | ||
|
|
25df164219 | ||
|
|
ba03c082e9 | ||
|
|
bcfa333322 | ||
|
|
c4aeadd57d | ||
|
|
e6b4454e48 | ||
|
|
3226d21609 | ||
|
|
3d20c2dce6 | ||
|
|
cd83d70e7b | ||
|
|
a0ce5ea9ab | ||
|
|
3c600c103f | ||
|
|
841ac75c3e | ||
|
|
80a96817aa | ||
|
|
ecc05e0a1a | ||
|
|
359730af54 | ||
|
|
e9cb19c80e | ||
|
|
049e064e28 | ||
|
|
0463928a1e | ||
|
|
02d34c8c4c | ||
|
|
46acf32c41 | ||
|
|
cab0a76795 | ||
|
|
0c76cebbfc | ||
|
|
5029b85b25 | ||
|
|
0b71d9b828 | ||
|
|
464d7c4ec6 | ||
|
|
ed21b631ae | ||
|
|
950e2d9954 | ||
|
|
71c054a789 | ||
|
|
d2f456e5b1 | ||
|
|
30a44b26d3 | ||
|
|
7dff758f8b | ||
|
|
bd3ececdd8 | ||
|
|
77416b0ac2 | ||
|
|
fce9efd341 | ||
|
|
928fda1d70 | ||
|
|
2d9d654507 | ||
|
|
7398e57174 | ||
|
|
503ec82f4d | ||
|
|
22bd9fb530 | ||
|
|
e007b6b031 | ||
|
|
c487cd888f | ||
|
|
fd403a85c8 | ||
|
|
a06a8c36a4 | ||
|
|
0967ee9cb9 | ||
|
|
d66d34f9b9 | ||
|
|
264a98d106 | ||
|
|
7c11d2d9bb | ||
|
|
b58d7b406f | ||
|
|
5ed9e4c83b | ||
|
|
e7da2a669e | ||
|
|
d66377d4b6 | ||
|
|
77a324fa46 | ||
|
|
38b5cad4e3 | ||
|
|
29014643a9 | ||
|
|
0872f6babe | ||
|
|
b6a9cf9ffa | ||
|
|
5645cad577 | ||
|
|
85ba33c08f | ||
|
|
ff64f64e1d | ||
|
|
bdd3425028 | ||
|
|
70e02cddd3 | ||
|
|
d1c0a17cc2 | ||
|
|
35c5cbbc21 | ||
|
|
2ff31bdd2b | ||
|
|
2fa3d34af1 | ||
|
|
fa3452ec68 | ||
|
|
7451f2f212 | ||
|
|
e9ab75a386 | ||
|
|
d83949bc88 | ||
|
|
50f42a80c9 | ||
|
|
00bd76fc3d | ||
|
|
93ea6b581e | ||
|
|
8e52a5c7f3 | ||
|
|
0aa35e574a | ||
|
|
5a81f2441f | ||
|
|
2b75aff32e | ||
|
|
f4474d57ec | ||
|
|
d0310c8aee | ||
|
|
8471c9e92e | ||
|
|
f5a4c9d971 | ||
|
|
a0dd8918eb | ||
|
|
baa9b1cac0 | ||
|
|
38443d2195 | ||
|
|
208d71561a | ||
|
|
25fbc7b435 | ||
|
|
6bd95d885d | ||
|
|
c171097dea | ||
|
|
6bcdb178a5 | ||
|
|
5e10cc4cad | ||
|
|
95e6c875f0 | ||
|
|
6eb2829ee8 | ||
|
|
6ad9ddcdea | ||
|
|
e082b7be72 | ||
|
|
da01d8dedb | ||
|
|
ca6f6511f2 | ||
|
|
ee8440408c | ||
|
|
9cd695a1db | ||
|
|
4b45906f46 | ||
|
|
d448eb54f9 | ||
|
|
65739fe754 | ||
|
|
0344c962f8 | ||
|
|
46d1e6bb55 | ||
|
|
04606b9339 | ||
|
|
7bb083e69e | ||
|
|
3a831fa95c | ||
|
|
5b9cacc2d7 | ||
|
|
10a84f3e3d | ||
|
|
c42715ed6a | ||
|
|
177d51ddab | ||
|
|
6c882e1ece | ||
|
|
f09c5c4bf9 | ||
|
|
08a9a2eca9 | ||
|
|
19f1785cde | ||
|
|
109de15c1f | ||
|
|
8b64e7b4e1 | ||
|
|
a5d66e71d0 | ||
|
|
3de2654223 | ||
|
|
d49bd50908 | ||
|
|
4130c68db1 | ||
|
|
ad3dac81a2 | ||
|
|
0cf6848646 | ||
|
|
e9d562f987 | ||
|
|
bc0f501dd3 | ||
|
|
a591001e7b | ||
|
|
eaa9229d72 | ||
|
|
1d5cde1c6b | ||
|
|
de03c41111 | ||
|
|
19340da8d4 | ||
|
|
5e99531b4d | ||
|
|
bef3d47c16 | ||
|
|
b8f7b474b4 | ||
|
|
1fb291d0e1 | ||
|
|
bc3dc6b765 | ||
|
|
ee7c36c022 | ||
|
|
857791dbb9 | ||
|
|
3c3267ea7d | ||
|
|
d654664fb2 | ||
|
|
1a37044d3c | ||
|
|
00a8c378d4 | ||
|
|
7549341081 | ||
|
|
5db8473f12 | ||
|
|
00b89f10bd | ||
|
|
281df33f40 | ||
|
|
e6ae681f07 | ||
|
|
7e681dc98f | ||
|
|
412c8f9e67 | ||
|
|
2795da840c | ||
|
|
175c7886ea | ||
|
|
4a4b2cf538 | ||
|
|
2c2188c09d | ||
|
|
1f07c24a2e | ||
|
|
e038625881 | ||
|
|
cdb1d6b462 | ||
|
|
1b4ccd0d51 | ||
|
|
8babaac8c3 | ||
|
|
d1624d6929 | ||
|
|
e4472b5aec | ||
|
|
9439ba75d3 | ||
|
|
9254c563ca | ||
|
|
35594e09df | ||
|
|
96ff3be5e6 | ||
|
|
3d5d76ba74 | ||
|
|
8c1e155f44 | ||
|
|
dba0d2791c | ||
|
|
f310e82fc8 | ||
|
|
1240e55bb6 | ||
|
|
75039c573c | ||
|
|
4b5179a544 | ||
|
|
8efccddcf4 | ||
|
|
97843e3874 | ||
|
|
5dd2704051 | ||
|
|
de7b7fd440 | ||
|
|
1037d3ad26 | ||
|
|
c4368a9416 | ||
|
|
fdc1eb526b | ||
|
|
99a91e3172 | ||
|
|
272cfa320e | ||
|
|
f5285d1f5a | ||
|
|
ede6104900 | ||
|
|
5aec60fbeb | ||
|
|
e1a865c406 | ||
|
|
5e03b6a0db | ||
|
|
b85924bf70 | ||
|
|
19707aac55 | ||
|
|
9ad873fc06 | ||
|
|
8a9810ed32 | ||
|
|
68a6d8c50b | ||
|
|
600605400c | ||
|
|
97aa4dabc8 | ||
|
|
a6f487240d | ||
|
|
da135416bb | ||
|
|
13eb881e5e | ||
|
|
82c84d163b | ||
|
|
a526183928 | ||
|
|
60222ae7c3 | ||
|
|
2052a1a4bd | ||
|
|
183be9cac9 | ||
|
|
69b53b9aaa | ||
|
|
02b9fcd332 | ||
|
|
231d739b10 | ||
|
|
e1dfff8929 | ||
|
|
db1716ae93 | ||
|
|
4cdc74c957 | ||
|
|
2c17ec3df8 | ||
|
|
e464b10fc3 | ||
|
|
03ba399176 | ||
|
|
751d66a397 | ||
|
|
3ec71bf5a2 | ||
|
|
f19b0724a3 | ||
|
|
a7e0a69f97 | ||
|
|
e532e20491 | ||
|
|
3e1cfa8e99 | ||
|
|
a100df9cae | ||
|
|
56284b1e15 | ||
|
|
f267e400fa | ||
|
|
8bac5899cc | ||
|
|
f4016644a9 | ||
|
|
d9bc6d04f7 | ||
|
|
743fc4a3c3 | ||
|
|
392256e542 | ||
|
|
905e16cb99 | ||
|
|
9d4e8eeb12 | ||
|
|
8099dd9558 | ||
|
|
a3a6b91c5f | ||
|
|
d9bb3448bf | ||
|
|
d508a0c72c | ||
|
|
bc31146c1f | ||
|
|
1ad7d5e366 | ||
|
|
456038e3de | ||
|
|
9aa26970be | ||
|
|
20c39fa843 | ||
|
|
f5a2f1da25 | ||
|
|
27b250ac8e | ||
|
|
b14375ec63 | ||
|
|
6858cda366 | ||
|
|
8a703d21ae | ||
|
|
1dabe43ff4 | ||
|
|
900aef10da | ||
|
|
ded576f423 | ||
|
|
136aae725f | ||
|
|
a60c3f8939 | ||
|
|
99dc31ff1a | ||
|
|
7673848325 | ||
|
|
0f8a5ffc23 | ||
|
|
fddb019baf | ||
|
|
72bf7d4af0 | ||
|
|
581e0938a9 | ||
|
|
1064e017c6 | ||
|
|
79b07f0ce2 | ||
|
|
cd471a989a | ||
|
|
0ea44072a3 | ||
|
|
6ba1abac6c | ||
|
|
0110d2f9f8 | ||
|
|
baa0f60dc8 | ||
|
|
69aa70086a | ||
|
|
13d3f785bd | ||
|
|
39c068974d | ||
|
|
0d4d1a63d4 | ||
|
|
833cd962a1 | ||
|
|
e693f75670 | ||
|
|
759f6c0b39 | ||
|
|
3e0d73c01d | ||
|
|
5cf21ec187 |
111
.clang-format
111
.clang-format
@@ -1,57 +1,120 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
BreakBeforeBinaryOperators: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeInheritanceComma: false
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BinPackParameters: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
- Regex: '^(<|"(gtest|isl|json)/)'
|
||||
Priority: 3
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '$'
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: false
|
||||
IndentFunctionDeclarationAfterType: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
ReflowComments: true
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
Cpp11BracedListStyle: true
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
IndentWidth: 2
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
BreakBeforeBraces: Attach
|
||||
SpacesInParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
ContinuationIndentWidth: 4
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
SpaceBeforeParens: ControlStatements
|
||||
DisableFormat: false
|
||||
...
|
||||
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -3,4 +3,5 @@
|
||||
url = https://github.com/mruby/mruby
|
||||
[submodule "third-party/neverbleed"]
|
||||
path = third-party/neverbleed
|
||||
url = https://github.com/h2o/neverbleed.git
|
||||
url = https://github.com/tatsuhiro-t/neverbleed.git
|
||||
branch = openssl111fix
|
||||
|
||||
85
.travis.yml
85
.travis.yml
@@ -1,20 +1,27 @@
|
||||
dist: xenial
|
||||
os:
|
||||
- linux
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
env:
|
||||
matrix:
|
||||
- CI_BUILD=cmake
|
||||
- CI_BUILD=autotools
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
osx_image: xcode10.2
|
||||
env: CI_BUILD=autotools
|
||||
language: cpp
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
sudo: false
|
||||
sudo: required
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- george-edison55-precise-backports
|
||||
packages:
|
||||
- g++-4.9
|
||||
- libstdc++-4.9-dev
|
||||
- g++-8
|
||||
- autoconf
|
||||
- automake
|
||||
- autotools-dev
|
||||
@@ -28,37 +35,55 @@ addons:
|
||||
- libevent-dev
|
||||
- libjansson-dev
|
||||
- libjemalloc-dev
|
||||
- libc-ares-dev
|
||||
- cmake
|
||||
- cmake-data
|
||||
homebrew:
|
||||
packages:
|
||||
- libev
|
||||
- libevent
|
||||
- c-ares
|
||||
- cunit
|
||||
- libressl
|
||||
before_install:
|
||||
- $CC --version
|
||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
|
||||
- $CC --version
|
||||
- go version
|
||||
- cmake --version
|
||||
before_script:
|
||||
# First build spdylay, since integration tests require it.
|
||||
# spdylay is going to be built under third-party/spdylay
|
||||
- cd third-party
|
||||
- git clone https://github.com/tatsuhiro-t/spdylay.git
|
||||
- cd spdylay
|
||||
- autoreconf -i
|
||||
- ./configure --disable-src --disable-examples
|
||||
- make check
|
||||
- export SPDYLAY_HOME=$PWD
|
||||
- cd ../..
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address -fuse-ld=gold"
|
||||
fi
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
PKG_CONFIG_PATH="/usr/local/opt/libressl/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig"
|
||||
fi
|
||||
# Now build nghttp2
|
||||
- if [ "$CI_BUILD" = "autotools" ]; then autoreconf -i; fi
|
||||
- git submodule update --init
|
||||
- if [ "$CI_BUILD" = "autotools" ]; then ./configure --enable-werror --with-mruby --with-neverbleed LIBSPDYLAY_CFLAGS="-I$SPDYLAY_HOME/lib/includes" LIBSPDYLAY_LIBS="-L$SPDYLAY_HOME/lib/.libs -lspdylay"; fi
|
||||
- if [ "$CI_BUILD" = "cmake" ]; then cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DWITH_NEVERBLEED=1 -DSPDYLAY_INCLUDE_DIR="$SPDYLAY_HOME/lib/includes" -DSPDYLAY_LIBRARY="$SPDYLAY_HOME/lib/.libs/libspdylay.so"; fi
|
||||
- |
|
||||
if [ "$CI_BUILD" = "autotools" ]; then
|
||||
autoreconf -i && ./configure --with-mruby PKG_CONFIG_PATH=$PKG_CONFIG_PATH
|
||||
fi
|
||||
- |
|
||||
if [ "$CI_BUILD" = "cmake" ]; then
|
||||
cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DWITH_NEVERBLEED=1
|
||||
fi
|
||||
script:
|
||||
- make
|
||||
- make check
|
||||
- cd integration-tests
|
||||
# As of April, 23, 2016, golang http2 build fails, probably because
|
||||
# the default go version is too old.
|
||||
|
||||
# - export GOPATH="$PWD/integration-tests/golang"
|
||||
# - make itprep
|
||||
# - make it
|
||||
- |
|
||||
if [ "$CI_BUILD" = "autotools" ]; then
|
||||
make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --enable-werror CPPFLAGS=$CPPFLAGS LDFLAGS=\"$LDFLAGS\" PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
|
||||
fi
|
||||
- |
|
||||
if [ "$CI_BUILD" = "cmake" ]; then
|
||||
make && make check
|
||||
fi
|
||||
- |
|
||||
if [ "$CI_BUILD" = "cmake" ]; then
|
||||
# Integration tests for nghttpx; autotools build erases build
|
||||
# for packaging test.
|
||||
cd integration-tests
|
||||
export GO111MODULE=on
|
||||
make it
|
||||
fi
|
||||
|
||||
38
AUTHORS
38
AUTHORS
@@ -14,30 +14,47 @@ github issues [2].
|
||||
--------
|
||||
|
||||
187j3x1
|
||||
Adam Gołębiowski
|
||||
Alek Storm
|
||||
Alex Nalivko
|
||||
Alexandros Konstantinakis-Karmis
|
||||
Alexis La Goutte
|
||||
Amir Pakdel
|
||||
Anders Bakken
|
||||
Andreas Pohl
|
||||
Andy Davies
|
||||
Angus Gratton
|
||||
Anna Henningsen
|
||||
Ant Bryan
|
||||
Benedikt Christoph Wolters
|
||||
Benjamin Peterson
|
||||
Bernard Spil
|
||||
Brendan Heinonen
|
||||
Brian Card
|
||||
Brian Suh
|
||||
Daniel Evers
|
||||
Daniel Stenberg
|
||||
Dave Reisner
|
||||
David Beitey
|
||||
David Weekly
|
||||
Dmitriy Vetutnev
|
||||
Don
|
||||
Dylan Plecki
|
||||
Etienne Cimon
|
||||
Fabian Möller
|
||||
Fabian Wiesel
|
||||
Gabi Davar
|
||||
Gitai
|
||||
Google Inc.
|
||||
Jacob Champion
|
||||
Jan Kundrát
|
||||
Jan-E
|
||||
Janusz Dziemidowicz
|
||||
Jay Satiro
|
||||
Jeff 'Raid' Baitis
|
||||
Jianqing Wang
|
||||
Jim Morrison
|
||||
Josh Braegger
|
||||
José F. Calcerrada
|
||||
Kamil Dudka
|
||||
Kazuho Oku
|
||||
@@ -45,31 +62,46 @@ Kenny (kang-yen) Peng
|
||||
Kenny Peng
|
||||
Kit Chan
|
||||
Kyle Schomp
|
||||
LazyHamster
|
||||
Lucas Pardue
|
||||
MATSUMOTO Ryosuke
|
||||
Marc Bachmann
|
||||
Matt Rudary
|
||||
Matt Way
|
||||
Mike Conlen
|
||||
Mike Frysinger
|
||||
Mike Lothian
|
||||
Nicholas Hurley
|
||||
Nora Shoemaker
|
||||
Pedro Santos
|
||||
Peeyush Aggarwal
|
||||
Peter Wu
|
||||
Piotr Sikora
|
||||
Raul Gutierrez Segales
|
||||
Remo E
|
||||
Reza Tavakoli
|
||||
Rick Lei
|
||||
Ross Smith II
|
||||
Scott Mitchell
|
||||
Sebastiaan Deckers
|
||||
Simon Frankenberger
|
||||
Simone Basso
|
||||
Soham Sinha
|
||||
Stefan Eissing
|
||||
Stephen Ludin
|
||||
Sunpoet Po-Chuan Hsieh
|
||||
Svante Signell
|
||||
Syohei YOSHIDA
|
||||
Tapanito
|
||||
Tatsuhiko Kubo
|
||||
Tatsuhiro Tsujikawa
|
||||
Tobias Geerinckx-Rice
|
||||
Tom Harwood
|
||||
Tomasz Buchert
|
||||
Tomasz Torcz
|
||||
Vernon Tang
|
||||
Viacheslav Biriukov
|
||||
Viktor Szakats
|
||||
Viktor Szépe
|
||||
Wenfeng Liu
|
||||
Xiaoguang Sun
|
||||
@@ -77,9 +109,15 @@ Zhuoyun Wei
|
||||
acesso
|
||||
ayanamist
|
||||
bxshi
|
||||
clemahieu
|
||||
dalf
|
||||
dawg
|
||||
es
|
||||
fangdingjun
|
||||
jwchoi
|
||||
kumagi
|
||||
lstefani
|
||||
makovich
|
||||
mod-h2-dev
|
||||
moparisthebest
|
||||
snnn
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
# XXX using 1.8.90 instead of 1.9.0-DEV
|
||||
project(nghttp2 VERSION 1.14.0)
|
||||
project(nghttp2 VERSION 1.39.2)
|
||||
|
||||
# See versioning rule:
|
||||
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||
set(LT_CURRENT 23)
|
||||
set(LT_CURRENT 32)
|
||||
set(LT_REVISION 0)
|
||||
set(LT_AGE 9)
|
||||
set(LT_AGE 18)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
include(Version)
|
||||
|
||||
math(EXPR LT_SOVERSION "${LT_CURRENT} - ${LT_AGE}")
|
||||
@@ -59,6 +59,7 @@ find_package(PythonInterp)
|
||||
# Auto-detection of features that can be toggled
|
||||
find_package(OpenSSL 1.0.1)
|
||||
find_package(Libev 4.11)
|
||||
find_package(Libcares 1.7.5)
|
||||
find_package(ZLIB 1.2.3)
|
||||
if(OPENSSL_FOUND AND LIBEV_FOUND AND ZLIB_FOUND)
|
||||
set(ENABLE_APP_DEFAULT ON)
|
||||
@@ -78,7 +79,7 @@ else()
|
||||
set(ENABLE_PYTHON_BINDINGS_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
find_package(LibXml2 2.7.7)
|
||||
find_package(LibXml2 2.6.26)
|
||||
set(WITH_LIBXML2_DEFAULT ${LIBXML2_FOUND})
|
||||
find_package(Jemalloc)
|
||||
set(WITH_JEMALLOC_DEFAULT ${JEMALLOC_FOUND})
|
||||
@@ -105,28 +106,18 @@ endif()
|
||||
foreach(_build_type "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
foreach(_lang C CXX)
|
||||
string(TOUPPER "CMAKE_${_lang}_FLAGS_${_build_type}" _var)
|
||||
string(REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" "" ${_var} "${${_var}}")
|
||||
string(REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " " ${_var} "${${_var}}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
#
|
||||
# If we're running GCC or clang define _U_ to be "__attribute__((unused))"
|
||||
# so we can use _U_ to flag unused function parameters and not get warnings
|
||||
# about them. Otherwise, define _U_ to be an empty string so that _U_ used
|
||||
# to flag an unused function parameters will compile with other compilers.
|
||||
#
|
||||
# XXX - similar hints for other compilers?
|
||||
#
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(HINT_UNUSED_PARAM "__attribute__((unused))")
|
||||
set(HINT_NORETURN "__attribute__((noreturn))")
|
||||
else()
|
||||
set(HINT_UNUSED_PARAM)
|
||||
set(HINT_NORETURN)
|
||||
endif()
|
||||
|
||||
include(ExtractValidFlags)
|
||||
foreach(_cxx1x_flag -std=c++11 -std=c++0x)
|
||||
foreach(_cxx1x_flag -std=c++14)
|
||||
extract_valid_cxx_flags(_cxx1x_flag_supported ${_cxx1x_flag})
|
||||
if(_cxx1x_flag_supported)
|
||||
set(CXX1XCXXFLAGS ${_cxx1x_flag})
|
||||
@@ -207,6 +198,14 @@ if(LIBEVENT_FOUND)
|
||||
# Must both link the core and openssl libraries.
|
||||
set(LIBEVENT_OPENSSL_LIBRARIES ${LIBEVENT_LIBRARIES})
|
||||
endif()
|
||||
# libc-ares (for src)
|
||||
set(HAVE_LIBCARES ${LIBCARES_FOUND})
|
||||
if(LIBCARES_FOUND)
|
||||
set(LIBCARES_INCLUDE_DIRS ${LIBCARES_INCLUDE_DIR})
|
||||
else()
|
||||
set(LIBCARES_INCLUDE_DIRS "")
|
||||
set(LIBCARES_LIBRARIES "")
|
||||
endif()
|
||||
# jansson (for src/nghttp, src/deflatehd and src/inflatehd)
|
||||
set(HAVE_JANSSON ${JANSSON_FOUND})
|
||||
# libxml2 (for src/nghttp)
|
||||
@@ -303,8 +302,8 @@ check_type_size("time_t" SIZEOF_TIME_T)
|
||||
include(CheckFunctionExists)
|
||||
check_function_exists(_Exit HAVE__EXIT)
|
||||
check_function_exists(accept4 HAVE_ACCEPT4)
|
||||
check_function_exists(mkostemp HAVE_MKOSTEMP)
|
||||
|
||||
# timerfd_create was added in linux kernel 2.6.25
|
||||
include(CheckSymbolExists)
|
||||
# XXX does this correctly detect initgroups (un)availability on cygwin?
|
||||
check_symbol_exists(initgroups grp.h HAVE_DECL_INITGROUPS)
|
||||
@@ -316,13 +315,6 @@ if(NOT HAVE_DECL_INITGROUPS AND HAVE_UNISTD_H)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_function_exists(timerfd_create HAVE_TIMERFD_CREATE)
|
||||
# Checks for epoll availability, primarily for examples/tiny-nghttpd
|
||||
check_symbol_exists(epoll_create sys/epoll.h HAVE_EPOLL)
|
||||
if(HAVE_EPOLL AND HAVE_TIMERFD_CREATE)
|
||||
set(ENABLE_TINY_NGHTTPD 1)
|
||||
endif()
|
||||
|
||||
set(WARNCFLAGS)
|
||||
set(WARNCXXFLAGS)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
@@ -408,10 +400,10 @@ configure_file(cmakeconfig.h.in config.h)
|
||||
# autotools-compatible names
|
||||
# Sphinx expects relative paths in the .rst files. Use the fact that the files
|
||||
# below are all one directory level deep.
|
||||
file(RELATIVE_PATH top_srcdir "${CMAKE_BINARY_DIR}/dir" "${CMAKE_SOURCE_DIR}")
|
||||
file(RELATIVE_PATH top_builddir "${CMAKE_BINARY_DIR}/dir" "${CMAKE_BINARY_DIR}")
|
||||
set(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
|
||||
set(abs_top_builddir "${CMAKE_BINARY_DIR}")
|
||||
file(RELATIVE_PATH top_srcdir "${CMAKE_CURRENT_BINARY_DIR}/dir" "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
file(RELATIVE_PATH top_builddir "${CMAKE_CURRENT_BINARY_DIR}/dir" "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(abs_top_builddir "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
# libnghttp2.pc (pkg-config file)
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
@@ -450,7 +442,7 @@ foreach(name
|
||||
endforeach()
|
||||
|
||||
include_directories(
|
||||
"${CMAKE_BINARY_DIR}" # for config.h
|
||||
"${CMAKE_CURRENT_BINARY_DIR}" # for config.h
|
||||
)
|
||||
# For use in src/CMakeLists.txt
|
||||
set(PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${CMAKE_PROJECT_NAME}")
|
||||
@@ -499,6 +491,7 @@ message(STATUS "summary of build options:
|
||||
OpenSSL: ${HAVE_OPENSSL} (LIBS='${OPENSSL_LIBRARIES}')
|
||||
Libxml2: ${HAVE_LIBXML2} (LIBS='${LIBXML2_LIBRARIES}')
|
||||
Libev: ${HAVE_LIBEV} (LIBS='${LIBEV_LIBRARIES}')
|
||||
Libc-ares: ${HAVE_LIBCARES} (LIBS='${LIBCARES_LIBRARIES}')
|
||||
Libevent(SSL): ${HAVE_LIBEVENT_OPENSSL} (LIBS='${LIBEVENT_OPENSSL_LIBRARIES}')
|
||||
Spdylay: ${HAVE_SPDYLAY} (LIBS='${SPDYLAY_LIBRARIES}')
|
||||
Jansson: ${HAVE_JANSSON} (LIBS='${JANSSON_LIBRARIES}')
|
||||
|
||||
@@ -14,6 +14,8 @@ option(ENABLE_PYTHON_BINDINGS "Build Python bindings"
|
||||
${ENABLE_PYTHON_BINDINGS_DEFAULT})
|
||||
option(ENABLE_FAILMALLOC "Build failmalloc test program" ON)
|
||||
option(ENABLE_LIB_ONLY "Build libnghttp2 only. This is a short hand for -DENABLE_APP=0 -DENABLE_EXAMPLES=0 -DENABLE_HPACK_TOOLS=0 -DENABLE_PYTHON_BINDINGS=0")
|
||||
option(ENABLE_STATIC_LIB "Build libnghttp2 in static mode also")
|
||||
option(ENABLE_SHARED_LIB "Build libnghttp2 as a shared library" ON)
|
||||
|
||||
option(WITH_LIBXML2 "Use libxml2"
|
||||
${WITH_LIBXML2_DEFAULT})
|
||||
|
||||
@@ -10,39 +10,47 @@
|
||||
#
|
||||
# $ sudo docker run -v /path/to/dest:/out nghttp2-android cp /root/build/nghttp2/src/nghttpx /out
|
||||
|
||||
FROM ubuntu:vivid
|
||||
|
||||
# Only use standalone-toolchain for reduce size
|
||||
FROM ubuntu:xenial
|
||||
MAINTAINER Tatsuhiro Tsujikawa
|
||||
|
||||
ENV ANDROID_HOME /root/android
|
||||
ENV PREFIX $ANDROID_HOME/usr/local
|
||||
ENV ANDROID_HOME /root
|
||||
ENV TOOLCHAIN $ANDROID_HOME/toolchain
|
||||
ENV PATH $TOOLCHAIN/bin:$PATH
|
||||
|
||||
# It would be better to use nearest ubuntu archive mirror for faster
|
||||
# downloads.
|
||||
# RUN sed -ie 's/archive\.ubuntu/jp.archive.ubuntu/g' /etc/apt/sources.list
|
||||
ENV NDK_VERSION r14b
|
||||
|
||||
RUN apt-get update
|
||||
# genisoimage, libc6-i386 and lib32stdc++6 are required to decompress ndk.
|
||||
RUN apt-get install -y make binutils autoconf automake autotools-dev libtool \
|
||||
pkg-config git curl dpkg-dev libxml2-dev \
|
||||
genisoimage libc6-i386 lib32stdc++6
|
||||
WORKDIR /root
|
||||
RUN apt-get update && \
|
||||
apt-get install -y unzip make binutils autoconf \
|
||||
automake autotools-dev libtool pkg-config git \
|
||||
curl dpkg-dev libxml2-dev genisoimage libc6-i386 \
|
||||
lib32stdc++6 python&& \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Install toolchain
|
||||
RUN curl -L -O https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip && \
|
||||
unzip -q android-ndk-$NDK_VERSION-linux-x86_64.zip && \
|
||||
rm android-ndk-$NDK_VERSION-linux-x86_64.zip && \
|
||||
mkdir -p $ANDROID_HOME/toolchain && \
|
||||
$ANDROID_HOME/android-ndk-$NDK_VERSION/build/tools/make-standalone-toolchain.sh \
|
||||
--install-dir=$ANDROID_HOME/toolchain \
|
||||
--toolchain=arm-linux-androideabi-4.9 \
|
||||
--force && \
|
||||
rm -r android-ndk-$NDK_VERSION
|
||||
|
||||
ENV PREFIX /root/usr/local
|
||||
|
||||
# Setup version of libraries
|
||||
ENV OPENSSL_VERSION 1.0.2d
|
||||
ENV SPDYLAY_VERSION v1.4.0
|
||||
ENV LIBEV_VERSION 4.19
|
||||
ENV ZLIB_VERSION 1.2.8
|
||||
ENV CARES_VERSION 1.13.0
|
||||
ENV NGHTTP2_VERSION v1.24.0
|
||||
|
||||
WORKDIR /root/build
|
||||
RUN curl -L -O http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin && \
|
||||
chmod a+x android-ndk-r10d-linux-x86_64.bin && \
|
||||
./android-ndk-r10d-linux-x86_64.bin && \
|
||||
rm android-ndk-r10d-linux-x86_64.bin
|
||||
|
||||
WORKDIR /root/build/android-ndk-r10d
|
||||
RUN /bin/bash build/tools/make-standalone-toolchain.sh \
|
||||
--install-dir=$ANDROID_HOME/toolchain \
|
||||
--toolchain=arm-linux-androideabi-4.9 --llvm-version=3.5 \
|
||||
--system=linux-x86_64
|
||||
|
||||
WORKDIR /root/build
|
||||
RUN git clone https://github.com/tatsuhiro-t/spdylay
|
||||
RUN git clone https://github.com/tatsuhiro-t/spdylay -b $SPDYLAY_VERSION --depth 1
|
||||
WORKDIR /root/build/spdylay
|
||||
RUN autoreconf -i && \
|
||||
./configure \
|
||||
@@ -59,22 +67,22 @@ RUN autoreconf -i && \
|
||||
make install
|
||||
|
||||
WORKDIR /root/build
|
||||
RUN curl -L -O https://www.openssl.org/source/openssl-1.0.2d.tar.gz && \
|
||||
tar xf openssl-1.0.2d.tar.gz && \
|
||||
rm openssl-1.0.2d.tar.gz
|
||||
RUN curl -L -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz && \
|
||||
tar xf openssl-$OPENSSL_VERSION.tar.gz && \
|
||||
rm openssl-$OPENSSL_VERSION.tar.gz
|
||||
|
||||
WORKDIR /root/build/openssl-1.0.2d
|
||||
WORKDIR /root/build/openssl-$OPENSSL_VERSION
|
||||
RUN export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi- && \
|
||||
./Configure --prefix=$PREFIX android && \
|
||||
make && make install_sw
|
||||
|
||||
WORKDIR /root/build
|
||||
RUN curl -L -O http://dist.schmorp.de/libev/libev-4.19.tar.gz && \
|
||||
RUN curl -L -O http://dist.schmorp.de/libev/Attic/libev-$LIBEV_VERSION.tar.gz && \
|
||||
curl -L -O https://gist.github.com/tatsuhiro-t/48c45f08950f587180ed/raw/80a8f003b5d1091eae497c5995bbaa68096e739b/libev-4.19-android.patch && \
|
||||
tar xf libev-4.19.tar.gz && \
|
||||
rm libev-4.19.tar.gz
|
||||
tar xf libev-$LIBEV_VERSION.tar.gz && \
|
||||
rm libev-$LIBEV_VERSION.tar.gz
|
||||
|
||||
WORKDIR /root/build/libev-4.19
|
||||
WORKDIR /root/build/libev-$LIBEV_VERSION
|
||||
RUN patch -p1 < ../libev-4.19-android.patch && \
|
||||
./configure \
|
||||
--host=arm-linux-androideabi \
|
||||
@@ -87,11 +95,11 @@ RUN patch -p1 < ../libev-4.19-android.patch && \
|
||||
make install
|
||||
|
||||
WORKDIR /root/build
|
||||
RUN curl -L -O http://zlib.net/zlib-1.2.8.tar.gz && \
|
||||
tar xf zlib-1.2.8.tar.gz && \
|
||||
rm zlib-1.2.8.tar.gz
|
||||
RUN curl -L -O https://downloads.sourceforge.net/project/libpng/zlib/$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz && \
|
||||
tar xf zlib-$ZLIB_VERSION.tar.gz && \
|
||||
rm zlib-$ZLIB_VERSION.tar.gz
|
||||
|
||||
WORKDIR /root/build/zlib-1.2.8
|
||||
WORKDIR /root/build/zlib-$ZLIB_VERSION
|
||||
RUN HOST=arm-linux-androideabi \
|
||||
CC=$HOST-gcc \
|
||||
AR=$HOST-ar \
|
||||
@@ -105,11 +113,26 @@ RUN HOST=arm-linux-androideabi \
|
||||
--static && \
|
||||
make install
|
||||
|
||||
|
||||
WORKDIR /root/build
|
||||
RUN git clone https://github.com/nghttp2/nghttp2
|
||||
RUN curl -L -O https://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz && \
|
||||
tar xf c-ares-$CARES_VERSION.tar.gz && \
|
||||
rm c-ares-$CARES_VERSION.tar.gz
|
||||
|
||||
WORKDIR /root/build/c-ares-$CARES_VERSION
|
||||
RUN ./configure \
|
||||
--host=arm-linux-androideabi \
|
||||
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
|
||||
--prefix=$PREFIX \
|
||||
--disable-shared && \
|
||||
make install
|
||||
|
||||
WORKDIR /root/build
|
||||
RUN git clone https://github.com/nghttp2/nghttp2 -b $NGHTTP2_VERSION --depth 1
|
||||
WORKDIR /root/build/nghttp2
|
||||
RUN autoreconf -i && \
|
||||
./configure \
|
||||
--enable-app \
|
||||
--disable-shared \
|
||||
--host=arm-linux-androideabi \
|
||||
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
|
||||
@@ -118,11 +141,10 @@ RUN autoreconf -i && \
|
||||
--disable-python-bindings \
|
||||
--disable-examples \
|
||||
--disable-threads \
|
||||
LIBSPDYLAY_CFLAGS=-I$PREFIX/usr/local/include \
|
||||
LIBSPDYLAY_LIBS="-L$PREFIX/usr/local/lib -lspdylay" \
|
||||
CPPFLAGS="-fPIE -I$PREFIX/include" \
|
||||
CXXFLAGS="-fno-strict-aliasing" \
|
||||
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
||||
LDFLAGS="-fPIE -pie -L$PREFIX/lib" && \
|
||||
CC="$TOOLCHAIN"/bin/arm-linux-androideabi-clang \
|
||||
CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-clang++ \
|
||||
CPPFLAGS="-fPIE -I$PREFIX/include" \
|
||||
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
||||
LDFLAGS="-fPIE -pie -L$PREFIX/lib" && \
|
||||
make && \
|
||||
arm-linux-androideabi-strip src/nghttpx src/nghttpd src/nghttp
|
||||
|
||||
@@ -45,7 +45,8 @@ EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-make \
|
||||
cmake/Version.cmake \
|
||||
cmake/FindCython.cmake \
|
||||
cmake/FindLibevent.cmake \
|
||||
cmake/FindJansson.cmake
|
||||
cmake/FindJansson.cmake \
|
||||
cmake/FindLibcares.cmake
|
||||
|
||||
.PHONY: clang-format
|
||||
|
||||
|
||||
204
README.rst
204
README.rst
@@ -4,10 +4,10 @@ nghttp2 - HTTP/2 C Library
|
||||
This is an implementation of the Hypertext Transfer Protocol version 2
|
||||
in C.
|
||||
|
||||
The framing layer of HTTP/2 is implemented as a reusable C
|
||||
library. On top of that, we have implemented an HTTP/2 client, server
|
||||
and proxy. We have also developed load test and benchmarking tools for
|
||||
HTTP/2 and SPDY.
|
||||
The framing layer of HTTP/2 is implemented as a reusable C library.
|
||||
On top of that, we have implemented an HTTP/2 client, server and
|
||||
proxy. We have also developed load test and benchmarking tools for
|
||||
HTTP/2.
|
||||
|
||||
An HPACK encoder and decoder are available as a public API.
|
||||
|
||||
@@ -34,8 +34,8 @@ implementation.
|
||||
|
||||
* https://nghttp2.org/ (TLS + ALPN/NPN)
|
||||
|
||||
This endpoint supports ``h2``, ``h2-16``, ``h2-14``, ``spdy/3.1``
|
||||
and ``http/1.1`` via ALPN/NPN and requires TLSv1.2 for HTTP/2
|
||||
This endpoint supports ``h2``, ``h2-16``, ``h2-14``, and
|
||||
``http/1.1`` via ALPN/NPN and requires TLSv1.2 for HTTP/2
|
||||
connection.
|
||||
|
||||
* http://nghttp2.org/ (HTTP Upgrade and HTTP/2 Direct)
|
||||
@@ -58,6 +58,11 @@ To build the documentation, you need to install:
|
||||
|
||||
* sphinx (http://sphinx-doc.org/)
|
||||
|
||||
If you need libnghttp2 (C library) only, then the above packages are
|
||||
all you need. Use ``--enable-lib-only`` to ensure that only
|
||||
libnghttp2 is built. This avoids potential build error related to
|
||||
building bundled applications.
|
||||
|
||||
To build and run the application programs (``nghttp``, ``nghttpd``,
|
||||
``nghttpx`` and ``h2load``) in the ``src`` directory, the following packages
|
||||
are required:
|
||||
@@ -65,20 +70,21 @@ are required:
|
||||
* OpenSSL >= 1.0.1
|
||||
* libev >= 4.11
|
||||
* zlib >= 1.2.3
|
||||
* libc-ares >= 1.7.5
|
||||
|
||||
ALPN support requires OpenSSL >= 1.0.2 (released 22 January 2015).
|
||||
LibreSSL >= 2.2.0 can be used instead of OpenSSL, but OpenSSL has more
|
||||
features than LibreSSL at the time of this writing.
|
||||
|
||||
To enable the SPDY protocol in the application program ``nghttpx`` and
|
||||
``h2load``, the following package is required:
|
||||
|
||||
* spdylay >= 1.3.2
|
||||
|
||||
To enable ``-a`` option (getting linked assets from the downloaded
|
||||
resource) in ``nghttp``, the following package is required:
|
||||
|
||||
* libxml2 >= 2.7.7
|
||||
* libxml2 >= 2.6.26
|
||||
|
||||
To enable systemd support in nghttpx, the following package is
|
||||
required:
|
||||
|
||||
* libsystemd-dev >= 209
|
||||
|
||||
The HPACK tools require the following package:
|
||||
|
||||
@@ -93,6 +99,11 @@ To mitigate heap fragmentation in long running server programs
|
||||
|
||||
* jemalloc
|
||||
|
||||
.. note::
|
||||
|
||||
Alpine Linux currently does not support malloc replacement
|
||||
due to musl limitations. See details in issue `#762 <https://github.com/nghttp2/nghttp2/issues/762>`_.
|
||||
|
||||
libnghttp2_asio C++ library requires the following packages:
|
||||
|
||||
* libboost-dev >= 1.54.0
|
||||
@@ -104,17 +115,15 @@ The Python bindings require the following packages:
|
||||
* python >= 2.7
|
||||
* python-setuptools
|
||||
|
||||
If you are using Ubuntu 14.04 LTS (trusty) or Debian 7.0 (wheezy) and above run the following to install the needed packages:
|
||||
If you are using Ubuntu 16.04 LTS (Xenial Xerus) or Debian 8 (jessie)
|
||||
and above, run the following to install the required packages:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
sudo apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config \
|
||||
zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \
|
||||
libjemalloc-dev cython python3-dev python-setuptools
|
||||
|
||||
From Ubuntu 15.10, spdylay has been available as a package named
|
||||
`libspdylay-dev`. For the earlier Ubuntu release, you need to build
|
||||
it yourself: http://tatsuhiro-t.github.io/spdylay/
|
||||
libc-ares-dev libjemalloc-dev libsystemd-dev \
|
||||
cython python3-dev python-setuptools
|
||||
|
||||
To enable mruby support for nghttpx, `mruby
|
||||
<https://github.com/mruby/mruby>`_ is required. We need to build
|
||||
@@ -136,26 +145,14 @@ minimizes the risk of private key leakage when serious bug like
|
||||
Heartbleed is exploited. The neverbleed is disabled by default. To
|
||||
enable it, use ``--with-neverbleed`` configure option.
|
||||
|
||||
Building from git
|
||||
-----------------
|
||||
|
||||
Building from git is easy, but please be sure that at least autoconf 2.68 is
|
||||
used:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ autoreconf -i
|
||||
$ automake
|
||||
$ autoconf
|
||||
$ ./configure
|
||||
$ make
|
||||
|
||||
To compile the source code, gcc >= 4.8.3 or clang >= 3.4 is required.
|
||||
Compiling libnghttp2 C source code requires a C99 compiler. gcc 4.8
|
||||
is known to be adequate. In order to compile the C++ source code, gcc
|
||||
>= 6.0 or clang >= 6.0 is required. C++ source code requires C++14
|
||||
language features.
|
||||
|
||||
.. note::
|
||||
|
||||
To enable mruby support in nghttpx, run ``git submodule update
|
||||
--init`` before running configure script, and use ``--with-mruby``
|
||||
To enable mruby support in nghttpx, and use ``--with-mruby``
|
||||
configure option.
|
||||
|
||||
.. note::
|
||||
@@ -176,6 +173,62 @@ To compile the source code, gcc >= 4.8.3 or clang >= 3.4 is required.
|
||||
applications were not built, then using ``--enable-app`` may find
|
||||
that cause, such as the missing dependency.
|
||||
|
||||
.. note::
|
||||
|
||||
In order to detect third party libraries, pkg-config is used
|
||||
(however we don't use pkg-config for some libraries (e.g., libev)).
|
||||
By default, pkg-config searches ``*.pc`` file in the standard
|
||||
locations (e.g., /usr/lib/pkgconfig). If it is necessary to use
|
||||
``*.pc`` file in the custom location, specify paths to
|
||||
``PKG_CONFIG_PATH`` environment variable, and pass it to configure
|
||||
script, like so:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ ./configure PKG_CONFIG_PATH=/path/to/pkgconfig
|
||||
|
||||
For pkg-config managed libraries, ``*_CFLAG`` and ``*_LIBS``
|
||||
environment variables are defined (e.g., ``OPENSSL_CFLAGS``,
|
||||
``OPENSSL_LIBS``). Specifying non-empty string to these variables
|
||||
completely overrides pkg-config. In other words, if they are
|
||||
specified, pkg-config is not used for detection, and user is
|
||||
responsible to specify the correct values to these variables. For
|
||||
complete list of these variables, run ``./configure -h``.
|
||||
|
||||
Building nghttp2 from release tar archive
|
||||
-----------------------------------------
|
||||
|
||||
The nghttp2 project regularly releases tar archives which includes
|
||||
nghttp2 source code, and generated build files. They can be
|
||||
downloaded from `Releases
|
||||
<https://github.com/nghttp2/nghttp2/releases>`_ page.
|
||||
|
||||
Building nghttp2 from git requires autotools development packages.
|
||||
Building from tar archives does not require them, and thus it is much
|
||||
easier. The usual build step is as follows:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ tar xf nghttp2-X.Y.Z.tar.bz2
|
||||
$ cd nghttp2-X.Y.Z
|
||||
$ ./configure
|
||||
$ make
|
||||
|
||||
Building from git
|
||||
-----------------
|
||||
|
||||
Building from git is easy, but please be sure that at least autoconf 2.68 is
|
||||
used:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ git submodule update --init
|
||||
$ autoreconf -i
|
||||
$ automake
|
||||
$ autoconf
|
||||
$ ./configure
|
||||
$ make
|
||||
|
||||
Notes for building on Windows (MSVC)
|
||||
------------------------------------
|
||||
|
||||
@@ -222,6 +275,18 @@ If you want to compile the applications under ``examples/``, you need
|
||||
to remove or rename the ``event.h`` from libev's installation, because
|
||||
it conflicts with libevent's installation.
|
||||
|
||||
Notes for installation on Linux systems
|
||||
--------------------------------------------
|
||||
After installing nghttp2 tool suite with ``make install`` one might experience a similar error:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
nghttpx: error while loading shared libraries: libnghttp2.so.14: cannot open shared object file: No such file or directory
|
||||
|
||||
This means that the tool is unable to locate the ``libnghttp2.so`` shared library.
|
||||
|
||||
To update the shared library cache run ``sudo ldconfig``.
|
||||
|
||||
Building the documentation
|
||||
--------------------------
|
||||
|
||||
@@ -257,14 +322,8 @@ its testing framework. We depend on the following libraries:
|
||||
* golang.org/x/net/http2
|
||||
* golang.org/x/net/websocket
|
||||
* https://github.com/tatsuhiro-t/go-nghttp2
|
||||
* https://github.com/tatsuhiro-t/spdy
|
||||
|
||||
To download the above packages, after settings ``GOPATH``, run the
|
||||
following command under ``integration-tests`` directory:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ make itprep
|
||||
Go modules will download these dependencies automatically.
|
||||
|
||||
To run the tests, run the following command under
|
||||
``integration-tests`` directory:
|
||||
@@ -275,11 +334,6 @@ To run the tests, run the following command under
|
||||
|
||||
Inside the tests, we use port 3009 to run the test subject server.
|
||||
|
||||
.. note::
|
||||
|
||||
github.com/tatsuhiro-t/spdy is a copy used to be available at
|
||||
golang.org/x/net/spdy, but it is now gone.
|
||||
|
||||
Migration from v0.7.15 or earlier
|
||||
---------------------------------
|
||||
|
||||
@@ -680,7 +734,7 @@ information. Here is sample output from ``nghttpd``:
|
||||
nghttpx - proxy
|
||||
+++++++++++++++
|
||||
|
||||
``nghttpx`` is a multi-threaded reverse proxy for HTTP/2, SPDY and
|
||||
``nghttpx`` is a multi-threaded reverse proxy for HTTP/2, and
|
||||
HTTP/1.1, and powers http://nghttp2.org and supports HTTP/2 server
|
||||
push.
|
||||
|
||||
@@ -695,31 +749,30 @@ to know how to migrate from earlier releases.
|
||||
``nghttpx`` implements `important performance-oriented features
|
||||
<https://istlsfastyet.com/#server-performance>`_ in TLS, such as
|
||||
session IDs, session tickets (with automatic key rotation), OCSP
|
||||
stapling, dynamic record sizing, ALPN/NPN, forward secrecy and SPDY &
|
||||
HTTP/2. ``nghttpx`` also offers the functionality to share session
|
||||
cache and ticket keys among multiple ``nghttpx`` instances via
|
||||
memcached.
|
||||
stapling, dynamic record sizing, ALPN/NPN, forward secrecy and HTTP/2.
|
||||
``nghttpx`` also offers the functionality to share session cache and
|
||||
ticket keys among multiple ``nghttpx`` instances via memcached.
|
||||
|
||||
``nghttpx`` has 2 operation modes:
|
||||
|
||||
================== ====================== ================ =============
|
||||
Mode option Frontend Backend Note
|
||||
================== ====================== ================ =============
|
||||
default mode HTTP/2, SPDY, HTTP/1.1 HTTP/1.1, HTTP/2 Reverse proxy
|
||||
``--http2-proxy`` HTTP/2, SPDY, HTTP/1.1 HTTP/1.1, HTTP/2 Forward proxy
|
||||
================== ====================== ================ =============
|
||||
================== ================ ================ =============
|
||||
Mode option Frontend Backend Note
|
||||
================== ================ ================ =============
|
||||
default mode HTTP/2, HTTP/1.1 HTTP/1.1, HTTP/2 Reverse proxy
|
||||
``--http2-proxy`` HTTP/2, HTTP/1.1 HTTP/1.1, HTTP/2 Forward proxy
|
||||
================== ================ ================ =============
|
||||
|
||||
The interesting mode at the moment is the default mode. It works like
|
||||
a reverse proxy and listens for HTTP/2, SPDY and HTTP/1.1 and can be
|
||||
a reverse proxy and listens for HTTP/2, and HTTP/1.1 and can be
|
||||
deployed as a SSL/TLS terminator for existing web server.
|
||||
|
||||
In all modes, the frontend connections are encrypted by SSL/TLS by
|
||||
default. To disable encryption, use the ``no-tls`` keyword in
|
||||
``--frontend`` option. If encryption is disabled, SPDY is disabled in
|
||||
the frontend and incoming HTTP/1.1 connections can be upgraded to
|
||||
HTTP/2 through HTTP Upgrade. On the other hard, backend connections
|
||||
are not encrypted by default. To encrypt backend connections, use
|
||||
``tls`` keyword in ``--backend`` option.
|
||||
``--frontend`` option. If encryption is disabled, incoming HTTP/1.1
|
||||
connections can be upgraded to HTTP/2 through HTTP Upgrade. On the
|
||||
other hard, backend connections are not encrypted by default. To
|
||||
encrypt backend connections, use ``tls`` keyword in ``--backend``
|
||||
option.
|
||||
|
||||
``nghttpx`` supports a configuration file. See the ``--conf`` option and
|
||||
sample configuration file ``nghttpx.conf.sample``.
|
||||
@@ -729,16 +782,16 @@ server:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
Client <-- (HTTP/2, SPDY, HTTP/1.1) --> nghttpx <-- (HTTP/1.1, HTTP/2) --> Web Server
|
||||
[reverse proxy]
|
||||
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1, HTTP/2) --> Web Server
|
||||
[reverse proxy]
|
||||
|
||||
With the ``--http2-proxy`` option, it works as forward proxy, and it
|
||||
is so called secure HTTP/2 proxy (aka SPDY proxy):
|
||||
is so called secure HTTP/2 proxy:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
Client <-- (HTTP/2, SPDY, HTTP/1.1) --> nghttpx <-- (HTTP/1.1) --> Proxy
|
||||
[secure proxy] (e.g., Squid, ATS)
|
||||
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1) --> Proxy
|
||||
[secure proxy] (e.g., Squid, ATS)
|
||||
|
||||
The ``Client`` in the above example needs to be configured to use
|
||||
``nghttpx`` as secure proxy.
|
||||
@@ -770,7 +823,7 @@ proxy through an HTTP proxy:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
Client <-- (HTTP/2, SPDY, HTTP/1.1) --> nghttpx <-- (HTTP/2) --
|
||||
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/2) --
|
||||
|
||||
--===================---> HTTP/2 Proxy
|
||||
(HTTP proxy tunnel) (e.g., nghttpx -s)
|
||||
@@ -778,9 +831,8 @@ proxy through an HTTP proxy:
|
||||
Benchmarking tool
|
||||
-----------------
|
||||
|
||||
The ``h2load`` program is a benchmarking tool for HTTP/2 and SPDY.
|
||||
The SPDY support is enabled if the program was built with the spdylay
|
||||
library. The UI of ``h2load`` is heavily inspired by ``weighttp``
|
||||
The ``h2load`` program is a benchmarking tool for HTTP/2. The UI of
|
||||
``h2load`` is heavily inspired by ``weighttp``
|
||||
(https://github.com/lighttpd/weighttp). The typical usage is as
|
||||
follows:
|
||||
|
||||
@@ -896,7 +948,7 @@ output_length
|
||||
The length of the compressed header block.
|
||||
|
||||
percentage_of_original_size
|
||||
``input_length`` / ``output_length`` * 100
|
||||
``output_length`` / ``input_length`` * 100
|
||||
|
||||
wire
|
||||
The compressed header block as a hex string.
|
||||
@@ -1277,7 +1329,7 @@ are:
|
||||
* Boost::Thread
|
||||
|
||||
The server API is designed to build an HTTP/2 server very easily to utilize
|
||||
C++11 anonymous functions and closures. The bare minimum example of
|
||||
C++14 anonymous functions and closures. The bare minimum example of
|
||||
an HTTP/2 server looks like this:
|
||||
|
||||
.. code-block:: cpp
|
||||
@@ -1370,7 +1422,7 @@ The extension module is called ``nghttp2``.
|
||||
determined by the ``configure`` script. If the detected Python version is not
|
||||
what you expect, specify a path to Python executable in a ``PYTHON``
|
||||
variable as an argument to configure script (e.g., ``./configure
|
||||
PYTHON=/usr/bin/python3.4``).
|
||||
PYTHON=/usr/bin/python3.5``).
|
||||
|
||||
The following example code illustrates basic usage of the HPACK compressor
|
||||
and decompressor in Python:
|
||||
|
||||
@@ -39,8 +39,9 @@ PATH="$TOOLCHAIN"/bin:"$PATH"
|
||||
--without-libxml2 \
|
||||
--disable-python-bindings \
|
||||
--disable-examples \
|
||||
CC="$TOOLCHAIN"/bin/arm-linux-androideabi-gcc \
|
||||
CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-g++ \
|
||||
--disable-threads \
|
||||
CC="$TOOLCHAIN"/bin/arm-linux-androideabi-clang \
|
||||
CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-clang++ \
|
||||
CPPFLAGS="-fPIE -I$PREFIX/include" \
|
||||
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
||||
LDFLAGS="-fPIE -pie -L$PREFIX/lib"
|
||||
|
||||
53
appveyor.yml
Normal file
53
appveyor.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
# Notes:
|
||||
# - Minimal appveyor.yml file is an empty file. All sections are optional.
|
||||
# - Indent each level of configuration with 2 spaces. Do not use tabs!
|
||||
# - All section names are case-sensitive.
|
||||
# - Section names should be unique on each level.
|
||||
|
||||
#---------------------------------#
|
||||
# general configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# version format
|
||||
#version: 0.10.{build}
|
||||
|
||||
# branches to build
|
||||
branches:
|
||||
# blacklist
|
||||
except:
|
||||
- gh-pages
|
||||
|
||||
# Do not build on tags (GitHub only)
|
||||
skip_tags: true
|
||||
|
||||
#---------------------------------#
|
||||
# environment configuration #
|
||||
#---------------------------------#
|
||||
|
||||
os: Windows Server 2012
|
||||
|
||||
# scripts that run after cloning repository
|
||||
install:
|
||||
# install Win-Flex-Bison
|
||||
#- cmd: cinst winflexbison -y
|
||||
|
||||
#---------------------------------#
|
||||
# build configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# scripts to run before build
|
||||
before_build:
|
||||
- cmd: cmake .
|
||||
|
||||
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
|
||||
# before_package:
|
||||
|
||||
# scripts to run after build
|
||||
# after_build:
|
||||
|
||||
# to run your custom scripts instead of automatic MSBuild
|
||||
build_script:
|
||||
- cmd: cmake --build .
|
||||
|
||||
# to disable automatic builds
|
||||
# build: off
|
||||
40
cmake/FindLibcares.cmake
Normal file
40
cmake/FindLibcares.cmake
Normal file
@@ -0,0 +1,40 @@
|
||||
# - Try to find libcares
|
||||
# Once done this will define
|
||||
# LIBCARES_FOUND - System has libcares
|
||||
# LIBCARES_INCLUDE_DIRS - The libcares include directories
|
||||
# LIBCARES_LIBRARIES - The libraries needed to use libcares
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_LIBCARES QUIET libcares)
|
||||
|
||||
find_path(LIBCARES_INCLUDE_DIR
|
||||
NAMES ares.h
|
||||
HINTS ${PC_LIBCARES_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(LIBCARES_LIBRARY
|
||||
NAMES cares
|
||||
HINTS ${PC_LIBCARES_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
if(LIBCARES_INCLUDE_DIR)
|
||||
set(_version_regex "^#define[ \t]+ARES_VERSION_STR[ \t]+\"([^\"]+)\".*")
|
||||
file(STRINGS "${LIBCARES_INCLUDE_DIR}/ares_version.h"
|
||||
LIBCARES_VERSION REGEX "${_version_regex}")
|
||||
string(REGEX REPLACE "${_version_regex}" "\\1"
|
||||
LIBCARES_VERSION "${LIBCARES_VERSION}")
|
||||
unset(_version_regex)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBCARES_FOUND to TRUE
|
||||
# if all listed variables are TRUE and the requested version matches.
|
||||
find_package_handle_standard_args(Libcares REQUIRED_VARS
|
||||
LIBCARES_LIBRARY LIBCARES_INCLUDE_DIR
|
||||
VERSION_VAR LIBCARES_VERSION)
|
||||
|
||||
if(LIBCARES_FOUND)
|
||||
set(LIBCARES_LIBRARIES ${LIBCARES_LIBRARY})
|
||||
set(LIBCARES_INCLUDE_DIRS ${LIBCARES_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBCARES_INCLUDE_DIR LIBCARES_LIBRARY)
|
||||
@@ -40,6 +40,9 @@ if(LIBEVENT_INCLUDE_DIR)
|
||||
# Libevent 2.0
|
||||
file(STRINGS "${LIBEVENT_INCLUDE_DIR}/event2/event-config.h"
|
||||
LIBEVENT_VERSION REGEX "${_version_regex}")
|
||||
if("${LIBEVENT_VERSION}" STREQUAL "")
|
||||
set(LIBEVENT_VERSION ${PC_LIBEVENT_VERSION})
|
||||
endif()
|
||||
else()
|
||||
# Libevent 1.4
|
||||
file(STRINGS "${LIBEVENT_INCLUDE_DIR}/event-config.h"
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
|
||||
/* Hint to the compiler that a function parameter is not used */
|
||||
#define _U_ @HINT_UNUSED_PARAM@
|
||||
|
||||
/* Hint to the compiler that a function never returns */
|
||||
#define NGHTTP2_NORETURN @HINT_NORETURN@
|
||||
|
||||
@@ -38,6 +34,9 @@
|
||||
/* Define to 1 if you have the `accept4` function. */
|
||||
#cmakedefine HAVE_ACCEPT4 1
|
||||
|
||||
/* Define to 1 if you have the `mkostemp` function. */
|
||||
#cmakedefine HAVE_MKOSTEMP 1
|
||||
|
||||
/* Define to 1 if you have the `initgroups` function. */
|
||||
#cmakedefine01 HAVE_DECL_INITGROUPS
|
||||
|
||||
|
||||
174
configure.ac
174
configure.ac
@@ -25,7 +25,7 @@ dnl Do not change user variables!
|
||||
dnl http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT([nghttp2], [1.14.0], [t-tujikawa@users.sourceforge.net])
|
||||
AC_INIT([nghttp2], [1.39.2], [t-tujikawa@users.sourceforge.net])
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
@@ -44,9 +44,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl See versioning rule:
|
||||
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||
AC_SUBST(LT_CURRENT, 24)
|
||||
AC_SUBST(LT_CURRENT, 32)
|
||||
AC_SUBST(LT_REVISION, 0)
|
||||
AC_SUBST(LT_AGE, 10)
|
||||
AC_SUBST(LT_AGE, 18)
|
||||
|
||||
major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
|
||||
minor=`echo $PACKAGE_VERSION |cut -d. -f2 | sed -e "s/[^0-9]//g"`
|
||||
@@ -117,10 +117,10 @@ AC_ARG_WITH([jemalloc],
|
||||
[Use jemalloc [default=check]])],
|
||||
[request_jemalloc=$withval], [request_jemalloc=check])
|
||||
|
||||
AC_ARG_WITH([spdylay],
|
||||
[AS_HELP_STRING([--with-spdylay],
|
||||
[Use spdylay [default=check]])],
|
||||
[request_spdylay=$withval], [request_spdylay=check])
|
||||
AC_ARG_WITH([systemd],
|
||||
[AS_HELP_STRING([--with-systemd],
|
||||
[Enable systemd support in nghttpx [default=check]])],
|
||||
[request_systemd=$withval], [request_systemd=check])
|
||||
|
||||
AC_ARG_WITH([mruby],
|
||||
[AS_HELP_STRING([--with-mruby],
|
||||
@@ -171,26 +171,16 @@ else
|
||||
AC_SUBST([CYTHON])
|
||||
fi
|
||||
|
||||
#
|
||||
# If we're running GCC or clang define _U_ to be "__attribute__((unused))"
|
||||
# so we can use _U_ to flag unused function parameters and not get warnings
|
||||
# about them. Otherwise, define _U_ to be an empty string so that _U_ used
|
||||
# to flag an unused function parameters will compile with other compilers.
|
||||
#
|
||||
# XXX - similar hints for other compilers?
|
||||
#
|
||||
if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
|
||||
AC_DEFINE([_U_], [__attribute__((unused))], [Hint to the compiler that a function parameters is not used])
|
||||
AC_DEFINE([NGHTTP2_NORETURN], [__attribute__((noreturn))], [Hint to the compiler that a function never return])
|
||||
else
|
||||
AC_DEFINE([_U_], , [Hint to the compiler that a function parameter is not used])
|
||||
AC_DEFINE([NGHTTP2_NORETURN], , [Hint to the compiler that a function never return])
|
||||
fi
|
||||
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS=
|
||||
|
||||
AX_CXX_COMPILE_STDCXX_11([noext], [optional])
|
||||
AX_CXX_COMPILE_STDCXX([14], [noext], [optional])
|
||||
|
||||
CXX1XCXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
@@ -234,6 +224,41 @@ std::map<int, int>().emplace(1, 2);
|
||||
[have_std_map_emplace=no
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
# Check that std::atomic_* overloads for std::shared_ptr are
|
||||
# available.
|
||||
AC_MSG_CHECKING([whether std::atomic_* overloads for std::shared_ptr are available])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <memory>
|
||||
]],
|
||||
[[
|
||||
auto a = std::make_shared<int>(1000000007);
|
||||
auto p = std::atomic_load(&a);
|
||||
++*p;
|
||||
std::atomic_store(&a, p);
|
||||
]])],
|
||||
[AC_DEFINE([HAVE_ATOMIC_STD_SHARED_PTR], [1],
|
||||
[Define to 1 if you have the std::atomic_* overloads for std::shared_ptr.])
|
||||
have_atomic_std_shared_ptr=yes
|
||||
AC_MSG_RESULT([yes])],
|
||||
[have_atomic_std_shared_ptr=no
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
# Check that thread_local storage specifier is available
|
||||
AC_MSG_CHECKING([whether thread_local storage class specifier is available.])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
,
|
||||
[[
|
||||
thread_local int a = 0;
|
||||
(void)a;
|
||||
]])],
|
||||
[AC_DEFINE([HAVE_THREAD_LOCAL], [1],
|
||||
[Define to 1 if you have thread_local storage specifier.])
|
||||
have_thread_local=yes
|
||||
AC_MSG_RESULT([yes])],
|
||||
[have_Thread_local=no
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
|
||||
AC_LANG_POP()
|
||||
@@ -246,7 +271,7 @@ TESTLDADD=
|
||||
# Additional libraries required for programs under src directory.
|
||||
APPLDFLAGS=
|
||||
|
||||
case "$host" in
|
||||
case "$host_os" in
|
||||
*android*)
|
||||
android_build=yes
|
||||
# android does not need -pthread, but needs followng 3 libs for C++
|
||||
@@ -258,6 +283,12 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$host_os" in
|
||||
*solaris*)
|
||||
APPLDFLAGS="$APPLDFLAGS -lsocket -lnsl"
|
||||
;;
|
||||
esac
|
||||
|
||||
# zlib
|
||||
PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.3], [have_zlib=yes], [have_zlib=no])
|
||||
|
||||
@@ -329,6 +360,13 @@ if test "x${have_openssl}" = "xno"; then
|
||||
AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
|
||||
fi
|
||||
|
||||
# c-ares (for src)
|
||||
PKG_CHECK_MODULES([LIBCARES], [libcares >= 1.7.5], [have_libcares=yes],
|
||||
[have_libcares=no])
|
||||
if test "x${have_libcares}" = "xno"; then
|
||||
AC_MSG_NOTICE($LIBCARES_PKG_ERRORS)
|
||||
fi
|
||||
|
||||
# libevent_openssl (for examples)
|
||||
# 2.0.8 is required because we use evconnlistener_set_error_cb()
|
||||
PKG_CHECK_MODULES([LIBEVENT_OPENSSL], [libevent_openssl >= 2.0.8],
|
||||
@@ -347,18 +385,34 @@ else
|
||||
AC_MSG_NOTICE($JANSSON_PKG_ERRORS)
|
||||
fi
|
||||
|
||||
# libxml2 (for src/nghttp)
|
||||
have_libxml2=no
|
||||
if test "x${request_libxml2}" != "xno"; then
|
||||
m4_ifdef([AM_PATH_XML2],
|
||||
[AM_PATH_XML2(2.7.7, [have_libxml2=yes], [have_libxml2=no])],
|
||||
[AC_MSG_WARN([configure was created without libxml2 detection macro; libxml2 detection is disabled])])
|
||||
|
||||
if test "x${have_libxml2}" = "xyes"; then
|
||||
AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have `libxml2` library.])
|
||||
# libsystemd (for src/nghttpx)
|
||||
have_libsystemd=no
|
||||
if test "x${request_systemd}" != "xno"; then
|
||||
PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [have_libsystemd=yes],
|
||||
[have_libsystemd=no])
|
||||
if test "x${have_libsystemd}" = "xyes"; then
|
||||
AC_DEFINE([HAVE_LIBSYSTEMD], [1],
|
||||
[Define to 1 if you have `libsystemd` library.])
|
||||
else
|
||||
AC_MSG_NOTICE($SYSTEMD_PKG_ERRORS)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${request_systemd}" = "xyes" &&
|
||||
test "x${have_libsystemd}" != "xyes"; then
|
||||
AC_MSG_ERROR([systemd was requested (--with-systemd) but not found])
|
||||
fi
|
||||
|
||||
# libxml2 (for src/nghttp)
|
||||
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6.26],
|
||||
[have_libxml2=yes], [have_libxml2=no])
|
||||
if test "x${have_libxml2}" = "xyes"; then
|
||||
AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have `libxml2` library.])
|
||||
else
|
||||
AC_MSG_NOTICE($LIBXML2_PKG_ERRORS)
|
||||
fi
|
||||
|
||||
if test "x${request_libxml2}" = "xyes" &&
|
||||
test "x${have_libxml2}" != "xyes"; then
|
||||
AC_MSG_ERROR([libxml2 was requested (--with-libxml2) but not found])
|
||||
@@ -399,26 +453,6 @@ if test "x${request_jemalloc}" = "xyes" &&
|
||||
AC_MSG_ERROR([jemalloc was requested (--with-jemalloc) but not found])
|
||||
fi
|
||||
|
||||
# spdylay (for src/nghttpx and src/h2load)
|
||||
have_spdylay=no
|
||||
if test "x${request_spdylay}" != "xno"; then
|
||||
PKG_CHECK_MODULES([LIBSPDYLAY], [libspdylay >= 1.3.2],
|
||||
[have_spdylay=yes], [have_spdylay=no])
|
||||
if test "x${have_spdylay}" = "xyes"; then
|
||||
AC_DEFINE([HAVE_SPDYLAY], [1], [Define to 1 if you have `spdylay` library.])
|
||||
else
|
||||
AC_MSG_NOTICE($LIBSPDYLAY_PKG_ERRORS)
|
||||
AC_MSG_NOTICE([The SPDY support in nghttpx and h2load will be disabled.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${request_spdylay}" = "xyes" &&
|
||||
test "x${have_spdylay}" != "xyes"; then
|
||||
AC_MSG_ERROR([spdylay was requested (--with-spdylay) but not found])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([HAVE_SPDYLAY], [ test "x${have_spdylay}" = "xyes" ])
|
||||
|
||||
# Check Boost Asio library
|
||||
have_asio_lib=no
|
||||
|
||||
@@ -438,13 +472,14 @@ if test "x${request_asio_lib}" = "xyes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL
|
||||
# and libev
|
||||
# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL,
|
||||
# libev, and libc-ares.
|
||||
enable_app=no
|
||||
if test "x${request_app}" != "xno" &&
|
||||
test "x${have_zlib}" = "xyes" &&
|
||||
test "x${have_openssl}" = "xyes" &&
|
||||
test "x${have_libev}" = "xyes"; then
|
||||
test "x${have_libev}" = "xyes" &&
|
||||
test "x${have_libcares}" = "xyes"; then
|
||||
enable_app=yes
|
||||
fi
|
||||
|
||||
@@ -599,6 +634,26 @@ AC_SYS_LARGEFILE
|
||||
AC_CHECK_MEMBER([struct tm.tm_gmtoff], [have_struct_tm_tm_gmtoff=yes],
|
||||
[have_struct_tm_tm_gmtoff=no], [[#include <time.h>]])
|
||||
|
||||
AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
|
||||
[AC_DEFINE([HAVE_SOCKADDR_IN_SIN_LEN],[1],
|
||||
[Define to 1 if struct sockaddr_in has sin_len member.])],
|
||||
[],
|
||||
[[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
]])
|
||||
|
||||
AC_CHECK_MEMBER([struct sockaddr_in6.sin6_len],
|
||||
[AC_DEFINE([HAVE_SOCKADDR_IN6_SIN6_LEN],[1],
|
||||
[Define to 1 if struct sockaddr_in6 has sin6_len member.])],
|
||||
[],
|
||||
[[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
]])
|
||||
|
||||
if test "x$have_struct_tm_tm_gmtoff" = "xyes"; then
|
||||
AC_DEFINE([HAVE_STRUCT_TM_TM_GMTOFF], [1],
|
||||
[Define to 1 if you have `struct tm.tm_gmtoff` member.])
|
||||
@@ -633,6 +688,7 @@ AC_CHECK_FUNCS([ \
|
||||
memchr \
|
||||
memmove \
|
||||
memset \
|
||||
mkostemp \
|
||||
socket \
|
||||
sqrt \
|
||||
strchr \
|
||||
@@ -660,13 +716,6 @@ AC_CHECK_DECLS([initgroups], [], [], [[
|
||||
#include <grp.h>
|
||||
]])
|
||||
|
||||
# Checks for epoll availability, primarily for examples/tiny-nghttpd
|
||||
AX_HAVE_EPOLL([have_epoll=yes], [have_epoll=no])
|
||||
|
||||
AM_CONDITIONAL([ENABLE_TINY_NGHTTPD],
|
||||
[ test "x${have_epoll}" = "xyes" &&
|
||||
test "x${have_timerfd_create}" = "xyes"])
|
||||
|
||||
save_CFLAGS=$CFLAGS
|
||||
save_CXXFLAGS=$CXXFLAGS
|
||||
|
||||
@@ -720,6 +769,7 @@ if test "x$werror" != "xno"; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"])
|
||||
# Only work with Clang for the moment
|
||||
AX_CHECK_COMPILE_FLAG([-Wheader-guard], [CFLAGS="$CFLAGS -Wheader-guard"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CFLAGS="$CFLAGS -Wsometimes-uninitialized"])
|
||||
|
||||
# This is required because we pass format string as "const char*.
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-format-nonliteral], [CFLAGS="$CFLAGS -Wno-format-nonliteral"])
|
||||
@@ -729,6 +779,10 @@ if test "x$werror" != "xno"; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wall], [CXXFLAGS="$CXXFLAGS -Wall"])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAGS="$CXXFLAGS -Werror"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat-security], [CXXFLAGS="$CXXFLAGS -Wformat-security"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CXXFLAGS="$CXXFLAGS -Wsometimes-uninitialized"])
|
||||
# Disable noexcept-type warning of g++-7. This is not harmful as
|
||||
# long as all source files are compiled with the same compiler.
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-noexcept-type], [CXXFLAGS="$CXXFLAGS -Wno-noexcept-type"])
|
||||
AC_LANG_POP()
|
||||
fi
|
||||
|
||||
@@ -825,6 +879,7 @@ AC_MSG_NOTICE([summary of build options:
|
||||
C preprocessor: ${CPP}
|
||||
CPPFLAGS: ${CPPFLAGS}
|
||||
WARNCFLAGS: ${WARNCFLAGS}
|
||||
WARNCXXFLAGS: ${WARNCXXFLAGS}
|
||||
CXX1XCXXFLAGS: ${CXX1XCXXFLAGS}
|
||||
EXTRACFLAG: ${EXTRACFLAG}
|
||||
LIBS: ${LIBS}
|
||||
@@ -844,13 +899,14 @@ AC_MSG_NOTICE([summary of build options:
|
||||
Failmalloc: ${enable_failmalloc}
|
||||
Libs:
|
||||
OpenSSL: ${have_openssl} (CFLAGS='${OPENSSL_CFLAGS}' LIBS='${OPENSSL_LIBS}')
|
||||
Libxml2: ${have_libxml2} (CFLAGS='${XML_CPPFLAGS}' LIBS='${XML_LIBS}')
|
||||
Libxml2: ${have_libxml2} (CFLAGS='${LIBXML2_CFLAGS}' LIBS='${LIBXML2_LIBS}')
|
||||
Libev: ${have_libev} (CFLAGS='${LIBEV_CFLAGS}' LIBS='${LIBEV_LIBS}')
|
||||
Libc-ares: ${have_libcares} (CFLAGS='${LIBCARES_CFLAGS}' LIBS='${LIBCARES_LIBS}')
|
||||
Libevent(SSL): ${have_libevent_openssl} (CFLAGS='${LIBEVENT_OPENSSL_CFLAGS}' LIBS='${LIBEVENT_OPENSSL_LIBS}')
|
||||
Spdylay: ${have_spdylay} (CFLAGS='${LIBSPDYLAY_CFLAGS}' LIBS='${LIBSPDYLAY_LIBS}')
|
||||
Jansson: ${have_jansson} (CFLAGS='${JANSSON_CFLAGS}' LIBS='${JANSSON_LIBS}')
|
||||
Jemalloc: ${have_jemalloc} (LIBS='${JEMALLOC_LIBS}')
|
||||
Zlib: ${have_zlib} (CFLAGS='${ZLIB_CFLAGS}' LIBS='${ZLIB_LIBS}')
|
||||
Systemd: ${have_libsystemd} (CFLAGS='${SYSTEMD_CFLAGS}' LIBS='${SYSTEMD_LIBS}')
|
||||
Boost CPPFLAGS: ${BOOST_CPPFLAGS}
|
||||
Boost LDFLAGS: ${BOOST_LDFLAGS}
|
||||
Boost::ASIO: ${BOOST_ASIO_LIB}
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
[Unit]
|
||||
Description=HTTP/2 proxy
|
||||
Documentation=man:nghttpx
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=@bindir@/nghttpx --conf=/etc/nghttpx/nghttpx.conf --pid-file=/run/nghttpx.pid --daemon
|
||||
Type=notify
|
||||
ExecStart=@bindir@/nghttpx --conf=/etc/nghttpx/nghttpx.conf
|
||||
ExecReload=/bin/kill --signal HUP $MAINPID
|
||||
KillSignal=SIGQUIT
|
||||
PrivateTmp=yes
|
||||
ProtectHome=yes
|
||||
ProtectSystem=full
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -13,6 +13,7 @@ set(APIDOCS
|
||||
nghttp2_hd_deflate_get_num_table_entries.rst
|
||||
nghttp2_hd_deflate_get_table_entry.rst
|
||||
nghttp2_hd_deflate_hd.rst
|
||||
nghttp2_hd_deflate_hd_vec.rst
|
||||
nghttp2_hd_deflate_new.rst
|
||||
nghttp2_hd_deflate_new2.rst
|
||||
nghttp2_hd_inflate_change_table_size.rst
|
||||
@@ -23,6 +24,7 @@ set(APIDOCS
|
||||
nghttp2_hd_inflate_get_num_table_entries.rst
|
||||
nghttp2_hd_inflate_get_table_entry.rst
|
||||
nghttp2_hd_inflate_hd.rst
|
||||
nghttp2_hd_inflate_hd2.rst
|
||||
nghttp2_hd_inflate_new.rst
|
||||
nghttp2_hd_inflate_new2.rst
|
||||
nghttp2_http2_strerror.rst
|
||||
@@ -31,7 +33,9 @@ set(APIDOCS
|
||||
nghttp2_option_del.rst
|
||||
nghttp2_option_new.rst
|
||||
nghttp2_option_set_builtin_recv_extension_type.rst
|
||||
nghttp2_option_set_max_deflate_dynamic_table_size.rst
|
||||
nghttp2_option_set_max_reserved_remote_streams.rst
|
||||
nghttp2_option_set_max_send_header_block_length.rst
|
||||
nghttp2_option_set_no_auto_ping_ack.rst
|
||||
nghttp2_option_set_no_auto_window_update.rst
|
||||
nghttp2_option_set_no_http_messaging.rst
|
||||
@@ -45,6 +49,7 @@ set(APIDOCS
|
||||
nghttp2_rcbuf_decref.rst
|
||||
nghttp2_rcbuf_get_buf.rst
|
||||
nghttp2_rcbuf_incref.rst
|
||||
nghttp2_rcbuf_is_static.rst
|
||||
nghttp2_select_next_protocol.rst
|
||||
nghttp2_session_callbacks_del.rst
|
||||
nghttp2_session_callbacks_new.rst
|
||||
@@ -54,13 +59,15 @@ set(APIDOCS
|
||||
nghttp2_session_callbacks_set_on_begin_frame_callback.rst
|
||||
nghttp2_session_callbacks_set_on_begin_headers_callback.rst
|
||||
nghttp2_session_callbacks_set_on_data_chunk_recv_callback.rst
|
||||
nghttp2_session_callbacks_set_on_extension_chunk_recv_callback.rst
|
||||
nghttp2_session_callbacks_set_on_frame_not_send_callback.rst
|
||||
nghttp2_session_callbacks_set_on_frame_recv_callback.rst
|
||||
nghttp2_session_callbacks_set_on_extension_chunk_recv_callback.rst
|
||||
nghttp2_session_callbacks_set_on_frame_send_callback.rst
|
||||
nghttp2_session_callbacks_set_on_header_callback.rst
|
||||
nghttp2_session_callbacks_set_on_header_callback2.rst
|
||||
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback.rst
|
||||
nghttp2_session_callbacks_set_on_invalid_header_callback.rst
|
||||
nghttp2_session_callbacks_set_on_invalid_header_callback2.rst
|
||||
nghttp2_session_callbacks_set_on_stream_close_callback.rst
|
||||
nghttp2_session_callbacks_set_pack_extension_callback.rst
|
||||
nghttp2_session_callbacks_set_recv_callback.rst
|
||||
@@ -68,6 +75,9 @@ set(APIDOCS
|
||||
nghttp2_session_callbacks_set_send_callback.rst
|
||||
nghttp2_session_callbacks_set_send_data_callback.rst
|
||||
nghttp2_session_callbacks_set_unpack_extension_callback.rst
|
||||
nghttp2_session_change_stream_priority.rst
|
||||
nghttp2_session_check_request_allowed.rst
|
||||
nghttp2_session_check_server_session.rst
|
||||
nghttp2_session_client_new.rst
|
||||
nghttp2_session_client_new2.rst
|
||||
nghttp2_session_client_new3.rst
|
||||
@@ -79,7 +89,11 @@ set(APIDOCS
|
||||
nghttp2_session_find_stream.rst
|
||||
nghttp2_session_get_effective_local_window_size.rst
|
||||
nghttp2_session_get_effective_recv_data_length.rst
|
||||
nghttp2_session_get_hd_deflate_dynamic_table_size.rst
|
||||
nghttp2_session_get_hd_inflate_dynamic_table_size.rst
|
||||
nghttp2_session_get_last_proc_stream_id.rst
|
||||
nghttp2_session_get_local_settings.rst
|
||||
nghttp2_session_get_local_window_size.rst
|
||||
nghttp2_session_get_next_stream_id.rst
|
||||
nghttp2_session_get_outbound_queue_size.rst
|
||||
nghttp2_session_get_remote_settings.rst
|
||||
@@ -88,20 +102,19 @@ set(APIDOCS
|
||||
nghttp2_session_get_stream_effective_local_window_size.rst
|
||||
nghttp2_session_get_stream_effective_recv_data_length.rst
|
||||
nghttp2_session_get_stream_local_close.rst
|
||||
nghttp2_session_get_stream_local_window_size.rst
|
||||
nghttp2_session_get_stream_remote_close.rst
|
||||
nghttp2_session_get_stream_remote_window_size.rst
|
||||
nghttp2_session_get_stream_user_data.rst
|
||||
nghttp2_session_mem_recv.rst
|
||||
nghttp2_session_mem_send.rst
|
||||
nghttp2_session_recv.rst
|
||||
nghttp2_session_change_stream_priority.rst
|
||||
nghttp2_session_check_request_allowed.rst
|
||||
nghttp2_session_check_server_session.rst
|
||||
nghttp2_session_resume_data.rst
|
||||
nghttp2_session_send.rst
|
||||
nghttp2_session_server_new.rst
|
||||
nghttp2_session_server_new2.rst
|
||||
nghttp2_session_server_new3.rst
|
||||
nghttp2_session_set_local_window_size.rst
|
||||
nghttp2_session_set_next_stream_id.rst
|
||||
nghttp2_session_set_stream_user_data.rst
|
||||
nghttp2_session_terminate_session.rst
|
||||
@@ -110,6 +123,7 @@ set(APIDOCS
|
||||
nghttp2_session_upgrade2.rst
|
||||
nghttp2_session_want_read.rst
|
||||
nghttp2_session_want_write.rst
|
||||
nghttp2_set_debug_vprintf_callback.rst
|
||||
nghttp2_stream_get_first_child.rst
|
||||
nghttp2_stream_get_next_sibling.rst
|
||||
nghttp2_stream_get_parent.rst
|
||||
|
||||
@@ -57,14 +57,17 @@ APIDOCS= \
|
||||
nghttp2_option_del.rst \
|
||||
nghttp2_option_new.rst \
|
||||
nghttp2_option_set_builtin_recv_extension_type.rst \
|
||||
nghttp2_option_set_max_deflate_dynamic_table_size.rst \
|
||||
nghttp2_option_set_max_reserved_remote_streams.rst \
|
||||
nghttp2_option_set_max_send_header_block_length.rst \
|
||||
nghttp2_option_set_no_auto_ping_ack.rst \
|
||||
nghttp2_option_set_no_auto_window_update.rst \
|
||||
nghttp2_option_set_no_closed_streams.rst \
|
||||
nghttp2_option_set_no_http_messaging.rst \
|
||||
nghttp2_option_set_no_recv_client_magic.rst \
|
||||
nghttp2_option_set_peer_max_concurrent_streams.rst \
|
||||
nghttp2_option_set_user_recv_extension_type.rst \
|
||||
nghttp2_option_set_max_outbound_ack.rst \
|
||||
nghttp2_pack_settings_payload.rst \
|
||||
nghttp2_priority_spec_check_default.rst \
|
||||
nghttp2_priority_spec_default_init.rst \
|
||||
@@ -72,12 +75,14 @@ APIDOCS= \
|
||||
nghttp2_rcbuf_decref.rst \
|
||||
nghttp2_rcbuf_get_buf.rst \
|
||||
nghttp2_rcbuf_incref.rst \
|
||||
nghttp2_rcbuf_is_static.rst \
|
||||
nghttp2_select_next_protocol.rst \
|
||||
nghttp2_session_callbacks_del.rst \
|
||||
nghttp2_session_callbacks_new.rst \
|
||||
nghttp2_session_callbacks_set_before_frame_send_callback.rst \
|
||||
nghttp2_session_callbacks_set_data_source_read_length_callback.rst \
|
||||
nghttp2_session_callbacks_set_error_callback.rst \
|
||||
nghttp2_session_callbacks_set_error_callback2.rst \
|
||||
nghttp2_session_callbacks_set_on_begin_frame_callback.rst \
|
||||
nghttp2_session_callbacks_set_on_begin_headers_callback.rst \
|
||||
nghttp2_session_callbacks_set_on_data_chunk_recv_callback.rst \
|
||||
@@ -97,6 +102,9 @@ APIDOCS= \
|
||||
nghttp2_session_callbacks_set_send_callback.rst \
|
||||
nghttp2_session_callbacks_set_send_data_callback.rst \
|
||||
nghttp2_session_callbacks_set_unpack_extension_callback.rst \
|
||||
nghttp2_session_change_stream_priority.rst \
|
||||
nghttp2_session_check_request_allowed.rst \
|
||||
nghttp2_session_check_server_session.rst \
|
||||
nghttp2_session_client_new.rst \
|
||||
nghttp2_session_client_new2.rst \
|
||||
nghttp2_session_client_new3.rst \
|
||||
@@ -108,7 +116,11 @@ APIDOCS= \
|
||||
nghttp2_session_find_stream.rst \
|
||||
nghttp2_session_get_effective_local_window_size.rst \
|
||||
nghttp2_session_get_effective_recv_data_length.rst \
|
||||
nghttp2_session_get_hd_deflate_dynamic_table_size.rst \
|
||||
nghttp2_session_get_hd_inflate_dynamic_table_size.rst \
|
||||
nghttp2_session_get_last_proc_stream_id.rst \
|
||||
nghttp2_session_get_local_settings.rst \
|
||||
nghttp2_session_get_local_window_size.rst \
|
||||
nghttp2_session_get_next_stream_id.rst \
|
||||
nghttp2_session_get_outbound_queue_size.rst \
|
||||
nghttp2_session_get_remote_settings.rst \
|
||||
@@ -117,15 +129,13 @@ APIDOCS= \
|
||||
nghttp2_session_get_stream_effective_local_window_size.rst \
|
||||
nghttp2_session_get_stream_effective_recv_data_length.rst \
|
||||
nghttp2_session_get_stream_local_close.rst \
|
||||
nghttp2_session_get_stream_local_window_size.rst \
|
||||
nghttp2_session_get_stream_remote_close.rst \
|
||||
nghttp2_session_get_stream_remote_window_size.rst \
|
||||
nghttp2_session_get_stream_user_data.rst \
|
||||
nghttp2_session_mem_recv.rst \
|
||||
nghttp2_session_mem_send.rst \
|
||||
nghttp2_session_recv.rst \
|
||||
nghttp2_session_change_stream_priority.rst \
|
||||
nghttp2_session_check_request_allowed.rst \
|
||||
nghttp2_session_check_server_session.rst \
|
||||
nghttp2_session_resume_data.rst \
|
||||
nghttp2_session_send.rst \
|
||||
nghttp2_session_server_new.rst \
|
||||
@@ -134,12 +144,14 @@ APIDOCS= \
|
||||
nghttp2_session_set_local_window_size.rst \
|
||||
nghttp2_session_set_next_stream_id.rst \
|
||||
nghttp2_session_set_stream_user_data.rst \
|
||||
nghttp2_session_set_user_data.rst \
|
||||
nghttp2_session_terminate_session.rst \
|
||||
nghttp2_session_terminate_session2.rst \
|
||||
nghttp2_session_upgrade.rst \
|
||||
nghttp2_session_upgrade2.rst \
|
||||
nghttp2_session_want_read.rst \
|
||||
nghttp2_session_want_write.rst \
|
||||
nghttp2_set_debug_vprintf_callback.rst \
|
||||
nghttp2_stream_get_first_child.rst \
|
||||
nghttp2_stream_get_next_sibling.rst \
|
||||
nghttp2_stream_get_parent.rst \
|
||||
@@ -153,6 +165,7 @@ APIDOCS= \
|
||||
nghttp2_submit_extension.rst \
|
||||
nghttp2_submit_goaway.rst \
|
||||
nghttp2_submit_headers.rst \
|
||||
nghttp2_submit_origin.rst \
|
||||
nghttp2_submit_ping.rst \
|
||||
nghttp2_submit_priority.rst \
|
||||
nghttp2_submit_push_promise.rst \
|
||||
@@ -259,7 +272,7 @@ apiref.rst: \
|
||||
$(APIDOCS): apiref.rst
|
||||
|
||||
clean-local:
|
||||
[ $(srcdir) = $(builddir) ] || for i in $(RST_FILES); do [ -e $(builddir)/$$i ] && rm $(builddir)/$$i; done
|
||||
if [ $(srcdir) != $(builddir) ]; then for i in $(RST_FILES); do rm -f $(builddir)/$$i; done fi
|
||||
-rm -f apiref.rst
|
||||
-rm -f $(APIDOCS)
|
||||
-rm -rf $(BUILDDIR)/*
|
||||
|
||||
@@ -13,6 +13,7 @@ import re
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst import Directive
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx import version_info
|
||||
@@ -21,10 +22,8 @@ from sphinx.locale import l_, _
|
||||
from sphinx.domains import Domain, ObjType, Index
|
||||
from sphinx.directives import ObjectDescription
|
||||
from sphinx.util.nodes import make_refnode
|
||||
from sphinx.util.compat import Directive
|
||||
from sphinx.util.docfields import Field, GroupedField, TypedField
|
||||
|
||||
|
||||
# REs for Ruby signatures
|
||||
rb_sig_re = re.compile(
|
||||
r'''^ ([\w.]*\.)? # class name(s)
|
||||
|
||||
@@ -8,7 +8,7 @@ _h2load()
|
||||
_get_comp_words_by_ref cur prev
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W '--connection-window-bits --clients --verbose --ciphers --rate --no-tls-proto --requests --base-uri --h1 --threads --npn-list --rate-period --data --version --connection-inactivity-timeout --timing-script-file --max-concurrent-streams --connection-active-timeout --input-file --header --window-bits --help ' -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W '--connection-window-bits --clients --verbose --ciphers --rate --no-tls-proto --header-table-size --requests --log-file --base-uri --h1 --threads --npn-list --rate-period --data --version --connection-inactivity-timeout --timing-script-file --encoder-header-table-size --max-concurrent-streams --connection-active-timeout --input-file --help --window-bits --warm-up-time --duration --header ' -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
_filedir
|
||||
|
||||
@@ -8,7 +8,7 @@ _nghttp()
|
||||
_get_comp_words_by_ref cur prev
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W '--no-push --verbose --no-dep --get-assets --har --header-table-size --multiply --padding --hexdump --max-concurrent-streams --continuation --connection-window-bits --peer-max-concurrent-streams --timeout --data --no-content-length --version --color --cert --upgrade --remote-name --trailer --weight --help --key --null-out --window-bits --expect-continue --stat --header ' -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W '--no-push --verbose --no-dep --get-assets --har --header-table-size --multiply --encoder-header-table-size --padding --hexdump --max-concurrent-streams --continuation --connection-window-bits --peer-max-concurrent-streams --timeout --data --no-content-length --version --color --cert --upgrade --remote-name --trailer --weight --help --key --null-out --window-bits --expect-continue --stat --no-verify-peer --header ' -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
_filedir
|
||||
|
||||
@@ -8,7 +8,7 @@ _nghttpd()
|
||||
_get_comp_words_by_ref cur prev
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W '--htdocs --verbose --daemon --echo-upload --error-gzip --push --header-table-size --padding --hexdump --max-concurrent-streams --no-tls --connection-window-bits --mime-types-file --no-content-length --workers --version --color --early-response --dh-param-file --trailer --address --window-bits --verify-client --help ' -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W '--htdocs --verbose --daemon --echo-upload --error-gzip --push --header-table-size --encoder-header-table-size --padding --hexdump --max-concurrent-streams --no-tls --connection-window-bits --mime-types-file --no-content-length --workers --version --color --early-response --dh-param-file --trailer --address --window-bits --verify-client --help ' -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
_filedir
|
||||
|
||||
@@ -8,7 +8,7 @@ _nghttpx()
|
||||
_get_comp_words_by_ref cur prev
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W '--worker-read-rate --include --frontend-http2-dump-response-header --tls-ticket-key-file --verify-client-cacert --max-response-header-fields --backend-request-buffer --max-request-header-fields --backend-http2-connection-window-bits --conf --backend-http2-max-concurrent-streams --worker-write-burst --npn-list --fetch-ocsp-response-file --no-via --tls-session-cache-memcached-cert-file --no-http2-cipher-black-list --mruby-file --no-server-push --stream-read-timeout --tls-ticket-key-memcached --forwarded-for --accesslog-syslog --frontend-http2-read-timeout --listener-disable-timeout --frontend-http2-connection-window-bits --ciphers --strip-incoming-x-forwarded-for --private-key-passwd-file --backend-keep-alive-timeout --backend-http-proxy-uri --rlimit-nofile --tls-ticket-key-memcached-cert-file --ocsp-update-interval --forwarded-by --tls-session-cache-memcached-private-key-file --error-page --backend-write-timeout --tls-dyn-rec-warmup-threshold --tls-ticket-key-memcached-max-retry --http2-no-cookie-crumbling --worker-read-burst --dh-param-file --accesslog-format --errorlog-syslog --request-header-field-buffer --api-max-request-body --errorlog-file --frontend-http2-max-concurrent-streams --frontend-write-timeout --tls-ticket-key-cipher --read-burst --backend --insecure --backend-max-backoff --log-level --host-rewrite --tls-proto-list --tls-ticket-key-memcached-interval --frontend-http2-setting-timeout --worker-frontend-connections --syslog-facility --fastopen --no-location-rewrite --tls-session-cache-memcached --no-ocsp --backend-response-buffer --workers --add-forwarded --frontend-http2-window-bits --worker-write-rate --add-request-header --backend-http2-settings-timeout --subcert --no-kqueue --help --frontend-frame-debug --pid-file --frontend-http2-dump-request-header --daemon --write-rate --altsvc --user --add-x-forwarded-for --frontend-read-timeout --tls-ticket-key-memcached-max-fail --backlog --write-burst --backend-connections-per-host --backend-http2-window-bits --response-header-field-buffer --tls-ticket-key-memcached-address-family --padding --tls-session-cache-memcached-address-family --stream-write-timeout --cacert --tls-ticket-key-memcached-private-key-file --backend-address-family --version --add-response-header --backend-read-timeout --frontend --accesslog-file --http2-proxy --client-private-key-file --client-cert-file --accept-proxy-protocol --tls-dyn-rec-idle-timeout --verify-client --read-rate --backend-connections-per-frontend --strip-incoming-forwarded ' -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W '--worker-read-rate --include --frontend-http2-dump-response-header --tls-ticket-key-file --verify-client-cacert --max-response-header-fields --backend-http2-window-size --tls13-client-ciphers --frontend-keep-alive-timeout --backend-request-buffer --max-request-header-fields --backend-connect-timeout --tls-max-proto-version --conf --dns-lookup-timeout --backend-http2-max-concurrent-streams --worker-write-burst --npn-list --dns-max-try --fetch-ocsp-response-file --no-via --tls-session-cache-memcached-cert-file --no-http2-cipher-black-list --mruby-file --add-forwarded --client-no-http2-cipher-black-list --stream-read-timeout --client-ciphers --ocsp-update-interval --forwarded-for --accesslog-syslog --dns-cache-timeout --frontend-http2-read-timeout --listener-disable-timeout --ciphers --client-psk-secrets --strip-incoming-x-forwarded-for --no-server-rewrite --private-key-passwd-file --backend-keep-alive-timeout --backend-http-proxy-uri --frontend-max-requests --tls-no-postpone-early-data --rlimit-nofile --no-strip-incoming-x-forwarded-proto --tls-ticket-key-memcached-cert-file --no-verify-ocsp --forwarded-by --tls-session-cache-memcached-private-key-file --error-page --ocsp-startup --backend-write-timeout --tls-dyn-rec-warmup-threshold --tls-ticket-key-memcached-max-retry --frontend-http2-window-size --http2-no-cookie-crumbling --worker-read-burst --dh-param-file --accesslog-format --errorlog-syslog --redirect-https-port --request-header-field-buffer --api-max-request-body --frontend-http2-decoder-dynamic-table-size --errorlog-file --frontend-http2-max-concurrent-streams --psk-secrets --frontend-write-timeout --tls-ticket-key-cipher --read-burst --no-add-x-forwarded-proto --backend --server-name --insecure --backend-max-backoff --log-level --host-rewrite --tls-ticket-key-memcached-interval --frontend-http2-setting-timeout --frontend-http2-connection-window-size --worker-frontend-connections --syslog-facility --fastopen --no-location-rewrite --single-thread --tls-session-cache-memcached --no-ocsp --backend-response-buffer --tls-min-proto-version --workers --add-x-forwarded-for --no-server-push --worker-write-rate --add-request-header --backend-http2-settings-timeout --subcert --ignore-per-pattern-mruby-error --ecdh-curves --no-kqueue --help --frontend-frame-debug --tls-sct-dir --pid-file --frontend-http2-dump-request-header --daemon --write-rate --altsvc --backend-http2-decoder-dynamic-table-size --no-strip-incoming-early-data --user --verify-client-tolerate-expired --frontend-read-timeout --tls-ticket-key-memcached-max-fail --backlog --write-burst --backend-connections-per-host --tls-max-early-data --response-header-field-buffer --tls-ticket-key-memcached-address-family --padding --tls-session-cache-memcached-address-family --stream-write-timeout --cacert --tls-ticket-key-memcached-private-key-file --accesslog-write-early --backend-address-family --backend-http2-connection-window-size --tls13-ciphers --version --add-response-header --backend-read-timeout --frontend-http2-optimize-window-size --frontend --accesslog-file --http2-proxy --backend-http2-encoder-dynamic-table-size --client-private-key-file --single-process --client-cert-file --tls-ticket-key-memcached --tls-dyn-rec-idle-timeout --frontend-http2-optimize-write-buffer-size --verify-client --frontend-http2-encoder-dynamic-table-size --read-rate --backend-connections-per-frontend --strip-incoming-forwarded ' -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
_filedir
|
||||
|
||||
@@ -157,7 +157,7 @@ html_theme_path = ['@top_srcdir@/doc/_themes']
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
html_use_smartypants = False
|
||||
#html_use_smartypants = False
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
html_sidebars = {
|
||||
|
||||
2
doc/docutils.conf
Normal file
2
doc/docutils.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
[parsers]
|
||||
smart_quotes=no
|
||||
81
doc/h2load.1
81
doc/h2load.1
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "H2LOAD" "1" "Aug 25, 2016" "1.14.0" "nghttp2"
|
||||
.TH "H2LOAD" "1" "Jun 11, 2019" "1.39.0" "nghttp2"
|
||||
.SH NAME
|
||||
h2load \- HTTP/2 benchmarking tool
|
||||
.
|
||||
@@ -35,7 +35,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
\fBh2load\fP [OPTIONS]... [URI]...
|
||||
.SH DESCRIPTION
|
||||
.sp
|
||||
benchmarking tool for HTTP/2 and SPDY server
|
||||
benchmarking tool for HTTP/2 server
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B <URI>
|
||||
@@ -54,7 +54,9 @@ scheme, host or port values.
|
||||
Number of requests across all clients. If it is used
|
||||
with \fI\%\-\-timing\-script\-file\fP option, this option specifies
|
||||
the number of requests each client performs rather than
|
||||
the number of requests across all clients.
|
||||
the number of requests across all clients. This option
|
||||
is ignored if timing\-based benchmarking is enabled (see
|
||||
\fI\%\-\-duration\fP option).
|
||||
.sp
|
||||
Default: \fB1\fP
|
||||
.UNINDENT
|
||||
@@ -99,7 +101,6 @@ Default: \fB1\fP
|
||||
.TP
|
||||
.B \-w, \-\-window\-bits=<N>
|
||||
Sets the stream level initial window size to (2**<N>)\-1.
|
||||
For SPDY, 2**<N> is used instead.
|
||||
.sp
|
||||
Default: \fB30\fP
|
||||
.UNINDENT
|
||||
@@ -107,9 +108,7 @@ Default: \fB30\fP
|
||||
.TP
|
||||
.B \-W, \-\-connection\-window\-bits=<N>
|
||||
Sets the connection level initial window size to
|
||||
(2**<N>)\-1. For SPDY, if <N> is strictly less than 16,
|
||||
this option is ignored. Otherwise 2**<N> is used for
|
||||
SPDY.
|
||||
(2**<N>)\-1.
|
||||
.sp
|
||||
Default: \fB30\fP
|
||||
.UNINDENT
|
||||
@@ -123,14 +122,15 @@ Add/Override a header to the requests.
|
||||
.B \-\-ciphers=<SUITE>
|
||||
Set allowed cipher list. The format of the string is
|
||||
described in OpenSSL ciphers(1).
|
||||
.sp
|
||||
Default: \fBECDHE\-ECDSA\-AES256\-GCM\-SHA384:ECDHE\-RSA\-AES256\-GCM\-SHA384:ECDHE\-ECDSA\-CHACHA20\-POLY1305:ECDHE\-RSA\-CHACHA20\-POLY1305:ECDHE\-ECDSA\-AES128\-GCM\-SHA256:ECDHE\-RSA\-AES128\-GCM\-SHA256:ECDHE\-ECDSA\-AES256\-SHA384:ECDHE\-RSA\-AES256\-SHA384:ECDHE\-ECDSA\-AES128\-SHA256:ECDHE\-RSA\-AES128\-SHA256\fP
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-p, \-\-no\-tls\-proto=<PROTOID>
|
||||
Specify ALPN identifier of the protocol to be used when
|
||||
accessing http URI without SSL/TLS.
|
||||
Available protocols: spdy/2, spdy/3, spdy/3.1, h2c and
|
||||
http/1.1
|
||||
Available protocols: h2c and http/1.1
|
||||
.sp
|
||||
Default: \fBh2c\fP
|
||||
.UNINDENT
|
||||
@@ -155,7 +155,7 @@ example, with \fI\%\-t\fP2 and \fI\%\-r\fP4, each thread gets 2
|
||||
connections per period. When the rate is 0, the program
|
||||
will run as it normally does, creating connections at
|
||||
whatever variable rate it wants. The default value for
|
||||
this option is 0.
|
||||
this option is 0. \fI\%\-r\fP and \fI\%\-D\fP are mutually exclusive.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
@@ -168,6 +168,20 @@ option is 1s.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-D, \-\-duration=<N>
|
||||
Specifies the main duration for the measurements in case
|
||||
of timing\-based benchmarking. \fI\%\-D\fP and \fI\%\-r\fP are mutually
|
||||
exclusive.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-warm\-up\-time=<DURATION>
|
||||
Specifies the time period before starting the actual
|
||||
measurements, in case of timing\-based benchmarking.
|
||||
Needs to provided along with \fI\%\-D\fP option.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-T, \-\-connection\-active\-timeout=<DURATION>
|
||||
Specifies the maximum time that h2load is willing to
|
||||
keep a connection open, regardless of the activity on
|
||||
@@ -231,7 +245,7 @@ NPN. The parameter must be delimited by a single comma
|
||||
only and any white spaces are treated as a part of
|
||||
protocol string.
|
||||
.sp
|
||||
Default: \fBh2,h2\-16,h2\-14,spdy/3.1,spdy/3,spdy/2,http/1.1\fP
|
||||
Default: \fBh2,h2\-16,h2\-14,http/1.1\fP
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
@@ -242,6 +256,34 @@ http/1.1 for both http and https URI.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-header\-table\-size=<SIZE>
|
||||
Specify decoder header table size.
|
||||
.sp
|
||||
Default: \fB4K\fP
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-encoder\-header\-table\-size=<SIZE>
|
||||
Specify encoder header table size. The decoder (server)
|
||||
specifies the maximum dynamic table size it accepts.
|
||||
Then the negotiated dynamic table size is the minimum of
|
||||
this option value and the value which server specified.
|
||||
.sp
|
||||
Default: \fB4K\fP
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-log\-file=<PATH>
|
||||
Write per\-request information to a file as tab\-separated
|
||||
columns: start time as microseconds since epoch; HTTP
|
||||
status code; microseconds until end of response. More
|
||||
columns may be added later. Rows are ordered by end\-of\-
|
||||
response time when using one worker thread, but may
|
||||
appear slightly out of order with multiple threads due
|
||||
to buffering. Status code is \-1 for failed streams.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-v, \-\-verbose
|
||||
Output debug information.
|
||||
.UNINDENT
|
||||
@@ -256,6 +298,9 @@ Display version information and exit.
|
||||
Display this help and exit.
|
||||
.UNINDENT
|
||||
.sp
|
||||
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
|
||||
10 * 1024). Units are K, M and G (powers of 1024).
|
||||
.sp
|
||||
The <DURATION> argument is an integer and an optional unit (e.g., 1s
|
||||
is 1 second and 500ms is 500 milliseconds). Units are h, m, s or ms
|
||||
(hours, minutes, seconds and milliseconds, respectively). If a unit
|
||||
@@ -313,8 +358,7 @@ compression. Let \fBdecompressed(headers)\fP to the number of bytes
|
||||
used for header fields after decompression. The \fBspace savings\fP
|
||||
is calculated by (1 \- \fBheaders\fP / \fBdecompressed(headers)\fP) *
|
||||
100. For HTTP/1.1, this is usually 0.00%, since it does not have
|
||||
header compression. For HTTP/2 and SPDY, it shows some insightful
|
||||
numbers.
|
||||
header compression. For HTTP/2, it shows some insightful numbers.
|
||||
.TP
|
||||
.B data
|
||||
The number of response body bytes received from the server.
|
||||
@@ -344,13 +388,16 @@ range (mean +/\- sd) against total number of successful requests.
|
||||
.INDENT 7.0
|
||||
.TP
|
||||
.B min
|
||||
The minimum time taken to connect to a server.
|
||||
The minimum time taken to connect to a server including TLS
|
||||
handshake.
|
||||
.TP
|
||||
.B max
|
||||
The maximum time taken to connect to a server.
|
||||
The maximum time taken to connect to a server including TLS
|
||||
handshake.
|
||||
.TP
|
||||
.B mean
|
||||
The mean time taken to connect to a server.
|
||||
The mean time taken to connect to a server including TLS
|
||||
handshake.
|
||||
.TP
|
||||
.B sd
|
||||
The standard deviation of the time taken to connect to a server.
|
||||
@@ -411,7 +458,7 @@ h2load sets large flow control window by default, and effectively
|
||||
disables flow control to avoid under utilization of server
|
||||
performance. To set smaller flow control window, use \fI\%\-w\fP and
|
||||
\fI\%\-W\fP options. For example, use \fB\-w16 \-W16\fP to set default
|
||||
window size described in HTTP/2 and SPDY protocol specification.
|
||||
window size described in HTTP/2 protocol specification.
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fBnghttp(1)\fP, \fBnghttpd(1)\fP, \fBnghttpx(1)\fP
|
||||
|
||||
@@ -14,7 +14,7 @@ SYNOPSIS
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
benchmarking tool for HTTP/2 and SPDY server
|
||||
benchmarking tool for HTTP/2 server
|
||||
|
||||
.. describe:: <URI>
|
||||
|
||||
@@ -34,7 +34,9 @@ OPTIONS
|
||||
Number of requests across all clients. If it is used
|
||||
with :option:`--timing-script-file` option, this option specifies
|
||||
the number of requests each client performs rather than
|
||||
the number of requests across all clients.
|
||||
the number of requests across all clients. This option
|
||||
is ignored if timing-based benchmarking is enabled (see
|
||||
:option:`--duration` option).
|
||||
|
||||
Default: ``1``
|
||||
|
||||
@@ -74,16 +76,13 @@ OPTIONS
|
||||
.. option:: -w, --window-bits=<N>
|
||||
|
||||
Sets the stream level initial window size to (2\*\*<N>)-1.
|
||||
For SPDY, 2**<N> is used instead.
|
||||
|
||||
Default: ``30``
|
||||
|
||||
.. option:: -W, --connection-window-bits=<N>
|
||||
|
||||
Sets the connection level initial window size to
|
||||
(2**<N>)-1. For SPDY, if <N> is strictly less than 16,
|
||||
this option is ignored. Otherwise 2\*\*<N> is used for
|
||||
SPDY.
|
||||
(2\*\*<N>)-1.
|
||||
|
||||
Default: ``30``
|
||||
|
||||
@@ -96,12 +95,13 @@ OPTIONS
|
||||
Set allowed cipher list. The format of the string is
|
||||
described in OpenSSL ciphers(1).
|
||||
|
||||
Default: ``ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256``
|
||||
|
||||
.. option:: -p, --no-tls-proto=<PROTOID>
|
||||
|
||||
Specify ALPN identifier of the protocol to be used when
|
||||
accessing http URI without SSL/TLS.
|
||||
Available protocols: spdy/2, spdy/3, spdy/3.1, h2c and
|
||||
http/1.1
|
||||
Available protocols: h2c and http/1.1
|
||||
|
||||
Default: ``h2c``
|
||||
|
||||
@@ -124,7 +124,7 @@ OPTIONS
|
||||
connections per period. When the rate is 0, the program
|
||||
will run as it normally does, creating connections at
|
||||
whatever variable rate it wants. The default value for
|
||||
this option is 0.
|
||||
this option is 0. :option:`-r` and :option:`\-D` are mutually exclusive.
|
||||
|
||||
.. option:: --rate-period=<DURATION>
|
||||
|
||||
@@ -134,6 +134,18 @@ OPTIONS
|
||||
the rate option is not used. The default value for this
|
||||
option is 1s.
|
||||
|
||||
.. option:: -D, --duration=<N>
|
||||
|
||||
Specifies the main duration for the measurements in case
|
||||
of timing-based benchmarking. :option:`-D` and :option:`\-r` are mutually
|
||||
exclusive.
|
||||
|
||||
.. option:: --warm-up-time=<DURATION>
|
||||
|
||||
Specifies the time period before starting the actual
|
||||
measurements, in case of timing-based benchmarking.
|
||||
Needs to provided along with :option:`-D` option.
|
||||
|
||||
.. option:: -T, --connection-active-timeout=<DURATION>
|
||||
|
||||
Specifies the maximum time that h2load is willing to
|
||||
@@ -194,7 +206,7 @@ OPTIONS
|
||||
only and any white spaces are treated as a part of
|
||||
protocol string.
|
||||
|
||||
Default: ``h2,h2-16,h2-14,spdy/3.1,spdy/3,spdy/2,http/1.1``
|
||||
Default: ``h2,h2-16,h2-14,http/1.1``
|
||||
|
||||
.. option:: --h1
|
||||
|
||||
@@ -202,6 +214,31 @@ OPTIONS
|
||||
:option:`--no-tls-proto`\=http/1.1, which effectively force
|
||||
http/1.1 for both http and https URI.
|
||||
|
||||
.. option:: --header-table-size=<SIZE>
|
||||
|
||||
Specify decoder header table size.
|
||||
|
||||
Default: ``4K``
|
||||
|
||||
.. option:: --encoder-header-table-size=<SIZE>
|
||||
|
||||
Specify encoder header table size. The decoder (server)
|
||||
specifies the maximum dynamic table size it accepts.
|
||||
Then the negotiated dynamic table size is the minimum of
|
||||
this option value and the value which server specified.
|
||||
|
||||
Default: ``4K``
|
||||
|
||||
.. option:: --log-file=<PATH>
|
||||
|
||||
Write per-request information to a file as tab-separated
|
||||
columns: start time as microseconds since epoch; HTTP
|
||||
status code; microseconds until end of response. More
|
||||
columns may be added later. Rows are ordered by end-of-
|
||||
response time when using one worker thread, but may
|
||||
appear slightly out of order with multiple threads due
|
||||
to buffering. Status code is -1 for failed streams.
|
||||
|
||||
.. option:: -v, --verbose
|
||||
|
||||
Output debug information.
|
||||
@@ -216,6 +253,9 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
|
||||
10 * 1024). Units are K, M and G (powers of 1024).
|
||||
|
||||
The <DURATION> argument is an integer and an optional unit (e.g., 1s
|
||||
is 1 second and 500ms is 500 milliseconds). Units are h, m, s or ms
|
||||
(hours, minutes, seconds and milliseconds, respectively). If a unit
|
||||
@@ -264,8 +304,7 @@ traffic
|
||||
used for header fields after decompression. The ``space savings``
|
||||
is calculated by (1 - ``headers`` / ``decompressed(headers)``) *
|
||||
100. For HTTP/1.1, this is usually 0.00%, since it does not have
|
||||
header compression. For HTTP/2 and SPDY, it shows some insightful
|
||||
numbers.
|
||||
header compression. For HTTP/2, it shows some insightful numbers.
|
||||
data
|
||||
The number of response body bytes received from the server.
|
||||
|
||||
@@ -284,11 +323,14 @@ time for request
|
||||
|
||||
time for connect
|
||||
min
|
||||
The minimum time taken to connect to a server.
|
||||
The minimum time taken to connect to a server including TLS
|
||||
handshake.
|
||||
max
|
||||
The maximum time taken to connect to a server.
|
||||
The maximum time taken to connect to a server including TLS
|
||||
handshake.
|
||||
mean
|
||||
The mean time taken to connect to a server.
|
||||
The mean time taken to connect to a server including TLS
|
||||
handshake.
|
||||
sd
|
||||
The standard deviation of the time taken to connect to a server.
|
||||
+/- sd
|
||||
@@ -333,7 +375,7 @@ h2load sets large flow control window by default, and effectively
|
||||
disables flow control to avoid under utilization of server
|
||||
performance. To set smaller flow control window, use :option:`-w` and
|
||||
:option:`-W` options. For example, use ``-w16 -W16`` to set default
|
||||
window size described in HTTP/2 and SPDY protocol specification.
|
||||
window size described in HTTP/2 protocol specification.
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
|
||||
@@ -41,8 +41,7 @@ traffic
|
||||
used for header fields after decompression. The ``space savings``
|
||||
is calculated by (1 - ``headers`` / ``decompressed(headers)``) *
|
||||
100. For HTTP/1.1, this is usually 0.00%, since it does not have
|
||||
header compression. For HTTP/2 and SPDY, it shows some insightful
|
||||
numbers.
|
||||
header compression. For HTTP/2, it shows some insightful numbers.
|
||||
data
|
||||
The number of response body bytes received from the server.
|
||||
|
||||
@@ -61,11 +60,14 @@ time for request
|
||||
|
||||
time for connect
|
||||
min
|
||||
The minimum time taken to connect to a server.
|
||||
The minimum time taken to connect to a server including TLS
|
||||
handshake.
|
||||
max
|
||||
The maximum time taken to connect to a server.
|
||||
The maximum time taken to connect to a server including TLS
|
||||
handshake.
|
||||
mean
|
||||
The mean time taken to connect to a server.
|
||||
The mean time taken to connect to a server including TLS
|
||||
handshake.
|
||||
sd
|
||||
The standard deviation of the time taken to connect to a server.
|
||||
+/- sd
|
||||
@@ -110,7 +112,7 @@ h2load sets large flow control window by default, and effectively
|
||||
disables flow control to avoid under utilization of server
|
||||
performance. To set smaller flow control window, use :option:`-w` and
|
||||
:option:`-W` options. For example, use ``-w16 -W16`` to set default
|
||||
window size described in HTTP/2 and SPDY protocol specification.
|
||||
window size described in HTTP/2 protocol specification.
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
|
||||
16
doc/nghttp.1
16
doc/nghttp.1
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "NGHTTP" "1" "Aug 25, 2016" "1.14.0" "nghttp2"
|
||||
.TH "NGHTTP" "1" "Jun 11, 2019" "1.39.0" "nghttp2"
|
||||
.SH NAME
|
||||
nghttp \- HTTP/2 client
|
||||
.
|
||||
@@ -170,6 +170,14 @@ multiple header table size change.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-encoder\-header\-table\-size=<SIZE>
|
||||
Specify encoder header table size. The decoder (server)
|
||||
specifies the maximum dynamic table size it accepts.
|
||||
Then the negotiated dynamic table size is the minimum of
|
||||
this option value and the value which server specified.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-b, \-\-padding=<N>
|
||||
Add at most <N> bytes to a frame payload as padding.
|
||||
Specify 0 to disable padding.
|
||||
@@ -228,6 +236,12 @@ combined with the \fI\%\-d\fP option.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-y, \-\-no\-verify\-peer
|
||||
Suppress warning on server certificate verification
|
||||
failure.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-version
|
||||
Display version information and exit.
|
||||
.UNINDENT
|
||||
|
||||
@@ -131,6 +131,13 @@ OPTIONS
|
||||
frame payload before the last value, to simulate
|
||||
multiple header table size change.
|
||||
|
||||
.. option:: --encoder-header-table-size=<SIZE>
|
||||
|
||||
Specify encoder header table size. The decoder (server)
|
||||
specifies the maximum dynamic table size it accepts.
|
||||
Then the negotiated dynamic table size is the minimum of
|
||||
this option value and the value which server specified.
|
||||
|
||||
.. option:: -b, --padding=<N>
|
||||
|
||||
Add at most <N> bytes to a frame payload as padding.
|
||||
@@ -179,6 +186,11 @@ OPTIONS
|
||||
Continue interim response. This option is ignored unless
|
||||
combined with the :option:`-d` option.
|
||||
|
||||
.. option:: -y, --no-verify-peer
|
||||
|
||||
Suppress warning on server certificate verification
|
||||
failure.
|
||||
|
||||
.. option:: --version
|
||||
|
||||
Display version information and exit.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "NGHTTPD" "1" "Aug 25, 2016" "1.14.0" "nghttp2"
|
||||
.TH "NGHTTPD" "1" "Jun 11, 2019" "1.39.0" "nghttp2"
|
||||
.SH NAME
|
||||
nghttpd \- HTTP/2 server
|
||||
.
|
||||
@@ -99,6 +99,14 @@ Specify decoder header table size.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-encoder\-header\-table\-size=<SIZE>
|
||||
Specify encoder header table size. The decoder (client)
|
||||
specifies the maximum dynamic table size it accepts.
|
||||
Then the negotiated dynamic table size is the minimum of
|
||||
this option value and the value which client specified.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-color
|
||||
Force colored log output.
|
||||
.UNINDENT
|
||||
|
||||
@@ -70,6 +70,13 @@ OPTIONS
|
||||
|
||||
Specify decoder header table size.
|
||||
|
||||
.. option:: --encoder-header-table-size=<SIZE>
|
||||
|
||||
Specify encoder header table size. The decoder (client)
|
||||
specifies the maximum dynamic table size it accepts.
|
||||
Then the negotiated dynamic table size is the minimum of
|
||||
this option value and the value which client specified.
|
||||
|
||||
.. option:: --color
|
||||
|
||||
Force colored log output.
|
||||
|
||||
931
doc/nghttpx.1
931
doc/nghttpx.1
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
232
doc/nghttpx.h2r
232
doc/nghttpx.h2r
@@ -41,6 +41,33 @@ FILES
|
||||
:option:`--conf` option cannot be used in the configuration file and
|
||||
will be ignored if specified.
|
||||
|
||||
Error log
|
||||
Error log is written to stderr by default. It can be configured
|
||||
using :option:`--errorlog-file`. The format of log message is as
|
||||
follows:
|
||||
|
||||
<datetime> <master-pid> <current-pid> <thread-id> <level> (<filename>:<line>) <msg>
|
||||
|
||||
<datetime>
|
||||
It is a combination of date and time when the log is written. It
|
||||
is in ISO 8601 format.
|
||||
|
||||
<master-pid>
|
||||
It is a master process ID.
|
||||
|
||||
<current-pid>
|
||||
It is a process ID which writes this log.
|
||||
|
||||
<thread-id>
|
||||
It is a thread ID which writes this log. It would be unique
|
||||
within <current-pid>.
|
||||
|
||||
<filename> and <line>
|
||||
They are source file name, and line number which produce this log.
|
||||
|
||||
<msg>
|
||||
It is a log message body.
|
||||
|
||||
SIGNALS
|
||||
-------
|
||||
|
||||
@@ -56,14 +83,18 @@ SIGUSR1
|
||||
Reopen log files.
|
||||
|
||||
SIGUSR2
|
||||
|
||||
Fork and execute nghttpx. It will execute the binary in the same
|
||||
path with same command-line arguments and environment variables.
|
||||
After new process comes up, sending SIGQUIT to the original process
|
||||
to perform hot swapping. The difference between SIGUSR2 + SIGQUIT
|
||||
and SIGHUP is that former is usually used to execute new binary, and
|
||||
the master process is newly spawned. On the other hand, the latter
|
||||
just reloads configuration file, and the same master process
|
||||
continues to exist.
|
||||
path with same command-line arguments and environment variables. As
|
||||
of nghttpx version 1.20.0, the new master process sends SIGQUIT to
|
||||
the original master process when it is ready to serve requests. For
|
||||
the earlier versions of nghttpx, user has to send SIGQUIT to the
|
||||
original master process.
|
||||
|
||||
The difference between SIGUSR2 (+ SIGQUIT) and SIGHUP is that former
|
||||
is usually used to execute new binary, and the master process is
|
||||
newly spawned. On the other hand, the latter just reloads
|
||||
configuration file, and the same master process continues to exist.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -140,6 +171,22 @@ be customized using :option:`--fetch-ocsp-response-file` option.
|
||||
If OCSP query is failed, previous OCSP response, if any, is continued
|
||||
to be used.
|
||||
|
||||
:option:`--fetch-ocsp-response-file` option provides wide range of
|
||||
possibility to manage OCSP response. It can take an arbitrary script
|
||||
or executable. The requirement is that it supports the command-line
|
||||
interface of ``fetch-ocsp-response`` script, and it must return a
|
||||
valid DER encoded OCSP response on success. It must return exit code
|
||||
0 on success, and 75 for temporary error, and the other error code for
|
||||
generic failure. For large cluster of servers, it is not efficient
|
||||
for each server to perform OCSP query using ``fetch-ocsp-response``.
|
||||
Instead, you can retrieve OCSP response in some way, and store it in a
|
||||
disk or a shared database. Then specify a program in
|
||||
:option:`--fetch-ocsp-response-file` to fetch it from those stores.
|
||||
This could provide a way to share the OCSP response between fleet of
|
||||
servers, and also any OCSP query strategy can be applied which may be
|
||||
beyond the ability of nghttpx itself or ``fetch-ocsp-response``
|
||||
script.
|
||||
|
||||
TLS SESSION RESUMPTION
|
||||
----------------------
|
||||
|
||||
@@ -153,7 +200,7 @@ By default, session ID is shared by all worker threads.
|
||||
|
||||
If :option:`--tls-session-cache-memcached` is given, nghttpx will
|
||||
insert serialized session data to memcached with
|
||||
``nghttpx:tls-session-cache:`` + lowercased hex string of session ID
|
||||
``nghttpx:tls-session-cache:`` + lowercase hex string of session ID
|
||||
as a memcached entry key, with expiry time 12 hours. Session timeout
|
||||
is set to 12 hours.
|
||||
|
||||
@@ -209,6 +256,24 @@ from the given file. In this case, nghttpx does not rotate key
|
||||
automatically. To rotate key, one has to restart nghttpx (see
|
||||
SIGNALS).
|
||||
|
||||
CERTIFICATE TRANSPARENCY
|
||||
------------------------
|
||||
|
||||
nghttpx supports TLS ``signed_certificate_timestamp`` extension (`RFC
|
||||
6962 <https://tools.ietf.org/html/rfc6962>`_). The relevant options
|
||||
are :option:`--tls-sct-dir` and ``sct-dir`` parameter in
|
||||
:option:`--subcert`. They takes a directory, and nghttpx reads all
|
||||
files whose extension is ``.sct`` under the directory. The ``*.sct``
|
||||
files are encoded as ``SignedCertificateTimestamp`` struct described
|
||||
in `section 3.2 of RFC 69662
|
||||
<https://tools.ietf.org/html/rfc6962#section-3.2>`_. This format is
|
||||
the same one used by `nginx-ct
|
||||
<https://github.com/grahamedgecombe/nginx-ct>`_ and `mod_ssl_ct
|
||||
<https://httpd.apache.org/docs/trunk/mod/mod_ssl_ct.html>`_.
|
||||
`ct-submit <https://github.com/grahamedgecombe/ct-submit>`_ can be
|
||||
used to submit certificates to log servers, and obtain the
|
||||
``SignedCertificateTimestamp`` struct which can be used with nghttpx.
|
||||
|
||||
MRUBY SCRIPTING
|
||||
---------------
|
||||
|
||||
@@ -217,6 +282,14 @@ MRUBY SCRIPTING
|
||||
The current mruby extension API is experimental and not frozen. The
|
||||
API is subject to change in the future release.
|
||||
|
||||
.. warning::
|
||||
|
||||
Almost all string value returned from method, or attribute is a
|
||||
fresh new mruby string, which involves memory allocation, and
|
||||
copies. Therefore, it is strongly recommended to store a return
|
||||
value in a local variable, and use it, instead of calling method or
|
||||
accessing attribute repeatedly.
|
||||
|
||||
nghttpx allows users to extend its capability using mruby scripts.
|
||||
nghttpx has 2 hook points to execute mruby script: request phase and
|
||||
response phase. The request phase hook is invoked after all request
|
||||
@@ -226,9 +299,28 @@ server. These hooks allows users to modify header fields, or common
|
||||
HTTP variables, like authority or request path, and even return custom
|
||||
response without forwarding request to backend servers.
|
||||
|
||||
To specify mruby script file, use :option:`--mruby-file` option. The
|
||||
script will be evaluated once per thread on startup, and it must
|
||||
instantiate object and evaluate it as the return value (e.g.,
|
||||
There are 2 levels of mruby script invocations: global and
|
||||
per-pattern. The global mruby script is set by :option:`--mruby-file`
|
||||
option and is called for all requests. The per-pattern mruby script
|
||||
is set by "mruby" parameter in :option:`-b` option. It is invoked for
|
||||
a request which matches the particular pattern. The order of hook
|
||||
invocation is: global request phase hook, per-pattern request phase
|
||||
hook, per-pattern response phase hook, and finally global response
|
||||
phase hook. If a hook returns a response, any later hooks are not
|
||||
invoked. The global request hook is invoked before the pattern
|
||||
matching is made and changing request path may affect the pattern
|
||||
matching.
|
||||
|
||||
Please note that request and response hooks of per-pattern mruby
|
||||
script for a single request might not come from the same script. This
|
||||
might happen after a request hook is executed, backend failed for some
|
||||
reason, and at the same time, backend configuration is replaced by API
|
||||
request, and then the request uses new configuration on retry. The
|
||||
response hook from new configuration, if it is specified, will be
|
||||
invoked.
|
||||
|
||||
The all mruby script will be evaluated once per thread on startup, and
|
||||
it must instantiate object and evaluate it as the return value (e.g.,
|
||||
``App.new``). This object is called app object. If app object
|
||||
defines ``on_req`` method, it is called with :rb:class:`Nghttpx::Env`
|
||||
object on request hook. Similarly, if app object defines ``on_resp``
|
||||
@@ -263,7 +355,7 @@ respectively.
|
||||
.. rb:attr_reader:: ctx
|
||||
|
||||
Return Ruby hash object. It persists until request finishes.
|
||||
So values set in request phase hoo can be retrieved in
|
||||
So values set in request phase hook can be retrieved in
|
||||
response phase hook.
|
||||
|
||||
.. rb:attr_reader:: phase
|
||||
@@ -291,6 +383,68 @@ respectively.
|
||||
|
||||
Return true if TLS is used on the connection.
|
||||
|
||||
.. rb:attr_reader:: tls_sni
|
||||
|
||||
Return the TLS SNI value which client sent in this connection.
|
||||
|
||||
.. rb:attr_reader:: tls_client_fingerprint_sha256
|
||||
|
||||
Return the SHA-256 fingerprint of a client certificate.
|
||||
|
||||
.. rb:attr_reader:: tls_client_fingerprint_sha1
|
||||
|
||||
Return the SHA-1 fingerprint of a client certificate.
|
||||
|
||||
.. rb:attr_reader:: tls_client_issuer_name
|
||||
|
||||
Return the issuer name of a client certificate.
|
||||
|
||||
.. rb:attr_reader:: tls_client_subject_name
|
||||
|
||||
Return the subject name of a client certificate.
|
||||
|
||||
.. rb:attr_reader:: tls_client_serial
|
||||
|
||||
Return the serial number of a client certificate.
|
||||
|
||||
.. rb:attr_reader:: tls_client_not_before
|
||||
|
||||
Return the start date of a client certificate in seconds since
|
||||
the epoch.
|
||||
|
||||
.. rb:attr_reader:: tls_client_not_after
|
||||
|
||||
Return the end date of a client certificate in seconds since
|
||||
the epoch.
|
||||
|
||||
.. rb:attr_reader:: tls_cipher
|
||||
|
||||
Return a TLS cipher negotiated in this connection.
|
||||
|
||||
.. rb:attr_reader:: tls_protocol
|
||||
|
||||
Return a TLS protocol version negotiated in this connection.
|
||||
|
||||
.. rb:attr_reader:: tls_session_id
|
||||
|
||||
Return a session ID for this connection in hex string.
|
||||
|
||||
.. rb:attr_reader:: tls_session_reused
|
||||
|
||||
Return true if, and only if a SSL/TLS session is reused.
|
||||
|
||||
.. rb:attr_reader:: alpn
|
||||
|
||||
Return ALPN identifier negotiated in this connection.
|
||||
|
||||
.. rb:attr_reader:: tls_handshake_finished
|
||||
|
||||
Return true if SSL/TLS handshake has finished. If it returns
|
||||
false in the request phase hook, the request is received in
|
||||
TLSv1.3 early data (0-RTT) and might be vulnerable to the
|
||||
replay attack. nghttpx will send Early-Data header field to
|
||||
backend servers to indicate this.
|
||||
|
||||
.. rb:class:: Request
|
||||
|
||||
Object to represent request from client. The modification to
|
||||
@@ -421,10 +575,10 @@ respectively.
|
||||
not be invoked. When this method is called in response phase
|
||||
hook, response from backend server is canceled and discarded.
|
||||
The status code and response header fields should be set
|
||||
before using this method. To set status code, use :rb:meth To
|
||||
set response header fields, use
|
||||
before using this method. To set status code, use
|
||||
:rb:attr:`Nghttpx::Response#status`. If status code is not
|
||||
set, 200 is used. :rb:meth:`Nghttpx::Response#add_header` and
|
||||
set, 200 is used. To set response header fields,
|
||||
:rb:meth:`Nghttpx::Response#add_header` and
|
||||
:rb:meth:`Nghttpx::Response#set_header`. When this method is
|
||||
invoked in response phase hook, the response headers are
|
||||
filled with the ones received from backend server. To send
|
||||
@@ -433,6 +587,18 @@ respectively.
|
||||
existing header fields, and then add required header fields.
|
||||
It is an error to call this method twice for a given request.
|
||||
|
||||
.. rb:method:: send_info(status, headers)
|
||||
|
||||
Send non-final (informational) response to a client. *status*
|
||||
must be in the range [100, 199], inclusive. *headers* is a
|
||||
hash containing response header fields. Its key must be a
|
||||
string, and the associated value must be either string or
|
||||
array of strings. Since this is not a final response, even if
|
||||
this method is invoked, request is still forwarded to a
|
||||
backend unless :rb:meth:`Nghttpx::Response#return` is called.
|
||||
This method can be called multiple times. It cannot be called
|
||||
after :rb:meth:`Nghttpx::Response#return` is called.
|
||||
|
||||
MRUBY EXAMPLES
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
@@ -494,17 +660,20 @@ status
|
||||
code
|
||||
HTTP status code
|
||||
|
||||
Additionally, depending on the API endpoint, ``data`` key may be
|
||||
present, and its value contains the API endpoint specific data.
|
||||
|
||||
We wrote "normally", since nghttpx may return ordinal HTML response in
|
||||
some cases where the error has occurred before reaching API endpoint
|
||||
(e.g., header field is too large).
|
||||
|
||||
The following section describes available API endpoints.
|
||||
|
||||
PUT /api/v1beta1/backendconfig
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
POST /api/v1beta1/backendconfig
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This API replaces the current backend server settings with the
|
||||
requested ones. The request method should be PUT, but POST is also
|
||||
requested ones. The request method should be POST, but PUT is also
|
||||
acceptable. The request body must be nghttpx configuration file
|
||||
format. For configuration file format, see `FILES`_ section. The
|
||||
line separator inside the request body must be single LF (0x0A).
|
||||
@@ -520,10 +689,29 @@ The replacement is done instantly without breaking existing
|
||||
connections or requests. It also avoids any process creation as is
|
||||
the case with hot swapping with signals.
|
||||
|
||||
The one limitation is that only numeric IP address is allowd in
|
||||
:option:`backend <--backend>` in request body while non numeric
|
||||
hostname is allowed in command-line or configuration file is read
|
||||
using :option:`--conf`.
|
||||
The one limitation is that only numeric IP address is allowed in
|
||||
:option:`backend <--backend>` in request body unless "dns" parameter
|
||||
is used while non numeric hostname is allowed in command-line or
|
||||
configuration file is read using :option:`--conf`.
|
||||
|
||||
GET /api/v1beta1/configrevision
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This API returns configuration revision of the current nghttpx. The
|
||||
configuration revision is opaque string, and it changes after each
|
||||
reloading by SIGHUP. With this API, an external application knows
|
||||
that whether nghttpx has finished reloading its configuration by
|
||||
comparing the configuration revisions between before and after
|
||||
reloading. It is recommended to disable persistent (keep-alive)
|
||||
connection for this purpose in order to avoid to send a request using
|
||||
the reused connection which may bound to an old process.
|
||||
|
||||
This API returns response including ``data`` key. Its value is JSON
|
||||
object, and it contains at least the following key:
|
||||
|
||||
configRevision
|
||||
The configuration revision of the current nghttpx
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
|
||||
@@ -36,7 +36,7 @@ functions, and it also interacts with it via many API function calls.
|
||||
An application can create as many :type:`nghttp2_session` object as it
|
||||
wants. But single :type:`nghttp2_session` object must be used by a
|
||||
single thread at the same time. This is not so hard to enforce since
|
||||
most event-based architecture applicatons use is single thread per
|
||||
most event-based architecture applications use is single thread per
|
||||
core, and handling one connection I/O is done by single thread.
|
||||
|
||||
To feed input to :type:`nghttp2_session` object, one can use
|
||||
@@ -110,13 +110,16 @@ HTTP Messaging
|
||||
|
||||
By default, nghttp2 library checks HTTP messaging rules described in
|
||||
`HTTP/2 specification, section 8
|
||||
<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-8>`_.
|
||||
Everything described in that section is not validated however. We
|
||||
briefly describe what the library does in this area. In the following
|
||||
<https://tools.ietf.org/html/rfc7540#section-8>`_. Everything
|
||||
described in that section is not validated however. We briefly
|
||||
describe what the library does in this area. In the following
|
||||
description, without loss of generality we omit CONTINUATION frame
|
||||
since they must follow HEADERS frame and are processed atomically. In
|
||||
other words, they are just one big HEADERS frame. To disable these
|
||||
validations, use `nghttp2_option_set_no_http_messaging()`.
|
||||
validations, use `nghttp2_option_set_no_http_messaging()`. Please
|
||||
note that disabling this feature does not change the fundamental
|
||||
client and server model of HTTP. That is, even if the validation is
|
||||
disabled, only client can send requests.
|
||||
|
||||
For HTTP request, including those carried by PUSH_PROMISE, HTTP
|
||||
message starts with one HEADERS frame containing request headers. It
|
||||
@@ -149,13 +152,11 @@ header fields must not appear: "Connection", "Keep-Alive",
|
||||
Each header field name and value must obey the field-name and
|
||||
field-value production rules described in `RFC 7230, section
|
||||
3.2. <https://tools.ietf.org/html/rfc7230#section-3.2>`_.
|
||||
Additionally, all field name must be lower cased. While the pseudo
|
||||
header fields must satisfy these rules, we just ignore illegal regular
|
||||
headers (this means that these header fields are not passed to
|
||||
application callback). This is because these illegal header fields
|
||||
are floating around in existing internet and resetting stream just
|
||||
because of this may break many web sites. This is especially true if
|
||||
we forward to or translate from HTTP/1 traffic.
|
||||
Additionally, all field name must be lower cased. The invalid header
|
||||
fields are treated as stream error, and that stream is reset. If
|
||||
application wants to treat these headers in their own way, use
|
||||
`nghttp2_on_invalid_header_callback
|
||||
<https://nghttp2.org/documentation/types.html#c.nghttp2_on_invalid_header_callback>`_.
|
||||
|
||||
For "http" or "https" URIs, ":path" pseudo header fields must start
|
||||
with "/". The only exception is OPTIONS request, in that case, "*" is
|
||||
@@ -173,10 +174,64 @@ parsed as 64 bit signed integer. The sum of data length in the
|
||||
following DATA frames must match with the number in "Content-Length"
|
||||
header field if it is present (this does not include padding bytes).
|
||||
|
||||
RFC 7230 says that server must not send "Content-Length" in any
|
||||
response with 1xx, and 204 status code. It also says that
|
||||
"Content-Length" is not allowed in any response with 200 status code
|
||||
to a CONNECT request. nghttp2 enforces them as well.
|
||||
|
||||
Any deviation results in stream error of type PROTOCOL_ERROR. If
|
||||
error is found in PUSH_PROMISE frame, stream error is raised against
|
||||
promised stream.
|
||||
|
||||
The order of transmission of the HTTP/2 frames
|
||||
----------------------------------------------
|
||||
|
||||
This section describes the internals of libnghttp2 about the
|
||||
scheduling of transmission of HTTP/2 frames. This is pretty much
|
||||
internal stuff, so the details could change in the future versions of
|
||||
the library.
|
||||
|
||||
libnghttp2 categorizes HTTP/2 frames into 4 categories: urgent,
|
||||
regular, syn_stream, and data in the order of higher priority.
|
||||
|
||||
The urgent category includes PING and SETTINGS. They are sent with
|
||||
highest priority. The order inside the category is FIFO.
|
||||
|
||||
The regular category includes frames other than PING, SETTINGS, DATA,
|
||||
and HEADERS which does not create stream (which counts toward
|
||||
concurrent stream limit). The order inside the category is FIFO.
|
||||
|
||||
The syn_stream category includes HEADERS frame which creates stream,
|
||||
that counts toward the concurrent stream limit.
|
||||
|
||||
The data category includes DATA frame, and the scheduling among DATA
|
||||
frames are determined by HTTP/2 dependency tree.
|
||||
|
||||
If the application wants to send frames in the specific order, and the
|
||||
default transmission order does not fit, it has to schedule frames by
|
||||
itself using the callbacks (e.g.,
|
||||
:type:`nghttp2_on_frame_send_callback`).
|
||||
|
||||
RST_STREAM has special side effect when it is submitted by
|
||||
`nghttp2_submit_rst_stream()`. It cancels all pending HEADERS and
|
||||
DATA frames whose stream ID matches the one in the RST_STREAM frame.
|
||||
This may cause unexpected behaviour for the application in some cases.
|
||||
For example, suppose that application wants to send RST_STREAM after
|
||||
sending response HEADERS and DATA. Because of the reason we mentioned
|
||||
above, the following code does not work:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
nghttp2_submit_response(...)
|
||||
nghttp2_submit_rst_stream(...)
|
||||
|
||||
RST_STREAM cancels HEADERS (and DATA), and just RST_STREAM is sent.
|
||||
The correct way is use :type:`nghttp2_on_frame_send_callback`, and
|
||||
after HEADERS and DATA frames are sent, issue
|
||||
`nghttp2_submit_rst_stream()`. FYI,
|
||||
:type:`nghttp2_on_frame_not_send_callback` tells you why frames are
|
||||
not sent.
|
||||
|
||||
Implement user defined HTTP/2 non-critical extensions
|
||||
-----------------------------------------------------
|
||||
|
||||
@@ -194,7 +249,7 @@ set to :type:`nghttp2_session_callbacks` using
|
||||
`nghttp2_session_callbacks_set_pack_extension_callback()`.
|
||||
|
||||
For example, we will illustrate how to send `ALTSVC
|
||||
<https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-14>`_ frame.
|
||||
<https://tools.ietf.org/html/rfc7838>`_ frame.
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Building Android binary
|
||||
=======================
|
||||
|
||||
In this article, we briefly describe how to build Android binary using
|
||||
`Android NDK <http://developer.android.com/tools/sdk/ndk/index.html>`_
|
||||
`Android NDK <https://developer.android.com/ndk/index.html>`_
|
||||
cross-compiler on Debian Linux.
|
||||
|
||||
The easiest way to build android binary is use Dockerfile.android.
|
||||
@@ -22,24 +22,22 @@ unpacked:
|
||||
.. code-block:: text
|
||||
|
||||
$ build/tools/make_standalone_toolchain.py \
|
||||
--arch arm --api 16 --stl gnustl
|
||||
--arch arm --api 16 --stl gnustl \
|
||||
--install-dir $ANDROID_HOME/toolchain
|
||||
|
||||
The API level (``--api``) is not important here because we don't use
|
||||
Android specific C/C++ API.
|
||||
|
||||
The dependent libraries, such as OpenSSL and libev should be built
|
||||
with the toolchain and installed under ``$ANDROID_HOME/usr/local``.
|
||||
We recommend to build these libraries as static library to make the
|
||||
deployment easier. libxml2 support is currently disabled.
|
||||
The dependent libraries, such as OpenSSL, libev, and c-ares should be
|
||||
built with the toolchain and installed under
|
||||
``$ANDROID_HOME/usr/local``. We recommend to build these libraries as
|
||||
static library to make the deployment easier. libxml2 support is
|
||||
currently disabled.
|
||||
|
||||
Although zlib comes with Android NDK, it seems not to be a part of
|
||||
public API, so we have to built it for our own. That also provides us
|
||||
proper .pc file as a bonus.
|
||||
|
||||
If SPDY support is required for nghttpx and h2load, build and install
|
||||
spdylay as well.
|
||||
|
||||
Before running ``android-config`` and ``android-make``,
|
||||
``ANDROID_HOME`` environment variable must be set to point to the
|
||||
correct path. Also add ``$ANDROID_HOME/toolchain/bin`` to ``PATH``:
|
||||
@@ -96,6 +94,26 @@ patch, to configure libev, use the following script:
|
||||
|
||||
And run ``make install`` to build and install.
|
||||
|
||||
To configure c-ares, use the following script:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
#!/bin/sh -e
|
||||
|
||||
if [ -z "$ANDROID_HOME" ]; then
|
||||
echo 'No $ANDROID_HOME specified.'
|
||||
exit 1
|
||||
fi
|
||||
PREFIX=$ANDROID_HOME/usr/local
|
||||
TOOLCHAIN=$ANDROID_HOME/toolchain
|
||||
PATH=$TOOLCHAIN/bin:$PATH
|
||||
|
||||
./configure \
|
||||
--host=arm-linux-androideabi \
|
||||
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
|
||||
--prefix=$PREFIX \
|
||||
--disable-shared
|
||||
|
||||
To configure zlib, use the following script:
|
||||
|
||||
.. code-block:: sh
|
||||
@@ -125,34 +143,6 @@ To configure zlib, use the following script:
|
||||
|
||||
And run ``make install`` to build and install.
|
||||
|
||||
To configure spdylay, use the following script:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
#!/bin/sh -e
|
||||
|
||||
if [ -z "$ANDROID_HOME" ]; then
|
||||
echo 'No $ANDROID_HOME specified.'
|
||||
exit 1
|
||||
fi
|
||||
PREFIX=$ANDROID_HOME/usr/local
|
||||
TOOLCHAIN=$ANDROID_HOME/toolchain
|
||||
PATH=$TOOLCHAIN/bin:$PATH
|
||||
|
||||
./configure \
|
||||
--disable-shared \
|
||||
--host=arm-linux-androideabi \
|
||||
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
|
||||
--prefix=$PREFIX \
|
||||
--without-libxml2 \
|
||||
--disable-src \
|
||||
--disable-examples \
|
||||
CPPFLAGS="-I$PREFIX/include" \
|
||||
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
||||
LDFLAGS="-L$PREFIX/lib"
|
||||
|
||||
And run ``make install`` to build and install.
|
||||
|
||||
After prerequisite libraries are prepared, run ``android-config`` and
|
||||
then ``android-make`` to compile nghttp2 source files.
|
||||
|
||||
|
||||
@@ -26,17 +26,16 @@ Coding style
|
||||
We use clang-format to format source code consistently. The
|
||||
clang-format configuration file .clang-format is located at the root
|
||||
directory. Since clang-format produces slightly different results
|
||||
between versions, we currently use clang-format which comes with
|
||||
clang-3.6.
|
||||
between versions, we currently use clang-format-8.
|
||||
|
||||
To detect any violation to the coding style, we recommend to setup git
|
||||
pre-commit hook to check coding style of the changes you introduced.
|
||||
The pre-commit file is located at the root directory. Copy it under
|
||||
.git/hooks and make sure that it is executable. The pre-commit script
|
||||
uses clang-format-diff.py to detect any style errors. If it is not in
|
||||
your PATH or it exists under different name (e.g.,
|
||||
clang-format-diff-3.6 in debian), either add it to PATH variable or
|
||||
add git option ``clangformatdiff.binary`` to point to the script.
|
||||
your PATH or it exists under different name (e.g., clang-format-diff-8
|
||||
in debian), either add it to PATH variable or add git option
|
||||
``clangformatdiff.binary`` to point to the script.
|
||||
|
||||
For emacs users, integrating clang-format to emacs is very easy.
|
||||
clang-format.el should come with clang distribution. If it is not
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
h2load - HTTP/2 benchmarking tool - HOW-TO
|
||||
==========================================
|
||||
|
||||
:doc:`h2load.1` is benchmarking tool for HTTP/2 and HTTP/1.1. If
|
||||
built with spdylay (http://tatsuhiro-t.github.io/spdylay/) library, it
|
||||
also supports SPDY protocol. It supports SSL/TLS and clear text for
|
||||
all supported protocols.
|
||||
:doc:`h2load.1` is benchmarking tool for HTTP/2 and HTTP/1.1. It
|
||||
supports SSL/TLS and clear text for all supported protocols.
|
||||
|
||||
Compiling from source
|
||||
---------------------
|
||||
|
||||
h2load is compiled alongside nghttp2 and requires that the
|
||||
``--enable-apps`` flag is passed to ``./configure`` and `required
|
||||
``--enable-app`` flag is passed to ``./configure`` and `required
|
||||
dependencies <https://github.com/nghttp2/nghttp2#requirements>`_ are
|
||||
available during compilation. For details on compiling, see `nghttp2:
|
||||
Building from Git
|
||||
@@ -64,23 +62,40 @@ The benchmarking result looks like this:
|
||||
See the h2load manual page :ref:`h2load-1-output` section for the
|
||||
explanation of the above numbers.
|
||||
|
||||
Timing-based load-testing
|
||||
-------------------------
|
||||
|
||||
As of v1.26.0, h2load supports timing-based load-testing. This method
|
||||
performs load-testing in terms of a given duration instead of a
|
||||
pre-defined number of requests. The new option :option:`--duration`
|
||||
specifies how long the load-testing takes. For example,
|
||||
``--duration=10`` makes h2load perform load-testing against a server
|
||||
for 10 seconds. You can also specify a “warming-up” period with
|
||||
:option:`--warm-up-time`. If :option:`--duration` is used,
|
||||
:option:`-n` option is ignored.
|
||||
|
||||
The following command performs load-testing for 10 seconds after 5
|
||||
seconds warming up period:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ h2load -c100 -m100 --duration=10 --warm-up-time=5 https://localhost
|
||||
|
||||
Flow Control
|
||||
------------
|
||||
|
||||
HTTP/2 and SPDY/3 or later employ flow control and it may affect
|
||||
benchmarking results. By default, h2load uses large enough flow
|
||||
control window, which effectively disables flow control. To adjust
|
||||
receiver flow control window size, there are following options:
|
||||
HTTP/2 has flow control and it may affect benchmarking results. By
|
||||
default, h2load uses large enough flow control window, which
|
||||
effectively disables flow control. To adjust receiver flow control
|
||||
window size, there are following options:
|
||||
|
||||
:option:`-w`
|
||||
Sets the stream level initial window size to
|
||||
(2**<N>)-1. For SPDY, 2**<N> is used instead.
|
||||
(2**<N>)-1.
|
||||
|
||||
:option:`-W`
|
||||
Sets the connection level initial window size to
|
||||
(2**<N>)-1. For SPDY, if <N> is strictly less
|
||||
than 16, this option is ignored. Otherwise
|
||||
2**<N> is used for SPDY.
|
||||
(2**<N>)-1.
|
||||
|
||||
Multi-Threading
|
||||
---------------
|
||||
|
||||
@@ -290,7 +290,7 @@ Normally, client does not stop even after all requests are done unless
|
||||
connection is lost. To stop client, call
|
||||
``nghttp2::asio_http2::server::session::shutdown()``.
|
||||
|
||||
Recieve server push and enable SSL/TLS
|
||||
Receive server push and enable SSL/TLS
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
@@ -4,10 +4,10 @@ nghttpx - HTTP/2 proxy - HOW-TO
|
||||
===============================
|
||||
|
||||
:doc:`nghttpx.1` is a proxy translating protocols between HTTP/2 and
|
||||
other protocols (e.g., HTTP/1, SPDY). It operates in several modes
|
||||
and each mode may require additional programs to work with. This
|
||||
article describes each operation mode and explains the intended
|
||||
use-cases. It also covers some useful options later.
|
||||
other protocols (e.g., HTTP/1). It operates in several modes and each
|
||||
mode may require additional programs to work with. This article
|
||||
describes each operation mode and explains the intended use-cases. It
|
||||
also covers some useful options later.
|
||||
|
||||
Default mode
|
||||
------------
|
||||
@@ -15,9 +15,7 @@ Default mode
|
||||
If nghttpx is invoked without :option:`--http2-proxy`, it operates in
|
||||
default mode. In this mode, it works as reverse proxy (gateway) for
|
||||
both HTTP/2 and HTTP/1 clients to backend servers. This is also known
|
||||
as "HTTP/2 router". If nghttpx is linked with spdylay library and
|
||||
frontend connection is SSL/TLS, the frontend also supports SPDY
|
||||
protocol.
|
||||
as "HTTP/2 router".
|
||||
|
||||
By default, frontend connection is encrypted using SSL/TLS. So
|
||||
server's private key and certificate must be supplied to the command
|
||||
@@ -25,11 +23,10 @@ line (or through configuration file). In this case, the frontend
|
||||
protocol selection will be done via ALPN or NPN.
|
||||
|
||||
To turn off encryption on frontend connection, use ``no-tls`` keyword
|
||||
in :option:`--frontend` option. In this case, SPDY protocol is not
|
||||
available even if spdylay library is liked to nghttpx. HTTP/2 and
|
||||
HTTP/1 are available on the frontend, and an HTTP/1 connection can be
|
||||
upgraded to HTTP/2 using HTTP Upgrade. Starting HTTP/2 connection by
|
||||
sending HTTP/2 connection preface is also supported.
|
||||
in :option:`--frontend` option. HTTP/2 and HTTP/1 are available on
|
||||
the frontend, and an HTTP/1 connection can be upgraded to HTTP/2 using
|
||||
HTTP Upgrade. Starting HTTP/2 connection by sending HTTP/2 connection
|
||||
preface is also supported.
|
||||
|
||||
nghttpx can listen on multiple frontend addresses. This is achieved
|
||||
by using multiple :option:`--frontend` options. For each frontend
|
||||
@@ -45,17 +42,17 @@ that default backend protocol is HTTP/1.1. To use HTTP/2 in backend,
|
||||
you have to specify ``h2`` in ``proto`` keyword in :option:`--backend`
|
||||
explicitly.
|
||||
|
||||
The backend is supposed to be Web server. For example, to make
|
||||
The backend is supposed to be a Web server. For example, to make
|
||||
nghttpx listen to encrypted HTTP/2 requests at port 8443, and a
|
||||
backend Web server is configured to listen to HTTP request at port
|
||||
8080 in the same host, run nghttpx command-line like this:
|
||||
backend Web server is configured to listen to HTTP requests at port
|
||||
8080 on the same host, run nghttpx command-line like this:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ nghttpx -f0.0.0.0,8443 -b127.0.0.1,8080 /path/to/server.key /path/to/server.crt
|
||||
|
||||
Then HTTP/2 enabled client can access to the nghttpx in HTTP/2. For
|
||||
example, you can send GET request to the server using nghttp:
|
||||
Then an HTTP/2 enabled client can access the nghttpx server using HTTP/2. For
|
||||
example, you can send a GET request using nghttp:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
@@ -66,19 +63,18 @@ HTTP/2 proxy mode
|
||||
|
||||
If nghttpx is invoked with :option:`--http2-proxy` (or its shorthand
|
||||
:option:`-s`) option, it operates in HTTP/2 proxy mode. The supported
|
||||
protocols in frontend and backend connections are the same in `default
|
||||
mode`_. The difference is that this mode acts like forward proxy and
|
||||
assumes the backend is HTTP proxy server (e.g., Squid, Apache Traffic
|
||||
Server). HTTP/1 request must include absolute URI in request line.
|
||||
protocols in frontend and backend connections are the same as in `default
|
||||
mode`_. The difference is that this mode acts like a forward proxy and
|
||||
assumes the backend is an HTTP proxy server (e.g., Squid, Apache Traffic
|
||||
Server). HTTP/1 requests must include an absolute URI in request line.
|
||||
|
||||
By default, frontend connection is encrypted. So this mode is also
|
||||
called secure proxy. If nghttpx is linked with spdylay, it supports
|
||||
SPDY protocols and it works as so called SPDY proxy.
|
||||
By default, the frontend connection is encrypted. So this mode is
|
||||
also called secure proxy.
|
||||
|
||||
To turn off encryption on frontend connection, use ``no-tls`` keyword
|
||||
To turn off encryption on the frontend connection, use ``no-tls`` keyword
|
||||
in :option:`--frontend` option.
|
||||
|
||||
The backend must be HTTP proxy server. nghttpx supports multiple
|
||||
The backend must be an HTTP proxy server. nghttpx supports multiple
|
||||
backend server addresses. It translates incoming requests to HTTP
|
||||
request to backend server. The backend server performs real proxy
|
||||
work for each request, for example, dispatching requests to the origin
|
||||
@@ -92,7 +88,7 @@ connection, use :option:`--backend` option, and specify ``h2`` in
|
||||
|
||||
For example, to make nghttpx listen to encrypted HTTP/2 requests at
|
||||
port 8443, and a backend HTTP proxy server is configured to listen to
|
||||
HTTP/1 request at port 8080 in the same host, run nghttpx command-line
|
||||
HTTP/1 requests at port 8080 on the same host, run nghttpx command-line
|
||||
like this:
|
||||
|
||||
.. code-block:: text
|
||||
@@ -102,8 +98,8 @@ like this:
|
||||
At the time of this writing, Firefox 41 and Chromium v46 can use
|
||||
nghttpx as HTTP/2 proxy.
|
||||
|
||||
To make Firefox or Chromium use nghttpx as HTTP/2 or SPDY proxy, user
|
||||
has to create proxy.pac script file like this:
|
||||
To make Firefox or Chromium use nghttpx as HTTP/2 proxy, user has to
|
||||
create proxy.pac script file like this:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
@@ -211,17 +207,17 @@ Rewriting location header field
|
||||
nghttpx automatically rewrites location response header field if the
|
||||
following all conditions satisfy:
|
||||
|
||||
* URI in location header field is not absolute URI or is not https URI.
|
||||
* In the default mode (:option:`--http2-proxy` is not used)
|
||||
* :option:`--no-location-rewrite` is not used
|
||||
* URI in location header field is an absolute URI
|
||||
* URI in location header field includes non empty host component.
|
||||
* host (without port) in URI in location header field must match the
|
||||
host appearing in :authority or host header field.
|
||||
host appearing in ``:authority`` or ``host`` header field.
|
||||
|
||||
When rewrite happens, URI scheme and port are replaced with the ones
|
||||
used in frontend, and host is replaced with which appears in
|
||||
:authority or host request header field. :authority header field has
|
||||
precedence. If the above conditions are not met with the host value
|
||||
in :authority header field, rewrite is retried with the value in host
|
||||
header field.
|
||||
When rewrite happens, URI scheme is replaced with the ones used in
|
||||
frontend, and authority is replaced with which appears in
|
||||
``:authority``, or ``host`` request header field. ``:authority``
|
||||
header field has precedence over ``host``.
|
||||
|
||||
Hot swapping
|
||||
------------
|
||||
@@ -229,12 +225,18 @@ Hot swapping
|
||||
nghttpx supports hot swapping using signals. The hot swapping in
|
||||
nghttpx is multi step process. First send USR2 signal to nghttpx
|
||||
process. It will do fork and execute new executable, using same
|
||||
command-line arguments and environment variables. At this point, both
|
||||
current and new processes can accept requests. To gracefully shutdown
|
||||
current process, send QUIT signal to current nghttpx process. When
|
||||
all existing frontend connections are done, the current process will
|
||||
exit. At this point, only new nghttpx process exists and serves
|
||||
incoming requests.
|
||||
command-line arguments and environment variables.
|
||||
|
||||
As of nghttpx version 1.20.0, that is all you have to do. The new
|
||||
master process sends QUIT signal to the original process, when it is
|
||||
ready to serve requests, to shut it down gracefully.
|
||||
|
||||
For earlier versions of nghttpx, you have to do one more thing. At
|
||||
this point, both current and new processes can accept requests. To
|
||||
gracefully shutdown current process, send QUIT signal to current
|
||||
nghttpx process. When all existing frontend connections are done, the
|
||||
current process will exit. At this point, only new nghttpx process
|
||||
exists and serves incoming requests.
|
||||
|
||||
If you want to just reload configuration file without executing new
|
||||
binary, send SIGHUP to nghttpx master process.
|
||||
@@ -291,13 +293,31 @@ When you write this option in command-line, you should enclose
|
||||
argument with single or double quotes, since the character ``;`` has a
|
||||
special meaning in shell.
|
||||
|
||||
To route, request to request path whose prefix is ``/foo`` to backend
|
||||
server ``[::1]:8080``, you can write like so:
|
||||
To route, request to request path ``/foo`` to backend server
|
||||
``[::1]:8080``, you can write like so:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
backend=::1,8080;/foo
|
||||
|
||||
If the last character of path pattern is ``/``, all request paths
|
||||
which start with that pattern match:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
backend=::1,8080;/bar/
|
||||
|
||||
The request path ``/bar/buzz`` matches the ``/bar/``.
|
||||
|
||||
You can use ``*`` at the end of the path pattern to make it wildcard
|
||||
pattern. ``*`` must match at least one character:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
backend=::1,8080;/sample*
|
||||
|
||||
The request path ``/sample1/foo`` matches the ``/sample*`` pattern.
|
||||
|
||||
Of course, you can specify both host and request path at the same
|
||||
time:
|
||||
|
||||
@@ -343,10 +363,9 @@ requests, do this:
|
||||
backend=serv1,3000;/;proto=h2
|
||||
backend=serv1,3000;/ws/;proto=http/1.1
|
||||
|
||||
Note that the backends share the same pattern must have the same
|
||||
backend protocol. The default backend protocol is HTTP/1.1.
|
||||
The default backend protocol is HTTP/1.1.
|
||||
|
||||
TLS can be enabed per pattern basis:
|
||||
TLS can be enabled per pattern basis:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
@@ -356,6 +375,153 @@ TLS can be enabed per pattern basis:
|
||||
In the above case, connection to serv1 will be encrypted by TLS. On
|
||||
the other hand, connection to serv2 will not be encrypted by TLS.
|
||||
|
||||
Dynamic hostname lookup
|
||||
-----------------------
|
||||
|
||||
By default, nghttpx performs backend hostname lookup at start up, or
|
||||
configuration reload, and keeps using them in its entire session. To
|
||||
make nghttpx perform hostname lookup dynamically, use ``dns``
|
||||
parameter in :option:`--backend` option, like so:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
backend=foo.example.com,80;;dns
|
||||
|
||||
nghttpx will cache resolved addresses for certain period of time. To
|
||||
change this cache period, use :option:`--dns-cache-timeout`.
|
||||
|
||||
Enable PROXY protocol
|
||||
---------------------
|
||||
|
||||
PROXY protocol can be enabled per frontend. In order to enable PROXY
|
||||
protocol, use ``proxyproto`` parameter in :option:`--frontend` option,
|
||||
like so:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
frontend=*,443;proxyproto
|
||||
|
||||
Session affinity
|
||||
----------------
|
||||
|
||||
Two kinds of session affinity are available: client IP, and HTTP
|
||||
Cookie.
|
||||
|
||||
To enable client IP based affinity, specify ``affinity=ip`` parameter
|
||||
in :option:`--backend` option. If PROXY protocol is enabled, then an
|
||||
address obtained from PROXY protocol is taken into consideration.
|
||||
|
||||
To enable HTTP Cookie based affinity, specify ``affinity=cookie``
|
||||
parameter, and specify a name of cookie in ``affinity-cookie-name``
|
||||
parameter. Optionally, a Path attribute can be specified in
|
||||
``affinity-cookie-path`` parameter:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
backend=127.0.0.1,3000;;affinity=cookie;affinity-cookie-name=nghttpxlb;affinity-cookie-path=/
|
||||
|
||||
Secure attribute of cookie is set if client connection is protected by
|
||||
TLS.
|
||||
|
||||
PSK cipher suites
|
||||
-----------------
|
||||
|
||||
nghttpx supports pre-shared key (PSK) cipher suites for both frontend
|
||||
and backend TLS connections. For frontend connection, use
|
||||
:option:`--psk-secrets` option to specify a file which contains PSK
|
||||
identity and secrets. The format of the file is
|
||||
``<identity>:<hex-secret>``, where ``<identity>`` is PSK identity, and
|
||||
``<hex-secret>`` is PSK secret in hex, like so:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
client1:9567800e065e078085c241d54a01c6c3f24b3bab71a606600f4c6ad2c134f3b9
|
||||
client2:b1376c3f8f6dcf7c886c5bdcceecd1e6f1d708622b6ddd21bda26ebd0c0bca99
|
||||
|
||||
nghttpx server accepts any of the identity and secret pairs in the
|
||||
file. The default cipher suite list does not contain PSK cipher
|
||||
suites. In order to use PSK, PSK cipher suite must be enabled by
|
||||
using :option:`--ciphers` option. The desired PSK cipher suite may be
|
||||
listed in `HTTP/2 cipher black list
|
||||
<https://tools.ietf.org/html/rfc7540#appendix-A>`_. In order to use
|
||||
such PSK cipher suite with HTTP/2, disable HTTP/2 cipher black list by
|
||||
using :option:`--no-http2-cipher-black-list` option. But you should
|
||||
understand its implications.
|
||||
|
||||
At the time of writing, even if only PSK cipher suites are specified
|
||||
in :option:`--ciphers` option, certificate and private key are still
|
||||
required.
|
||||
|
||||
For backend connection, use :option:`--client-psk-secrets` option to
|
||||
specify a file which contains single PSK identity and secret. The
|
||||
format is the same as the file used by :option:`--psk-secrets`
|
||||
described above, but only first identity and secret pair is solely
|
||||
used, like so:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
client2:b1376c3f8f6dcf7c886c5bdcceecd1e6f1d708622b6ddd21bda26ebd0c0bca99
|
||||
|
||||
The default cipher suite list does not contain PSK cipher suites. In
|
||||
order to use PSK, PSK cipher suite must be enabled by using
|
||||
:option:`--client-ciphers` option. The desired PSK cipher suite may
|
||||
be listed in `HTTP/2 cipher black list
|
||||
<https://tools.ietf.org/html/rfc7540#appendix-A>`_. In order to use
|
||||
such PSK cipher suite with HTTP/2, disable HTTP/2 cipher black list by
|
||||
using :option:`--client-no-http2-cipher-black-list` option. But you
|
||||
should understand its implications.
|
||||
|
||||
TLSv1.3
|
||||
-------
|
||||
|
||||
As of nghttpx v1.34.0, if it is built with OpenSSL 1.1.1 or later, it
|
||||
supports TLSv1.3. 0-RTT data is supported, but by default its
|
||||
processing is postponed until TLS handshake completes to mitigate
|
||||
replay attack. This costs extra round trip and reduces effectiveness
|
||||
of 0-RTT data. :option:`--tls-no-postpone-early-data` makes nghttpx
|
||||
not wait for handshake to complete before forwarding request included
|
||||
in 0-RTT to get full potential of 0-RTT data. In this case, nghttpx
|
||||
adds ``Early-Data: 1`` header field when forwarding a request to a
|
||||
backend server. All backend servers should recognize this header
|
||||
field and understand that there is a risk for replay attack. See `RFC
|
||||
8470 <https://tools.ietf.org/html/rfc8470>`_ for ``Early-Data`` header
|
||||
field.
|
||||
|
||||
nghttpx disables anti replay protection provided by OpenSSL. The anti
|
||||
replay protection of OpenSSL requires that a resumed request must hit
|
||||
the same server which generates the session ticket. Therefore it
|
||||
might not work nicely in a deployment where there are multiple nghttpx
|
||||
instances sharing ticket encryption keys via memcached.
|
||||
|
||||
Because TLSv1.3 completely changes the semantics of cipher suite
|
||||
naming scheme and structure, nghttpx provides the new option
|
||||
:option:`--tls13-ciphers` and :option:`--tls13-client-ciphers` to
|
||||
change preferred cipher list for TLSv1.3.
|
||||
|
||||
WebSockets over HTTP/2
|
||||
----------------------
|
||||
|
||||
nghttpx supports `RFC 8441 <https://tools.ietf.org/html/rfc8441>`_
|
||||
Bootstrapping WebSockets with HTTP/2 for both frontend and backend
|
||||
connections. This feature is enabled by default and no configuration
|
||||
is required.
|
||||
|
||||
Migration from nghttpx v1.18.x or earlier
|
||||
-----------------------------------------
|
||||
|
||||
As of nghttpx v1.19.0, :option:`--ciphers` option only changes cipher
|
||||
list for frontend TLS connection. In order to change cipher list for
|
||||
backend connection, use :option:`--client-ciphers` option.
|
||||
|
||||
Similarly, :option:`--no-http2-cipher-black-list` option only disables
|
||||
HTTP/2 cipher black list for frontend connection. In order to disable
|
||||
HTTP/2 cipher black list for backend connection, use
|
||||
:option:`--client-no-http2-cipher-black-list` option.
|
||||
|
||||
``--accept-proxy-protocol`` option was deprecated. Instead, use
|
||||
``proxyproto`` parameter in :option:`--frontend` option to enable
|
||||
PROXY protocol support per frontend.
|
||||
|
||||
Migration from nghttpx v1.8.0 or earlier
|
||||
----------------------------------------
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ The extension module is called ``nghttp2``.
|
||||
determined by configure script. If the detected Python version is not
|
||||
what you expect, specify a path to Python executable in ``PYTHON``
|
||||
variable as an argument to configure script (e.g., ``./configure
|
||||
PYTHON=/usr/bin/python3.4``).
|
||||
PYTHON=/usr/bin/python3.5``).
|
||||
|
||||
HPACK API
|
||||
---------
|
||||
@@ -136,15 +136,15 @@ HTTP/2 servers
|
||||
|
||||
.. note::
|
||||
|
||||
We use :py:mod:`asyncio` for HTTP/2 server classes. Therefore,
|
||||
Python 3.4 or later is required to use these objects. To
|
||||
explicitly configure nghttp2 build to use Python 3.4, specify the
|
||||
``PYTHON`` variable to the path to Python 3.4 executable when
|
||||
We use :py:mod:`asyncio` for HTTP/2 server classes, and ALPN.
|
||||
Therefore, Python 3.5 or later is required to use these objects.
|
||||
To explicitly configure nghttp2 build to use Python 3.5, specify
|
||||
the ``PYTHON`` variable to the path to Python 3.5 executable when
|
||||
invoking configure script like this:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ ./configure PYTHON=/usr/bin/python3.4
|
||||
$ ./configure PYTHON=/usr/bin/python3.5
|
||||
|
||||
.. py:class:: HTTP2Server(address, RequestHandlerClass, ssl=None)
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ remote server. It's defined as::
|
||||
bev = bufferevent_openssl_socket_new(
|
||||
evbase, -1, ssl, BUFFEREVENT_SSL_CONNECTING,
|
||||
BEV_OPT_DEFER_CALLBACKS | BEV_OPT_CLOSE_ON_FREE);
|
||||
bufferevent_enable(bev, EV_READ | EV_WRITE);
|
||||
bufferevent_setcb(bev, readcb, writecb, eventcb, session_data);
|
||||
rv = bufferevent_socket_connect_hostname(bev, session_data->dnsbase,
|
||||
AF_UNSPEC, host, port);
|
||||
|
||||
@@ -7,11 +7,9 @@ if(ENABLE_EXAMPLES)
|
||||
COMPILE_FLAGS "${WARNCXXFLAGS} ${CXX1XCXXFLAGS}")
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/lib/includes
|
||||
${CMAKE_BINARY_DIR}/lib/includes
|
||||
${CMAKE_SOURCE_DIR}/src/includes
|
||||
${CMAKE_SOURCE_DIR}/third-party
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../third-party"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../third-party/llhttp/include"
|
||||
|
||||
${LIBEVENT_INCLUDE_DIRS}
|
||||
${OPENSSL_INCLUDE_DIRS}
|
||||
@@ -24,18 +22,24 @@ if(ENABLE_EXAMPLES)
|
||||
${APP_LIBRARIES}
|
||||
)
|
||||
|
||||
add_executable(client client.c $<TARGET_OBJECTS:http-parser>)
|
||||
add_executable(libevent-client libevent-client.c $<TARGET_OBJECTS:http-parser>)
|
||||
add_executable(libevent-server libevent-server.c $<TARGET_OBJECTS:http-parser>)
|
||||
add_executable(deflate deflate.c $<TARGET_OBJECTS:http-parser>)
|
||||
|
||||
if(ENABLE_TINY_NGHTTPD)
|
||||
add_executable(tiny-nghttpd tiny-nghttpd.c $<TARGET_OBJECTS:http-parser>)
|
||||
endif()
|
||||
add_executable(client client.c $<TARGET_OBJECTS:llhttp>
|
||||
$<TARGET_OBJECTS:url-parser>
|
||||
)
|
||||
add_executable(libevent-client libevent-client.c $<TARGET_OBJECTS:llhttp>
|
||||
$<TARGET_OBJECTS:url-parser>
|
||||
)
|
||||
add_executable(libevent-server libevent-server.c $<TARGET_OBJECTS:llhttp>
|
||||
$<TARGET_OBJECTS:url-parser>
|
||||
)
|
||||
add_executable(deflate deflate.c $<TARGET_OBJECTS:llhttp>
|
||||
$<TARGET_OBJECTS:url-parser>
|
||||
)
|
||||
|
||||
if(ENABLE_ASIO_LIB)
|
||||
foreach(name asio-sv asio-sv2 asio-cl asio-cl2)
|
||||
add_executable(${name} ${name}.cc $<TARGET_OBJECTS:http-parser>)
|
||||
add_executable(${name} ${name}.cc $<TARGET_OBJECTS:llhttp>
|
||||
$<TARGET_OBJECTS:url-parser>
|
||||
)
|
||||
target_include_directories(${name} PRIVATE
|
||||
${OPENSSL_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
|
||||
@@ -36,7 +36,7 @@ AM_CPPFLAGS = \
|
||||
@OPENSSL_CFLAGS@ \
|
||||
@DEFS@
|
||||
LDADD = $(top_builddir)/lib/libnghttp2.la \
|
||||
$(top_builddir)/third-party/libhttp-parser.la \
|
||||
$(top_builddir)/third-party/liburl-parser.la \
|
||||
@LIBEVENT_OPENSSL_LIBS@ \
|
||||
@OPENSSL_LIBS@ \
|
||||
@APPLDFLAGS@
|
||||
@@ -51,14 +51,6 @@ libevent_server_SOURCES = libevent-server.c
|
||||
|
||||
deflate_SOURCES = deflate.c
|
||||
|
||||
if ENABLE_TINY_NGHTTPD
|
||||
|
||||
noinst_PROGRAMS += tiny-nghttpd
|
||||
|
||||
tiny_nghttpd_SOURCES = tiny-nghttpd.c
|
||||
|
||||
endif # ENABLE_TINY_NGHTTPD
|
||||
|
||||
if ENABLE_ASIO_LIB
|
||||
|
||||
noinst_PROGRAMS += asio-sv asio-sv2 asio-cl asio-cl2
|
||||
@@ -69,12 +61,12 @@ noinst_PROGRAMS += asio-sv asio-sv2 asio-cl asio-cl2
|
||||
ASIOCPPFLAGS = ${AM_CPPFLAGS} ${BOOST_CPPFLAGS}
|
||||
ASIOLDADD = $(top_builddir)/lib/libnghttp2.la \
|
||||
$(top_builddir)/src/libnghttp2_asio.la @JEMALLOC_LIBS@ \
|
||||
$(top_builddir)/third-party/libhttp-parser.la \
|
||||
$(top_builddir)/third-party/liburl-parser.la \
|
||||
@OPENSSL_LIBS@ \
|
||||
${BOOST_LDFLAGS} \
|
||||
${BOOST_ASIO_LIB} \
|
||||
${BOOST_THREAD_LIB} \
|
||||
${BOOST_SYSTEM_LIB} \
|
||||
@OPENSSL_LIBS@ \
|
||||
@APPLDFLAGS@
|
||||
|
||||
asio_sv_SOURCES = asio-sv.cc
|
||||
|
||||
@@ -67,14 +67,14 @@ int main(int argc, char *argv[]) {
|
||||
return;
|
||||
}
|
||||
|
||||
req->on_response([&sess](const response &res) {
|
||||
req->on_response([](const response &res) {
|
||||
std::cerr << "HTTP/2 " << res.status_code() << std::endl;
|
||||
for (auto &kv : res.header()) {
|
||||
std::cerr << kv.first << ": " << kv.second.value << "\n";
|
||||
}
|
||||
std::cerr << std::endl;
|
||||
|
||||
res.on_data([&sess](const uint8_t *data, std::size_t len) {
|
||||
res.on_data([](const uint8_t *data, std::size_t len) {
|
||||
std::cerr.write(reinterpret_cast<const char *>(data), len);
|
||||
std::cerr << std::endl;
|
||||
});
|
||||
|
||||
@@ -91,17 +91,17 @@ int main(int argc, char *argv[]) {
|
||||
return;
|
||||
}
|
||||
|
||||
req->on_response([&sess, req](const response &res) {
|
||||
req->on_response([](const response &res) {
|
||||
std::cerr << "response header was received" << std::endl;
|
||||
print_header(res);
|
||||
|
||||
res.on_data([&sess](const uint8_t *data, std::size_t len) {
|
||||
res.on_data([](const uint8_t *data, std::size_t len) {
|
||||
std::cerr.write(reinterpret_cast<const char *>(data), len);
|
||||
std::cerr << std::endl;
|
||||
});
|
||||
});
|
||||
|
||||
req->on_close([&sess](uint32_t error_code) {
|
||||
req->on_close([](uint32_t error_code) {
|
||||
std::cerr << "request done with error_code=" << error_code << std::endl;
|
||||
});
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif // HAVE_UNISTD_H
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
# include <fcntl.h>
|
||||
#endif // HAVE_FCNTL_H
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
@@ -27,26 +27,26 @@
|
||||
* intentionally made simple.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
# include <fcntl.h>
|
||||
#endif /* HAVE_FCNTL_H */
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
# include <sys/socket.h>
|
||||
#endif /* HAVE_SYS_SOCKET_H */
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
# include <netdb.h>
|
||||
#endif /* HAVE_NETDB_H */
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
# include <netinet/in.h>
|
||||
#endif /* HAVE_NETINET_IN_H */
|
||||
#include <netinet/tcp.h>
|
||||
#include <poll.h>
|
||||
@@ -66,13 +66,13 @@ enum { IO_NONE, WANT_READ, WANT_WRITE };
|
||||
|
||||
#define MAKE_NV(NAME, VALUE) \
|
||||
{ \
|
||||
(uint8_t *) NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, sizeof(VALUE) - 1, \
|
||||
(uint8_t *)NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, sizeof(VALUE) - 1, \
|
||||
NGHTTP2_NV_FLAG_NONE \
|
||||
}
|
||||
|
||||
#define MAKE_NV_CS(NAME, VALUE) \
|
||||
{ \
|
||||
(uint8_t *) NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, strlen(VALUE), \
|
||||
(uint8_t *)NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, strlen(VALUE), \
|
||||
NGHTTP2_NV_FLAG_NONE \
|
||||
}
|
||||
|
||||
@@ -159,10 +159,13 @@ static void diec(const char *func, int error_code) {
|
||||
* bytes actually written. See the documentation of
|
||||
* nghttp2_send_callback for the details.
|
||||
*/
|
||||
static ssize_t send_callback(nghttp2_session *session _U_, const uint8_t *data,
|
||||
size_t length, int flags _U_, void *user_data) {
|
||||
static ssize_t send_callback(nghttp2_session *session, const uint8_t *data,
|
||||
size_t length, int flags, void *user_data) {
|
||||
struct Connection *connection;
|
||||
int rv;
|
||||
(void)session;
|
||||
(void)flags;
|
||||
|
||||
connection = (struct Connection *)user_data;
|
||||
connection->want_io = IO_NONE;
|
||||
ERR_clear_error();
|
||||
@@ -186,10 +189,13 @@ static ssize_t send_callback(nghttp2_session *session _U_, const uint8_t *data,
|
||||
* |length| bytes. Returns the number of bytes stored in |buf|. See
|
||||
* the documentation of nghttp2_recv_callback for the details.
|
||||
*/
|
||||
static ssize_t recv_callback(nghttp2_session *session _U_, uint8_t *buf,
|
||||
size_t length, int flags _U_, void *user_data) {
|
||||
static ssize_t recv_callback(nghttp2_session *session, uint8_t *buf,
|
||||
size_t length, int flags, void *user_data) {
|
||||
struct Connection *connection;
|
||||
int rv;
|
||||
(void)session;
|
||||
(void)flags;
|
||||
|
||||
connection = (struct Connection *)user_data;
|
||||
connection->want_io = IO_NONE;
|
||||
ERR_clear_error();
|
||||
@@ -210,9 +216,10 @@ static ssize_t recv_callback(nghttp2_session *session _U_, uint8_t *buf,
|
||||
}
|
||||
|
||||
static int on_frame_send_callback(nghttp2_session *session,
|
||||
const nghttp2_frame *frame,
|
||||
void *user_data _U_) {
|
||||
const nghttp2_frame *frame, void *user_data) {
|
||||
size_t i;
|
||||
(void)user_data;
|
||||
|
||||
switch (frame->hd.type) {
|
||||
case NGHTTP2_HEADERS:
|
||||
if (nghttp2_session_get_stream_user_data(session, frame->hd.stream_id)) {
|
||||
@@ -237,9 +244,10 @@ static int on_frame_send_callback(nghttp2_session *session,
|
||||
}
|
||||
|
||||
static int on_frame_recv_callback(nghttp2_session *session,
|
||||
const nghttp2_frame *frame,
|
||||
void *user_data _U_) {
|
||||
const nghttp2_frame *frame, void *user_data) {
|
||||
size_t i;
|
||||
(void)user_data;
|
||||
|
||||
switch (frame->hd.type) {
|
||||
case NGHTTP2_HEADERS:
|
||||
if (frame->headers.cat == NGHTTP2_HCAT_RESPONSE) {
|
||||
@@ -274,9 +282,11 @@ static int on_frame_recv_callback(nghttp2_session *session,
|
||||
* we submit GOAWAY and close the session.
|
||||
*/
|
||||
static int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
|
||||
uint32_t error_code _U_,
|
||||
void *user_data _U_) {
|
||||
uint32_t error_code, void *user_data) {
|
||||
struct Request *req;
|
||||
(void)error_code;
|
||||
(void)user_data;
|
||||
|
||||
req = nghttp2_session_get_stream_user_data(session, stream_id);
|
||||
if (req) {
|
||||
int rv;
|
||||
@@ -293,11 +303,13 @@ static int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
|
||||
* The implementation of nghttp2_on_data_chunk_recv_callback type. We
|
||||
* use this function to print the received response body.
|
||||
*/
|
||||
static int on_data_chunk_recv_callback(nghttp2_session *session,
|
||||
uint8_t flags _U_, int32_t stream_id,
|
||||
const uint8_t *data, size_t len,
|
||||
void *user_data _U_) {
|
||||
static int on_data_chunk_recv_callback(nghttp2_session *session, uint8_t flags,
|
||||
int32_t stream_id, const uint8_t *data,
|
||||
size_t len, void *user_data) {
|
||||
struct Request *req;
|
||||
(void)flags;
|
||||
(void)user_data;
|
||||
|
||||
req = nghttp2_session_get_stream_user_data(session, stream_id);
|
||||
if (req) {
|
||||
printf("[INFO] C <---------------------------- S (DATA chunk)\n"
|
||||
@@ -333,15 +345,19 @@ static void setup_nghttp2_callbacks(nghttp2_session_callbacks *callbacks) {
|
||||
callbacks, on_data_chunk_recv_callback);
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
/*
|
||||
* Callback function for TLS NPN. Since this program only supports
|
||||
* HTTP/2 protocol, if server does not offer HTTP/2 the nghttp2
|
||||
* library supports, we terminate program.
|
||||
*/
|
||||
static int select_next_proto_cb(SSL *ssl _U_, unsigned char **out,
|
||||
static int select_next_proto_cb(SSL *ssl, unsigned char **out,
|
||||
unsigned char *outlen, const unsigned char *in,
|
||||
unsigned int inlen, void *arg _U_) {
|
||||
unsigned int inlen, void *arg) {
|
||||
int rv;
|
||||
(void)ssl;
|
||||
(void)arg;
|
||||
|
||||
/* nghttp2_select_next_protocol() selects HTTP/2 protocol the
|
||||
nghttp2 library supports. */
|
||||
rv = nghttp2_select_next_protocol(out, outlen, in, inlen);
|
||||
@@ -350,6 +366,7 @@ static int select_next_proto_cb(SSL *ssl _U_, unsigned char **out,
|
||||
}
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
/*
|
||||
* Setup SSL/TLS context.
|
||||
@@ -360,7 +377,9 @@ static void init_ssl_ctx(SSL_CTX *ssl_ctx) {
|
||||
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_AUTO_RETRY);
|
||||
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
|
||||
/* Set NPN callback */
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb, NULL);
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
}
|
||||
|
||||
static void ssl_handshake(SSL *ssl, int fd) {
|
||||
@@ -457,11 +476,12 @@ static void ctl_poll(struct pollfd *pollfd, struct Connection *connection) {
|
||||
static void submit_request(struct Connection *connection, struct Request *req) {
|
||||
int32_t stream_id;
|
||||
/* Make sure that the last item is NULL */
|
||||
const nghttp2_nv nva[] = {
|
||||
MAKE_NV(":method", "GET"), MAKE_NV_CS(":path", req->path),
|
||||
MAKE_NV(":scheme", "https"), MAKE_NV_CS(":authority", req->hostport),
|
||||
MAKE_NV("accept", "*/*"),
|
||||
MAKE_NV("user-agent", "nghttp2/" NGHTTP2_VERSION)};
|
||||
const nghttp2_nv nva[] = {MAKE_NV(":method", "GET"),
|
||||
MAKE_NV_CS(":path", req->path),
|
||||
MAKE_NV(":scheme", "https"),
|
||||
MAKE_NV_CS(":authority", req->hostport),
|
||||
MAKE_NV("accept", "*/*"),
|
||||
MAKE_NV("user-agent", "nghttp2/" NGHTTP2_VERSION)};
|
||||
|
||||
stream_id = nghttp2_submit_request(connection->session, NULL, nva,
|
||||
sizeof(nva) / sizeof(nva[0]), NULL, req);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif /* !HAVE_CONFIG_H */
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#define MAKE_NV(K, V) \
|
||||
{ \
|
||||
(uint8_t *) K, (uint8_t *)V, sizeof(K) - 1, sizeof(V) - 1, \
|
||||
(uint8_t *)K, (uint8_t *)V, sizeof(K) - 1, sizeof(V) - 1, \
|
||||
NGHTTP2_NV_FLAG_NONE \
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ static void deflate(nghttp2_hd_deflater *deflater,
|
||||
static int inflate_header_block(nghttp2_hd_inflater *inflater, uint8_t *in,
|
||||
size_t inlen, int final);
|
||||
|
||||
int main(int argc _U_, char **argv _U_) {
|
||||
int main() {
|
||||
int rv;
|
||||
nghttp2_hd_deflater *deflater;
|
||||
nghttp2_hd_inflater *inflater;
|
||||
|
||||
@@ -23,33 +23,33 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifdef __sgi
|
||||
#include <string.h>
|
||||
#define errx(exitcode, format, args...) \
|
||||
{ \
|
||||
warnx(format, ##args); \
|
||||
exit(exitcode); \
|
||||
}
|
||||
#define warnx(format, args...) fprintf(stderr, format "\n", ##args)
|
||||
# include <string.h>
|
||||
# define errx(exitcode, format, args...) \
|
||||
{ \
|
||||
warnx(format, ##args); \
|
||||
exit(exitcode); \
|
||||
}
|
||||
# define warnx(format, args...) fprintf(stderr, format "\n", ##args)
|
||||
char *strndup(const char *s, size_t size);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
# include <sys/socket.h>
|
||||
#endif /* HAVE_SYS_SOCKET_H */
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
# include <netinet/in.h>
|
||||
#endif /* HAVE_NETINET_IN_H */
|
||||
#include <netinet/tcp.h>
|
||||
#ifndef __sgi
|
||||
#include <err.h>
|
||||
# include <err.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
@@ -65,7 +65,7 @@ char *strndup(const char *s, size_t size);
|
||||
|
||||
#include <nghttp2/nghttp2.h>
|
||||
|
||||
#include "http-parser/http_parser.h"
|
||||
#include "url-parser/url_parser.h"
|
||||
|
||||
#define ARRLEN(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
@@ -199,22 +199,27 @@ static void print_headers(FILE *f, nghttp2_nv *nva, size_t nvlen) {
|
||||
/* nghttp2_send_callback. Here we transmit the |data|, |length| bytes,
|
||||
to the network. Because we are using libevent bufferevent, we just
|
||||
write those bytes into bufferevent buffer. */
|
||||
static ssize_t send_callback(nghttp2_session *session _U_, const uint8_t *data,
|
||||
size_t length, int flags _U_, void *user_data) {
|
||||
static ssize_t send_callback(nghttp2_session *session, const uint8_t *data,
|
||||
size_t length, int flags, void *user_data) {
|
||||
http2_session_data *session_data = (http2_session_data *)user_data;
|
||||
struct bufferevent *bev = session_data->bev;
|
||||
(void)session;
|
||||
(void)flags;
|
||||
|
||||
bufferevent_write(bev, data, length);
|
||||
return (ssize_t)length;
|
||||
}
|
||||
|
||||
/* nghttp2_on_header_callback: Called when nghttp2 library emits
|
||||
single header name/value pair. */
|
||||
static int on_header_callback(nghttp2_session *session _U_,
|
||||
static int on_header_callback(nghttp2_session *session,
|
||||
const nghttp2_frame *frame, const uint8_t *name,
|
||||
size_t namelen, const uint8_t *value,
|
||||
size_t valuelen, uint8_t flags _U_,
|
||||
void *user_data) {
|
||||
size_t valuelen, uint8_t flags, void *user_data) {
|
||||
http2_session_data *session_data = (http2_session_data *)user_data;
|
||||
(void)session;
|
||||
(void)flags;
|
||||
|
||||
switch (frame->hd.type) {
|
||||
case NGHTTP2_HEADERS:
|
||||
if (frame->headers.cat == NGHTTP2_HCAT_RESPONSE &&
|
||||
@@ -229,10 +234,12 @@ static int on_header_callback(nghttp2_session *session _U_,
|
||||
|
||||
/* nghttp2_on_begin_headers_callback: Called when nghttp2 library gets
|
||||
started to receive header block. */
|
||||
static int on_begin_headers_callback(nghttp2_session *session _U_,
|
||||
static int on_begin_headers_callback(nghttp2_session *session,
|
||||
const nghttp2_frame *frame,
|
||||
void *user_data) {
|
||||
http2_session_data *session_data = (http2_session_data *)user_data;
|
||||
(void)session;
|
||||
|
||||
switch (frame->hd.type) {
|
||||
case NGHTTP2_HEADERS:
|
||||
if (frame->headers.cat == NGHTTP2_HCAT_RESPONSE &&
|
||||
@@ -247,9 +254,11 @@ static int on_begin_headers_callback(nghttp2_session *session _U_,
|
||||
|
||||
/* nghttp2_on_frame_recv_callback: Called when nghttp2 library
|
||||
received a complete frame from the remote peer. */
|
||||
static int on_frame_recv_callback(nghttp2_session *session _U_,
|
||||
static int on_frame_recv_callback(nghttp2_session *session,
|
||||
const nghttp2_frame *frame, void *user_data) {
|
||||
http2_session_data *session_data = (http2_session_data *)user_data;
|
||||
(void)session;
|
||||
|
||||
switch (frame->hd.type) {
|
||||
case NGHTTP2_HEADERS:
|
||||
if (frame->headers.cat == NGHTTP2_HCAT_RESPONSE &&
|
||||
@@ -266,11 +275,13 @@ static int on_frame_recv_callback(nghttp2_session *session _U_,
|
||||
is meant to the stream we initiated, print the received data in
|
||||
stdout, so that the user can redirect its output to the file
|
||||
easily. */
|
||||
static int on_data_chunk_recv_callback(nghttp2_session *session _U_,
|
||||
uint8_t flags _U_, int32_t stream_id,
|
||||
const uint8_t *data, size_t len,
|
||||
void *user_data) {
|
||||
static int on_data_chunk_recv_callback(nghttp2_session *session, uint8_t flags,
|
||||
int32_t stream_id, const uint8_t *data,
|
||||
size_t len, void *user_data) {
|
||||
http2_session_data *session_data = (http2_session_data *)user_data;
|
||||
(void)session;
|
||||
(void)flags;
|
||||
|
||||
if (session_data->stream_data->stream_id == stream_id) {
|
||||
fwrite(data, 1, len, stdout);
|
||||
}
|
||||
@@ -287,7 +298,7 @@ static int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
|
||||
int rv;
|
||||
|
||||
if (session_data->stream_data->stream_id == stream_id) {
|
||||
fprintf(stderr, "Stream %d closed with error_code=%d\n", stream_id,
|
||||
fprintf(stderr, "Stream %d closed with error_code=%u\n", stream_id,
|
||||
error_code);
|
||||
rv = nghttp2_session_terminate_session(session, NGHTTP2_NO_ERROR);
|
||||
if (rv != 0) {
|
||||
@@ -297,17 +308,22 @@ static int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
/* NPN TLS extension client callback. We check that server advertised
|
||||
the HTTP/2 protocol the nghttp2 library supports. If not, exit
|
||||
the program. */
|
||||
static int select_next_proto_cb(SSL *ssl _U_, unsigned char **out,
|
||||
static int select_next_proto_cb(SSL *ssl, unsigned char **out,
|
||||
unsigned char *outlen, const unsigned char *in,
|
||||
unsigned int inlen, void *arg _U_) {
|
||||
unsigned int inlen, void *arg) {
|
||||
(void)ssl;
|
||||
(void)arg;
|
||||
|
||||
if (nghttp2_select_next_protocol(out, outlen, in, inlen) <= 0) {
|
||||
errx(1, "Server did not advertise " NGHTTP2_PROTO_VERSION_ID);
|
||||
}
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
/* Create SSL_CTX. */
|
||||
static SSL_CTX *create_ssl_ctx(void) {
|
||||
@@ -321,11 +337,13 @@ static SSL_CTX *create_ssl_ctx(void) {
|
||||
SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 |
|
||||
SSL_OP_NO_COMPRESSION |
|
||||
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb, NULL);
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
SSL_CTX_set_alpn_protos(ssl_ctx, (const unsigned char *)"\x02h2", 3);
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
|
||||
|
||||
return ssl_ctx;
|
||||
}
|
||||
@@ -383,13 +401,13 @@ static void send_client_connection_header(http2_session_data *session_data) {
|
||||
|
||||
#define MAKE_NV(NAME, VALUE, VALUELEN) \
|
||||
{ \
|
||||
(uint8_t *) NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, VALUELEN, \
|
||||
(uint8_t *)NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, VALUELEN, \
|
||||
NGHTTP2_NV_FLAG_NONE \
|
||||
}
|
||||
|
||||
#define MAKE_NV2(NAME, VALUE) \
|
||||
{ \
|
||||
(uint8_t *) NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, sizeof(VALUE) - 1, \
|
||||
(uint8_t *)NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, sizeof(VALUE) - 1, \
|
||||
NGHTTP2_NV_FLAG_NONE \
|
||||
}
|
||||
|
||||
@@ -461,8 +479,10 @@ static void readcb(struct bufferevent *bev, void *ptr) {
|
||||
receiving GOAWAY, we check the some conditions on the nghttp2
|
||||
library and output buffer of bufferevent. If it indicates we have
|
||||
no business to this session, tear down the connection. */
|
||||
static void writecb(struct bufferevent *bev _U_, void *ptr) {
|
||||
static void writecb(struct bufferevent *bev, void *ptr) {
|
||||
http2_session_data *session_data = (http2_session_data *)ptr;
|
||||
(void)bev;
|
||||
|
||||
if (nghttp2_session_want_read(session_data->session) == 0 &&
|
||||
nghttp2_session_want_write(session_data->session) == 0 &&
|
||||
evbuffer_get_length(bufferevent_get_output(session_data->bev)) == 0) {
|
||||
@@ -488,12 +508,14 @@ static void eventcb(struct bufferevent *bev, short events, void *ptr) {
|
||||
|
||||
ssl = bufferevent_openssl_get_ssl(session_data->bev);
|
||||
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
SSL_get0_next_proto_negotiated(ssl, &alpn, &alpnlen);
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
if (alpn == NULL) {
|
||||
SSL_get0_alpn_selected(ssl, &alpn, &alpnlen);
|
||||
}
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
|
||||
|
||||
if (alpn == NULL || alpnlen != 2 || memcmp("h2", alpn, 2) != 0) {
|
||||
fprintf(stderr, "h2 is not negotiated\n");
|
||||
@@ -532,6 +554,7 @@ static void initiate_connection(struct event_base *evbase, SSL_CTX *ssl_ctx,
|
||||
bev = bufferevent_openssl_socket_new(
|
||||
evbase, -1, ssl, BUFFEREVENT_SSL_CONNECTING,
|
||||
BEV_OPT_DEFER_CALLBACKS | BEV_OPT_CLOSE_ON_FREE);
|
||||
bufferevent_enable(bev, EV_READ | EV_WRITE);
|
||||
bufferevent_setcb(bev, readcb, writecb, eventcb, session_data);
|
||||
rv = bufferevent_socket_connect_hostname(bev, session_data->dnsbase,
|
||||
AF_UNSPEC, host, port);
|
||||
|
||||
@@ -23,41 +23,41 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifdef __sgi
|
||||
#define errx(exitcode, format, args...) \
|
||||
{ \
|
||||
warnx(format, ##args); \
|
||||
exit(exitcode); \
|
||||
}
|
||||
#define warn(format, args...) warnx(format ": %s", ##args, strerror(errno))
|
||||
#define warnx(format, args...) fprintf(stderr, format "\n", ##args)
|
||||
# define errx(exitcode, format, args...) \
|
||||
{ \
|
||||
warnx(format, ##args); \
|
||||
exit(exitcode); \
|
||||
}
|
||||
# define warn(format, args...) warnx(format ": %s", ##args, strerror(errno))
|
||||
# define warnx(format, args...) fprintf(stderr, format "\n", ##args)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
# include <sys/socket.h>
|
||||
#endif /* HAVE_SYS_SOCKET_H */
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
# include <netdb.h>
|
||||
#endif /* HAVE_NETDB_H */
|
||||
#include <signal.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
# include <fcntl.h>
|
||||
#endif /* HAVE_FCNTL_H */
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
# include <netinet/in.h>
|
||||
#endif /* HAVE_NETINET_IN_H */
|
||||
#include <netinet/tcp.h>
|
||||
#ifndef __sgi
|
||||
#include <err.h>
|
||||
# include <err.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
#define MAKE_NV(NAME, VALUE) \
|
||||
{ \
|
||||
(uint8_t *) NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, sizeof(VALUE) - 1, \
|
||||
(uint8_t *)NAME, (uint8_t *)VALUE, sizeof(NAME) - 1, sizeof(VALUE) - 1, \
|
||||
NGHTTP2_NV_FLAG_NONE \
|
||||
}
|
||||
|
||||
@@ -109,18 +109,25 @@ struct app_context {
|
||||
static unsigned char next_proto_list[256];
|
||||
static size_t next_proto_list_len;
|
||||
|
||||
static int next_proto_cb(SSL *s _U_, const unsigned char **data,
|
||||
unsigned int *len, void *arg _U_) {
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
static int next_proto_cb(SSL *ssl, const unsigned char **data,
|
||||
unsigned int *len, void *arg) {
|
||||
(void)ssl;
|
||||
(void)arg;
|
||||
|
||||
*data = next_proto_list;
|
||||
*len = (unsigned int)next_proto_list_len;
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
static int alpn_select_proto_cb(SSL *ssl _U_, const unsigned char **out,
|
||||
static int alpn_select_proto_cb(SSL *ssl, const unsigned char **out,
|
||||
unsigned char *outlen, const unsigned char *in,
|
||||
unsigned int inlen, void *arg _U_) {
|
||||
unsigned int inlen, void *arg) {
|
||||
int rv;
|
||||
(void)ssl;
|
||||
(void)arg;
|
||||
|
||||
rv = nghttp2_select_next_protocol((unsigned char **)out, outlen, in, inlen);
|
||||
|
||||
@@ -130,7 +137,7 @@ static int alpn_select_proto_cb(SSL *ssl _U_, const unsigned char **out,
|
||||
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
|
||||
|
||||
/* Create SSL_CTX. */
|
||||
static SSL_CTX *create_ssl_ctx(const char *key_file, const char *cert_file) {
|
||||
@@ -167,11 +174,13 @@ static SSL_CTX *create_ssl_ctx(const char *key_file, const char *cert_file) {
|
||||
NGHTTP2_PROTO_VERSION_ID_LEN);
|
||||
next_proto_list_len = 1 + NGHTTP2_PROTO_VERSION_ID_LEN;
|
||||
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
SSL_CTX_set_next_protos_advertised_cb(ssl_ctx, next_proto_cb, NULL);
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
SSL_CTX_set_alpn_select_cb(ssl_ctx, alpn_select_proto_cb, NULL);
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
|
||||
|
||||
return ssl_ctx;
|
||||
}
|
||||
@@ -197,8 +206,10 @@ static void add_stream(http2_session_data *session_data,
|
||||
}
|
||||
}
|
||||
|
||||
static void remove_stream(http2_session_data *session_data _U_,
|
||||
static void remove_stream(http2_session_data *session_data,
|
||||
http2_stream_data *stream_data) {
|
||||
(void)session_data;
|
||||
|
||||
stream_data->prev->next = stream_data->next;
|
||||
if (stream_data->next) {
|
||||
stream_data->next->prev = stream_data->prev;
|
||||
@@ -243,6 +254,7 @@ static http2_session_data *create_http2_session_data(app_context *app_ctx,
|
||||
session_data->bev = bufferevent_openssl_socket_new(
|
||||
app_ctx->evbase, fd, ssl, BUFFEREVENT_SSL_ACCEPTING,
|
||||
BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS);
|
||||
bufferevent_enable(session_data->bev, EV_READ | EV_WRITE);
|
||||
rv = getnameinfo(addr, (socklen_t)addrlen, host, sizeof(host), NULL, 0,
|
||||
NI_NUMERICHOST);
|
||||
if (rv != 0) {
|
||||
@@ -309,10 +321,13 @@ static int session_recv(http2_session_data *session_data) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t send_callback(nghttp2_session *session _U_, const uint8_t *data,
|
||||
size_t length, int flags _U_, void *user_data) {
|
||||
static ssize_t send_callback(nghttp2_session *session, const uint8_t *data,
|
||||
size_t length, int flags, void *user_data) {
|
||||
http2_session_data *session_data = (http2_session_data *)user_data;
|
||||
struct bufferevent *bev = session_data->bev;
|
||||
(void)session;
|
||||
(void)flags;
|
||||
|
||||
/* Avoid excessive buffering in server side. */
|
||||
if (evbuffer_get_length(bufferevent_get_output(session_data->bev)) >=
|
||||
OUTPUT_WOULDBLOCK_THRESHOLD) {
|
||||
@@ -375,13 +390,17 @@ static char *percent_decode(const uint8_t *value, size_t valuelen) {
|
||||
return res;
|
||||
}
|
||||
|
||||
static ssize_t file_read_callback(nghttp2_session *session _U_,
|
||||
int32_t stream_id _U_, uint8_t *buf,
|
||||
size_t length, uint32_t *data_flags,
|
||||
static ssize_t file_read_callback(nghttp2_session *session, int32_t stream_id,
|
||||
uint8_t *buf, size_t length,
|
||||
uint32_t *data_flags,
|
||||
nghttp2_data_source *source,
|
||||
void *user_data _U_) {
|
||||
void *user_data) {
|
||||
int fd = source->fd;
|
||||
ssize_t r;
|
||||
(void)session;
|
||||
(void)stream_id;
|
||||
(void)user_data;
|
||||
|
||||
while ((r = read(fd, buf, length)) == -1 && errno == EINTR)
|
||||
;
|
||||
if (r == -1) {
|
||||
@@ -454,10 +473,12 @@ static int error_reply(nghttp2_session *session,
|
||||
static int on_header_callback(nghttp2_session *session,
|
||||
const nghttp2_frame *frame, const uint8_t *name,
|
||||
size_t namelen, const uint8_t *value,
|
||||
size_t valuelen, uint8_t flags _U_,
|
||||
void *user_data _U_) {
|
||||
size_t valuelen, uint8_t flags, void *user_data) {
|
||||
http2_stream_data *stream_data;
|
||||
const char PATH[] = ":path";
|
||||
(void)flags;
|
||||
(void)user_data;
|
||||
|
||||
switch (frame->hd.type) {
|
||||
case NGHTTP2_HEADERS:
|
||||
if (frame->headers.cat != NGHTTP2_HCAT_REQUEST) {
|
||||
@@ -570,9 +591,10 @@ static int on_frame_recv_callback(nghttp2_session *session,
|
||||
}
|
||||
|
||||
static int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
|
||||
uint32_t error_code _U_, void *user_data) {
|
||||
uint32_t error_code, void *user_data) {
|
||||
http2_session_data *session_data = (http2_session_data *)user_data;
|
||||
http2_stream_data *stream_data;
|
||||
(void)error_code;
|
||||
|
||||
stream_data = nghttp2_session_get_stream_user_data(session, stream_id);
|
||||
if (!stream_data) {
|
||||
@@ -625,8 +647,10 @@ static int send_server_connection_header(http2_session_data *session_data) {
|
||||
|
||||
/* readcb for bufferevent after client connection header was
|
||||
checked. */
|
||||
static void readcb(struct bufferevent *bev _U_, void *ptr) {
|
||||
static void readcb(struct bufferevent *bev, void *ptr) {
|
||||
http2_session_data *session_data = (http2_session_data *)ptr;
|
||||
(void)bev;
|
||||
|
||||
if (session_recv(session_data) != 0) {
|
||||
delete_http2_session_data(session_data);
|
||||
return;
|
||||
@@ -658,23 +682,26 @@ static void writecb(struct bufferevent *bev, void *ptr) {
|
||||
}
|
||||
|
||||
/* eventcb for bufferevent */
|
||||
static void eventcb(struct bufferevent *bev _U_, short events, void *ptr) {
|
||||
static void eventcb(struct bufferevent *bev, short events, void *ptr) {
|
||||
http2_session_data *session_data = (http2_session_data *)ptr;
|
||||
if (events & BEV_EVENT_CONNECTED) {
|
||||
const unsigned char *alpn = NULL;
|
||||
unsigned int alpnlen = 0;
|
||||
SSL *ssl;
|
||||
(void)bev;
|
||||
|
||||
fprintf(stderr, "%s connected\n", session_data->client_addr);
|
||||
|
||||
ssl = bufferevent_openssl_get_ssl(session_data->bev);
|
||||
|
||||
#ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
SSL_get0_next_proto_negotiated(ssl, &alpn, &alpnlen);
|
||||
#endif /* !OPENSSL_NO_NEXTPROTONEG */
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
if (alpn == NULL) {
|
||||
SSL_get0_alpn_selected(ssl, &alpn, &alpnlen);
|
||||
}
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
|
||||
|
||||
if (alpn == NULL || alpnlen != 2 || memcmp("h2", alpn, 2) != 0) {
|
||||
fprintf(stderr, "%s h2 is not negotiated\n", session_data->client_addr);
|
||||
@@ -703,10 +730,11 @@ static void eventcb(struct bufferevent *bev _U_, short events, void *ptr) {
|
||||
}
|
||||
|
||||
/* callback for evconnlistener */
|
||||
static void acceptcb(struct evconnlistener *listener _U_, int fd,
|
||||
static void acceptcb(struct evconnlistener *listener, int fd,
|
||||
struct sockaddr *addr, int addrlen, void *arg) {
|
||||
app_context *app_ctx = (app_context *)arg;
|
||||
http2_session_data *session_data;
|
||||
(void)listener;
|
||||
|
||||
session_data = create_http2_session_data(app_ctx, fd, addr, addrlen);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
33
fuzz/README.rst
Normal file
33
fuzz/README.rst
Normal file
@@ -0,0 +1,33 @@
|
||||
Fuzzer
|
||||
======
|
||||
|
||||
This directory contains fuzzer target mainly written to integrate
|
||||
nghttp2 into `oss-fuzz <https://github.com/google/oss-fuzz>`_.
|
||||
|
||||
fuzz_target.cc contains an entry point of fuzzer. corpus directory
|
||||
contains initial data for fuzzer.
|
||||
|
||||
The file name of initial data under corpus is the lower-cased hex
|
||||
string of SHA-256 hash of its own content.
|
||||
|
||||
corpus/h2spec contains input data which was recorded when we ran
|
||||
`h2spec <https://github.com/summerwind/h2spec>`_ against nghttpd.
|
||||
|
||||
corpus/nghttp contains input data which was recorded when we ran
|
||||
nghttp against nghttpd with some varying command line options of
|
||||
nghttp.
|
||||
|
||||
|
||||
To build fuzz_target.cc, make sure that libnghttp2 is built with
|
||||
following compiler/linker flags:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
CPPFLAGS="-fsanitize-coverage=edge -fsanitize=address"
|
||||
LDFLAGS="-fsanitize-coverage=edge -fsanitize=address"
|
||||
|
||||
Then, fuzz_target.cc can be built using the following command:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ clang++ -fsanitize-coverage=edge -fsanitize=address -I../lib/includes -std=c++11 fuzz_target.cc ../lib/.libs/libnghttp2.a /usr/lib/llvm-3.9/lib/libFuzzer.a -o nghttp2_fuzzer
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
INVALID CONNECTION PREFACE
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user