31 |
32 | Free document hosting provided by Read the Docs.
33 |
34 |
35 |
36 | {% endif %}
37 |
38 |
--------------------------------------------------------------------------------
/nghttp2/src/ca.nghttp2.org.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDrTCCApWgAwIBAgIUe4dvx8haIjsT3ZpNCMrl62Xk6E0wDQYJKoZIhvcNAQEL
3 | BQAwXjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoT
4 | GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMOY2EubmdodHRwMi5v
5 | cmcwHhcNMTYwNjI1MDkzMzAwWhcNMjYwNjIzMDkzMzAwWjBeMQswCQYDVQQGEwJB
6 | VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0
7 | cyBQdHkgTHRkMRcwFQYDVQQDEw5jYS5uZ2h0dHAyLm9yZzCCASIwDQYJKoZIhvcN
8 | AQEBBQADggEPADCCAQoCggEBANZFZBfEElMFvx1fRBUT0jKIjlZmMAfL6ig7U9He
9 | jBYigDPP2CRVKtripVMnYE+CDxOzwE71XCI9xrS/V8z4bHKmDv0tGO7HMkxNlQD5
10 | rc/krT1n9sGdSEEdPR65w03OOCr2BmaXnwWZA/VI25ifWtWZiYyYjK94U5yhP7MW
11 | dvnTLJzGVzfNtnH2h8kzfk9Pk8sObwQW6Ag7Gc8Zn/vRRSAyTbNzS9+HEfBGUYaX
12 | 2noGqR/G7Tifg/kWdpIOxP2GJBnEujaHb040lBQhR6Voxwn0xYZ/6MASAKKAnVqK
13 | 4enXPEO9pQKHcDS10vLrj4D6jObOAs+e5u2YLODopTZiHWsCAwEAAaNjMGEwDgYD
14 | VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNA5xVR1Zcax
15 | RJL9VC6pzuLmvduGMB8GA1UdIwQYMBaAFNA5xVR1ZcaxRJL9VC6pzuLmvduGMA0G
16 | CSqGSIb3DQEBCwUAA4IBAQCmdVfn/hUyEdvkKG7svg5d8o6BENOj8695KtWmzJjK
17 | zxH8J5Vy3mn89XrHQ+BOYXCDPyhs0aDS8aq3Z+HY0n9z1oAicyGzlVwZQQNX3YId
18 | Y2vcf7qu/2ATm/1S+mebE1/EXMUlWISKKUYXjggCwFgjDhH87Ai+A8MKScVdmqgL
19 | Hf+fRSzH3ToW7BCXlRl5bPAq2g+v1ALYc8wU9cT1MYm4dqAXh870LGFyUpaSWmFr
20 | TtX1DXBTgLp62syNlDthAvGigYFDtCa4cDM2vdTD9wpec2V9EKpfVqiRDDuYjUVX
21 | UXl27MvkNWnEBKCIoNv5abWXpZVG2zQdEMmUOkVuAXUC
22 | -----END CERTIFICATE-----
23 |
--------------------------------------------------------------------------------
/nghttp2/src/includes/Makefile.am:
--------------------------------------------------------------------------------
1 | # nghttp2 - HTTP/2 C Library
2 |
3 | # Copyright (c) 2014 Tatsuhiro Tsujikawa
4 |
5 | # Permission is hereby granted, free of charge, to any person obtaining
6 | # a copy of this software and associated documentation files (the
7 | # "Software"), to deal in the Software without restriction, including
8 | # without limitation the rights to use, copy, modify, merge, publish,
9 | # distribute, sublicense, and/or sell copies of the Software, and to
10 | # permit persons to whom the Software is furnished to do so, subject to
11 | # the following conditions:
12 |
13 | # The above copyright notice and this permission notice shall be
14 | # included in all copies or substantial portions of the Software.
15 |
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | EXTRA_DIST = CMakeLists.txt
25 |
26 | if ENABLE_ASIO_LIB
27 | nobase_include_HEADERS = nghttp2/asio_http2.h nghttp2/asio_http2_client.h \
28 | nghttp2/asio_http2_server.h
29 | endif # ENABLE_ASIO_LIB
30 |
--------------------------------------------------------------------------------
/nghttp2/android-make:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # nghttp2 - HTTP/2 C Library
4 | #
5 | # Copyright (c) 2013 Tatsuhiro Tsujikawa
6 | #
7 | # Permission is hereby granted, free of charge, to any person obtaining
8 | # a copy of this software and associated documentation files (the
9 | # "Software"), to deal in the Software without restriction, including
10 | # without limitation the rights to use, copy, modify, merge, publish,
11 | # distribute, sublicense, and/or sell copies of the Software, and to
12 | # permit persons to whom the Software is furnished to do so, subject to
13 | # the following conditions:
14 | #
15 | # The above copyright notice and this permission notice shall be
16 | # included in all copies or substantial portions of the Software.
17 | #
18 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 |
26 | if [ -z "$ANDROID_HOME" ]; then
27 | echo 'No $ANDROID_HOME specified.'
28 | exit 1
29 | fi
30 | TOOLCHAIN=$ANDROID_HOME/toolchain
31 | PATH=$TOOLCHAIN/bin:$PATH
32 |
33 | make "$@"
34 |
--------------------------------------------------------------------------------
/nghttp2/libev-4.15/Symbols.ev:
--------------------------------------------------------------------------------
1 | ev_async_send
2 | ev_async_start
3 | ev_async_stop
4 | ev_backend
5 | ev_break
6 | ev_check_start
7 | ev_check_stop
8 | ev_child_start
9 | ev_child_stop
10 | ev_cleanup_start
11 | ev_cleanup_stop
12 | ev_clear_pending
13 | ev_default_loop
14 | ev_default_loop_ptr
15 | ev_depth
16 | ev_embed_start
17 | ev_embed_stop
18 | ev_embed_sweep
19 | ev_embeddable_backends
20 | ev_feed_event
21 | ev_feed_fd_event
22 | ev_feed_signal
23 | ev_feed_signal_event
24 | ev_fork_start
25 | ev_fork_stop
26 | ev_idle_start
27 | ev_idle_stop
28 | ev_invoke
29 | ev_invoke_pending
30 | ev_io_start
31 | ev_io_stop
32 | ev_iteration
33 | ev_loop_destroy
34 | ev_loop_fork
35 | ev_loop_new
36 | ev_now
37 | ev_now_update
38 | ev_once
39 | ev_pending_count
40 | ev_periodic_again
41 | ev_periodic_start
42 | ev_periodic_stop
43 | ev_prepare_start
44 | ev_prepare_stop
45 | ev_recommended_backends
46 | ev_ref
47 | ev_resume
48 | ev_run
49 | ev_set_allocator
50 | ev_set_invoke_pending_cb
51 | ev_set_io_collect_interval
52 | ev_set_loop_release_cb
53 | ev_set_syserr_cb
54 | ev_set_timeout_collect_interval
55 | ev_set_userdata
56 | ev_signal_start
57 | ev_signal_stop
58 | ev_sleep
59 | ev_stat_start
60 | ev_stat_stat
61 | ev_stat_stop
62 | ev_supported_backends
63 | ev_suspend
64 | ev_time
65 | ev_timer_again
66 | ev_timer_remaining
67 | ev_timer_start
68 | ev_timer_stop
69 | ev_unref
70 | ev_userdata
71 | ev_verify
72 | ev_version_major
73 | ev_version_minor
74 |
--------------------------------------------------------------------------------
/nghttp2/src/nghttp2_config.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_CONFIG_H
26 | #define NGHTTP2_CONFIG_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | #endif // NGHTTP2_CONFIG_H
33 |
--------------------------------------------------------------------------------
/nghttp2/cmake/FindCUnit.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find cunit
2 | # Once done this will define
3 | # CUNIT_FOUND - System has cunit
4 | # CUNIT_INCLUDE_DIRS - The cunit include directories
5 | # CUNIT_LIBRARIES - The libraries needed to use cunit
6 |
7 | find_package(PkgConfig QUIET)
8 | pkg_check_modules(PC_CUNIT QUIET cunit)
9 |
10 | find_path(CUNIT_INCLUDE_DIR
11 | NAMES CUnit/CUnit.h
12 | HINTS ${PC_CUNIT_INCLUDE_DIRS}
13 | )
14 | find_library(CUNIT_LIBRARY
15 | NAMES cunit
16 | HINTS ${PC_CUNIT_LIBRARY_DIRS}
17 | )
18 |
19 | if(CUNIT_INCLUDE_DIR)
20 | set(_version_regex "^#define[ \t]+CU_VERSION[ \t]+\"([^\"]+)\".*")
21 | file(STRINGS "${CUNIT_INCLUDE_DIR}/CUnit/CUnit.h"
22 | CUNIT_VERSION REGEX "${_version_regex}")
23 | string(REGEX REPLACE "${_version_regex}" "\\1"
24 | CUNIT_VERSION "${CUNIT_VERSION}")
25 | unset(_version_regex)
26 | endif()
27 |
28 | include(FindPackageHandleStandardArgs)
29 | # handle the QUIETLY and REQUIRED arguments and set CUNIT_FOUND to TRUE
30 | # if all listed variables are TRUE and the requested version matches.
31 | find_package_handle_standard_args(CUnit REQUIRED_VARS
32 | CUNIT_LIBRARY CUNIT_INCLUDE_DIR
33 | VERSION_VAR CUNIT_VERSION)
34 |
35 | if(CUNIT_FOUND)
36 | set(CUNIT_LIBRARIES ${CUNIT_LIBRARY})
37 | set(CUNIT_INCLUDE_DIRS ${CUNIT_INCLUDE_DIR})
38 | endif()
39 |
40 | mark_as_advanced(CUNIT_INCLUDE_DIR CUNIT_LIBRARY)
41 |
--------------------------------------------------------------------------------
/nghttp2/src/test.example.com.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDwTCCAqmgAwIBAgIUDhKNhGRUq1TSHD6aG2k4TRR8iA0wDQYJKoZIhvcNAQEL
3 | BQAwXjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoT
4 | GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMOY2EubmdodHRwMi5v
5 | cmcwHhcNMTYwNjI1MDkzNzAwWhcNMjYwNjIzMDkzNzAwWjBgMQswCQYDVQQGEwJB
6 | VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0
7 | cyBQdHkgTHRkMRkwFwYDVQQDExB0ZXN0LmV4YW1wbGUuY29tMIIBIjANBgkqhkiG
8 | 9w0BAQEFAAOCAQ8AMIIBCgKCAQEArf2UBsEh/xwd/4WZfVFf5sMyWcns/1idF2Fr
9 | oLDwqVUYRlxpU/KbrIG8X8v3w4cVP/xOXd1y9Q+W9OLK2YScAeHeE97mHZXbcpow
10 | UxvTDv/GNIHHXK/yvYM8R2EEnZR71qXdoXsCakv/aG2ewkkvA108eEbk0u7RxNmI
11 | sYsO0Y4iBtwBM/MSkAYPfWdrdHhY9z0l4M8GAyUOuZc0t6j0zw3fzkjqmVgGEJvc
12 | VzvSgZIzMLqSzvC89viXtj1pyzQjMLgmuDbs0l47uRHpZXgMGVyF3UuQipPzvhO7
13 | G/ZbX/4kUU5bPabdtvPbjju7dE5PfGrKOThM6HS93Y7QvYTUtwIDAQABo3UwczAO
14 | BgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIw
15 | ADAdBgNVHQ4EFgQUm8jn1FICope9qUce6ORQ0CtbmhYwHwYDVR0jBBgwFoAU0DnF
16 | VHVlxrFEkv1ULqnO4ua924YwDQYJKoZIhvcNAQELBQADggEBAD7RPz/5rAnS1MNP
17 | JfAj1TXZSBwlYgtmJL65yaFB6a1SNSTo15deAm/1Vl10LbmYdV4sVnGKeZjhKNk+
18 | bvVzetUSUS7Rh1fHtxlivJFkG1VrvPu9b416l2aKftBiaNyAWXbyjqXwLYli6Ehk
19 | uu6jZd0040Ggh7bY+KMSnDFDrp7Rar7OvGu9Iovs+sPdkc/iEbvwEiXdMjf3gwkT
20 | Wqx6br1VDLzhD83HAsFA9tt5fv6KTf91UgJnCmOi81Uo6fSEJG84g32T25gwwmCK
21 | q4U049aGF/f4u3QuWDsfYqNePycurAg3m5PC0wCoqvpY2u/q+PGbjWMi2PfZsF8U
22 | imgl/L0=
23 | -----END CERTIFICATE-----
24 |
--------------------------------------------------------------------------------
/nghttp2/tests/nghttp2_stream_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_STREAM_TEST_H
26 | #define NGHTTP2_STREAM_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | #endif /* NGHTTP2_STREAM_TEST_H */
33 |
--------------------------------------------------------------------------------
/nghttp2/lib/nghttp2_npn.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_NPN_H
26 | #define NGHTTP2_NPN_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | #include
33 |
34 | #endif /* NGHTTP2_NPN_H */
35 |
--------------------------------------------------------------------------------
/nghttp2/src/asio_client_tls_context.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef ASIO_CLIENT_TLS_CONTEXT_H
26 | #define ASIO_CLIENT_TLS_CONTEXT_H
27 |
28 | #include "nghttp2_config.h"
29 |
30 | #include
31 |
32 | #endif // ASIO_CLIENT_TLS_CONTEXT_H
33 |
--------------------------------------------------------------------------------
/nghttp2/src/asio_server_tls_context.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef ASIO_SERVER_TLS_CONTEXT_H
26 | #define ASIO_SERVER_TLS_CONTEXT_H
27 |
28 | #include "nghttp2_config.h"
29 |
30 | #include
31 |
32 | #endif // ASIO_SERVER_TLS_CONTEXT_H
33 |
--------------------------------------------------------------------------------
/nghttp2/lib/nghttp2_submit.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_SUBMIT_H
26 | #define NGHTTP2_SUBMIT_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | #include
33 |
34 | #endif /* NGHTTP2_SUBMIT_H */
35 |
--------------------------------------------------------------------------------
/nghttp2/tests/nghttp2_npn_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Twist Inc.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_NPN_TEST_H
26 | #define NGHTTP2_NPN_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | void test_nghttp2_npn(void);
33 |
34 | #endif /* NGHTTP2_NPN_TEST_H */
35 |
--------------------------------------------------------------------------------
/nghttp2/src/asio_server_request_handler.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef ASIO_SERVER_REQUEST_HANDLER_H
26 | #define ASIO_SERVER_REQUEST_HANDLER_H
27 |
28 | #include "nghttp2_config.h"
29 |
30 | #include
31 |
32 | #endif // ASIO_SERVER_REQUEST_HANDLER_H
33 |
--------------------------------------------------------------------------------
/nghttp2/tests/nghttp2_queue_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_QUEUE_TEST_H
26 | #define NGHTTP2_QUEUE_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | void test_nghttp2_queue(void);
33 |
34 | #endif /* NGHTTP2_QUEUE_TEST_H */
35 |
--------------------------------------------------------------------------------
/nghttp2/cmake/FindJansson.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find jansson
2 | # Once done this will define
3 | # JANSSON_FOUND - System has jansson
4 | # JANSSON_INCLUDE_DIRS - The jansson include directories
5 | # JANSSON_LIBRARIES - The libraries needed to use jansson
6 |
7 | find_package(PkgConfig QUIET)
8 | pkg_check_modules(PC_JANSSON QUIET jansson)
9 |
10 | find_path(JANSSON_INCLUDE_DIR
11 | NAMES jansson.h
12 | HINTS ${PC_JANSSON_INCLUDE_DIRS}
13 | )
14 | find_library(JANSSON_LIBRARY
15 | NAMES jansson
16 | HINTS ${PC_JANSSON_LIBRARY_DIRS}
17 | )
18 |
19 | if(JANSSON_INCLUDE_DIR)
20 | set(_version_regex "^#define[ \t]+JANSSON_VERSION[ \t]+\"([^\"]+)\".*")
21 | file(STRINGS "${JANSSON_INCLUDE_DIR}/jansson.h"
22 | JANSSON_VERSION REGEX "${_version_regex}")
23 | string(REGEX REPLACE "${_version_regex}" "\\1"
24 | JANSSON_VERSION "${JANSSON_VERSION}")
25 | unset(_version_regex)
26 | endif()
27 |
28 | include(FindPackageHandleStandardArgs)
29 | # handle the QUIETLY and REQUIRED arguments and set JANSSON_FOUND to TRUE
30 | # if all listed variables are TRUE and the requested version matches.
31 | find_package_handle_standard_args(Jansson REQUIRED_VARS
32 | JANSSON_LIBRARY JANSSON_INCLUDE_DIR
33 | VERSION_VAR JANSSON_VERSION)
34 |
35 | if(JANSSON_FOUND)
36 | set(JANSSON_LIBRARIES ${JANSSON_LIBRARY})
37 | set(JANSSON_INCLUDE_DIRS ${JANSSON_INCLUDE_DIR})
38 | endif()
39 |
40 | mark_as_advanced(JANSSON_INCLUDE_DIR JANSSON_LIBRARY)
41 |
--------------------------------------------------------------------------------
/nghttp2/appveyor.yml:
--------------------------------------------------------------------------------
1 | # Notes:
2 | # - Minimal appveyor.yml file is an empty file. All sections are optional.
3 | # - Indent each level of configuration with 2 spaces. Do not use tabs!
4 | # - All section names are case-sensitive.
5 | # - Section names should be unique on each level.
6 |
7 | #---------------------------------#
8 | # general configuration #
9 | #---------------------------------#
10 |
11 | # version format
12 | #version: 0.10.{build}
13 |
14 | # branches to build
15 | branches:
16 | # blacklist
17 | except:
18 | - gh-pages
19 |
20 | # Do not build on tags (GitHub only)
21 | skip_tags: true
22 |
23 | #---------------------------------#
24 | # environment configuration #
25 | #---------------------------------#
26 |
27 | os: Windows Server 2012
28 |
29 | # scripts that run after cloning repository
30 | install:
31 | # install Win-Flex-Bison
32 | #- cmd: cinst winflexbison -y
33 |
34 | #---------------------------------#
35 | # build configuration #
36 | #---------------------------------#
37 |
38 | # scripts to run before build
39 | before_build:
40 | - cmd: cmake .
41 |
42 | # scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
43 | # before_package:
44 |
45 | # scripts to run after build
46 | # after_build:
47 |
48 | # to run your custom scripts instead of automatic MSBuild
49 | build_script:
50 | - cmd: cmake --build .
51 |
52 | # to disable automatic builds
53 | # build: off
54 |
--------------------------------------------------------------------------------
/nghttp2/integration-tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(GO_FILES
2 | nghttpx_http1_test.go
3 | nghttpx_http2_test.go
4 | nghttpx_spdy_test.go
5 | server_tester.go
6 | )
7 |
8 | # XXX unused
9 | set(EXTRA_DIST
10 | ${GO_FILES}
11 | server.key
12 | server.crt
13 | alt-server.key
14 | alt-server.crt
15 | setenv
16 | req-set-header.rb
17 | resp-set-header.rb
18 | req-return.rb
19 | resp-return.rb
20 | )
21 |
22 | add_custom_target(itprep
23 | COMMAND go get -d -v golang.org/x/net/http2
24 | COMMAND go get -d -v github.com/tatsuhiro-t/go-nghttp2
25 | COMMAND go get -d -v github.com/tatsuhiro-t/spdy
26 | COMMAND go get -d -v golang.org/x/net/websocket
27 | )
28 |
29 | # 'go test' requires both config.go and the test files in the same directory.
30 | # For out-of-tree builds, config.go is normally not placed next to the source
31 | # files, so copy the tests to the build directory as a workaround.
32 | set(GO_BUILD_FILES)
33 | if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
34 | foreach(gofile IN LISTS GO_FILES)
35 | set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${gofile}")
36 | add_custom_command(OUTPUT "${outfile}"
37 | COMMAND ${CMAKE_COMMAND} -E copy
38 | "${CMAKE_CURRENT_SOURCE_DIR}/${gofile}" "${outfile}"
39 | DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${gofile}"
40 | )
41 | list(APPEND GO_BUILD_FILES "${outfile}")
42 | endforeach()
43 | endif()
44 |
45 | add_custom_target(it
46 | COMMAND sh setenv go test -v
47 | DEPENDS ${GO_BUILD_FILES}
48 | )
49 |
--------------------------------------------------------------------------------
/nghttp2/lib/libnghttp2.pc.in:
--------------------------------------------------------------------------------
1 | # nghttp2 - HTTP/2 C Library
2 |
3 | # Copyright (c) 2012, 2013 Tatsuhiro Tsujikawa
4 |
5 | # Permission is hereby granted, free of charge, to any person obtaining
6 | # a copy of this software and associated documentation files (the
7 | # "Software"), to deal in the Software without restriction, including
8 | # without limitation the rights to use, copy, modify, merge, publish,
9 | # distribute, sublicense, and/or sell copies of the Software, and to
10 | # permit persons to whom the Software is furnished to do so, subject to
11 | # the following conditions:
12 |
13 | # The above copyright notice and this permission notice shall be
14 | # included in all copies or substantial portions of the Software.
15 |
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 | prefix=@prefix@
24 | exec_prefix=@exec_prefix@
25 | libdir=@libdir@
26 | includedir=@includedir@
27 |
28 | Name: libnghttp2
29 | Description: HTTP/2 C library
30 | URL: https://github.com/tatsuhiro-t/nghttp2
31 | Version: @VERSION@
32 | Libs: -L${libdir} -lnghttp2
33 | Cflags: -I${includedir}
34 |
--------------------------------------------------------------------------------
/nghttp2/src/libnghttp2_asio.pc.in:
--------------------------------------------------------------------------------
1 | # nghttp2 - HTTP/2 C Library
2 |
3 | # Copyright (c) 2014 Tatsuhiro Tsujikawa
4 |
5 | # Permission is hereby granted, free of charge, to any person obtaining
6 | # a copy of this software and associated documentation files (the
7 | # "Software"), to deal in the Software without restriction, including
8 | # without limitation the rights to use, copy, modify, merge, publish,
9 | # distribute, sublicense, and/or sell copies of the Software, and to
10 | # permit persons to whom the Software is furnished to do so, subject to
11 | # the following conditions:
12 |
13 | # The above copyright notice and this permission notice shall be
14 | # included in all copies or substantial portions of the Software.
15 |
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 | prefix=@prefix@
24 | exec_prefix=@exec_prefix@
25 | libdir=@libdir@
26 | includedir=@includedir@
27 |
28 | Name: libnghttp2_asio
29 | Description: HTTP/2 C++ library
30 | URL: https://github.com/tatsuhiro-t/nghttp2
31 | Version: @VERSION@
32 | Libs: -L${libdir} -lnghttp2_asio
33 | Cflags: -I${includedir}
34 |
--------------------------------------------------------------------------------
/nghttp2/src/buffer_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef BUFFER_TEST_H
26 | #define BUFFER_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | namespace nghttp2 {
33 |
34 | void test_buffer_write(void);
35 |
36 | } // namespace nghttp2
37 |
38 | #endif // BUFFER_TEST_H
39 |
--------------------------------------------------------------------------------
/nghttp2/cmake/FindSpdylay.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find spdylay
2 | # Once done this will define
3 | # SPDYLAY_FOUND - System has spdylay
4 | # SPDYLAY_INCLUDE_DIRS - The spdylay include directories
5 | # SPDYLAY_LIBRARIES - The libraries needed to use spdylay
6 |
7 | find_package(PkgConfig QUIET)
8 | pkg_check_modules(PC_SPDYLAY QUIET libspdylay)
9 |
10 | find_path(SPDYLAY_INCLUDE_DIR
11 | NAMES spdylay/spdylay.h
12 | HINTS ${PC_SPDYLAY_INCLUDE_DIRS}
13 | )
14 | find_library(SPDYLAY_LIBRARY
15 | NAMES spdylay
16 | HINTS ${PC_SPDYLAY_LIBRARY_DIRS}
17 | )
18 |
19 | if(SPDYLAY_INCLUDE_DIR)
20 | set(_version_regex "^#define[ \t]+SPDYLAY_VERSION[ \t]+\"([^\"]+)\".*")
21 | file(STRINGS "${SPDYLAY_INCLUDE_DIR}/spdylay/spdylayver.h"
22 | SPDYLAY_VERSION REGEX "${_version_regex}")
23 | string(REGEX REPLACE "${_version_regex}" "\\1"
24 | SPDYLAY_VERSION "${SPDYLAY_VERSION}")
25 | unset(_version_regex)
26 | endif()
27 |
28 | include(FindPackageHandleStandardArgs)
29 | # handle the QUIETLY and REQUIRED arguments and set SPDYLAY_FOUND to TRUE
30 | # if all listed variables are TRUE and the requested version matches.
31 | find_package_handle_standard_args(Spdylay REQUIRED_VARS
32 | SPDYLAY_LIBRARY SPDYLAY_INCLUDE_DIR
33 | VERSION_VAR SPDYLAY_VERSION)
34 |
35 | if(SPDYLAY_FOUND)
36 | set(SPDYLAY_LIBRARIES ${SPDYLAY_LIBRARY})
37 | set(SPDYLAY_INCLUDE_DIRS ${SPDYLAY_INCLUDE_DIR})
38 | endif()
39 |
40 | mark_as_advanced(SPDYLAY_INCLUDE_DIR SPDYLAY_LIBRARY)
41 |
--------------------------------------------------------------------------------
/nghttp2/cmake/FindLibcares.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find libcares
2 | # Once done this will define
3 | # LIBCARES_FOUND - System has libcares
4 | # LIBCARES_INCLUDE_DIRS - The libcares include directories
5 | # LIBCARES_LIBRARIES - The libraries needed to use libcares
6 |
7 | find_package(PkgConfig QUIET)
8 | pkg_check_modules(PC_LIBCARES QUIET libcares)
9 |
10 | find_path(LIBCARES_INCLUDE_DIR
11 | NAMES ares.h
12 | HINTS ${PC_LIBCARES_INCLUDE_DIRS}
13 | )
14 | find_library(LIBCARES_LIBRARY
15 | NAMES cares
16 | HINTS ${PC_LIBCARES_LIBRARY_DIRS}
17 | )
18 |
19 | if(LIBCARES_INCLUDE_DIR)
20 | set(_version_regex "^#define[ \t]+ARES_VERSION_STR[ \t]+\"([^\"]+)\".*")
21 | file(STRINGS "${LIBCARES_INCLUDE_DIR}/ares_version.h"
22 | LIBCARES_VERSION REGEX "${_version_regex}")
23 | string(REGEX REPLACE "${_version_regex}" "\\1"
24 | LIBCARES_VERSION "${LIBCARES_VERSION}")
25 | unset(_version_regex)
26 | endif()
27 |
28 | include(FindPackageHandleStandardArgs)
29 | # handle the QUIETLY and REQUIRED arguments and set LIBCARES_FOUND to TRUE
30 | # if all listed variables are TRUE and the requested version matches.
31 | find_package_handle_standard_args(Libcares REQUIRED_VARS
32 | LIBCARES_LIBRARY LIBCARES_INCLUDE_DIR
33 | VERSION_VAR LIBCARES_VERSION)
34 |
35 | if(LIBCARES_FOUND)
36 | set(LIBCARES_LIBRARIES ${LIBCARES_LIBRARY})
37 | set(LIBCARES_INCLUDE_DIRS ${LIBCARES_INCLUDE_DIR})
38 | endif()
39 |
40 | mark_as_advanced(LIBCARES_INCLUDE_DIR LIBCARES_LIBRARY)
41 |
--------------------------------------------------------------------------------
/nghttp2/cmake/FindLibev.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find libev
2 | # Once done this will define
3 | # LIBEV_FOUND - System has libev
4 | # LIBEV_INCLUDE_DIRS - The libev include directories
5 | # LIBEV_LIBRARIES - The libraries needed to use libev
6 |
7 | find_path(LIBEV_INCLUDE_DIR
8 | NAMES ev.h
9 | )
10 | find_library(LIBEV_LIBRARY
11 | NAMES ev
12 | )
13 |
14 | if(LIBEV_INCLUDE_DIR)
15 | file(STRINGS "${LIBEV_INCLUDE_DIR}/ev.h"
16 | LIBEV_VERSION_MAJOR REGEX "^#define[ \t]+EV_VERSION_MAJOR[ \t]+[0-9]+")
17 | file(STRINGS "${LIBEV_INCLUDE_DIR}/ev.h"
18 | LIBEV_VERSION_MINOR REGEX "^#define[ \t]+EV_VERSION_MINOR[ \t]+[0-9]+")
19 | string(REGEX REPLACE "[^0-9]+" "" LIBEV_VERSION_MAJOR "${LIBEV_VERSION_MAJOR}")
20 | string(REGEX REPLACE "[^0-9]+" "" LIBEV_VERSION_MINOR "${LIBEV_VERSION_MINOR}")
21 | set(LIBEV_VERSION "${LIBEV_VERSION_MAJOR}.${LIBEV_VERSION_MINOR}")
22 | unset(LIBEV_VERSION_MINOR)
23 | unset(LIBEV_VERSION_MAJOR)
24 | endif()
25 |
26 | include(FindPackageHandleStandardArgs)
27 | # handle the QUIETLY and REQUIRED arguments and set LIBEV_FOUND to TRUE
28 | # if all listed variables are TRUE and the requested version matches.
29 | find_package_handle_standard_args(Libev REQUIRED_VARS
30 | LIBEV_LIBRARY LIBEV_INCLUDE_DIR
31 | VERSION_VAR LIBEV_VERSION)
32 |
33 | if(LIBEV_FOUND)
34 | set(LIBEV_LIBRARIES ${LIBEV_LIBRARY})
35 | set(LIBEV_INCLUDE_DIRS ${LIBEV_INCLUDE_DIR})
36 | endif()
37 |
38 | mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARY)
39 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_process.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_PROCESS_H
26 | #define SHRPX_PROCESS_H
27 |
28 | #include "shrpx.h"
29 |
30 | namespace shrpx {
31 |
32 | constexpr uint8_t SHRPX_IPC_REOPEN_LOG = 1;
33 | constexpr uint8_t SHRPX_IPC_GRACEFUL_SHUTDOWN = 2;
34 |
35 | } // namespace shrpx
36 |
37 | #endif // SHRPX_PROCESS_H
38 |
--------------------------------------------------------------------------------
/nghttp2/doc/_exts/sphinxcontrib/LICENSE.rubydomain:
--------------------------------------------------------------------------------
1 | If not otherwise noted, the extensions in this package are licensed
2 | under the following license.
3 |
4 | Copyright (c) 2010 by the contributors (see AUTHORS file).
5 | All rights reserved.
6 |
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are
9 | met:
10 |
11 | * Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | * Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/nghttp2/cmake/FindJemalloc.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find jemalloc
2 | # Once done this will define
3 | # JEMALLOC_FOUND - System has jemalloc
4 | # JEMALLOC_INCLUDE_DIRS - The jemalloc include directories
5 | # JEMALLOC_LIBRARIES - The libraries needed to use jemalloc
6 |
7 | find_package(PkgConfig QUIET)
8 | pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
9 |
10 | find_path(JEMALLOC_INCLUDE_DIR
11 | NAMES jemalloc/jemalloc.h
12 | HINTS ${PC_JEMALLOC_INCLUDE_DIRS}
13 | )
14 | find_library(JEMALLOC_LIBRARY
15 | NAMES jemalloc
16 | HINTS ${PC_JEMALLOC_LIBRARY_DIRS}
17 | )
18 |
19 | if(JEMALLOC_INCLUDE_DIR)
20 | set(_version_regex "^#define[ \t]+JEMALLOC_VERSION[ \t]+\"([^\"]+)\".*")
21 | file(STRINGS "${JEMALLOC_INCLUDE_DIR}/jemalloc/jemalloc.h"
22 | JEMALLOC_VERSION REGEX "${_version_regex}")
23 | string(REGEX REPLACE "${_version_regex}" "\\1"
24 | JEMALLOC_VERSION "${JEMALLOC_VERSION}")
25 | unset(_version_regex)
26 | endif()
27 |
28 | include(FindPackageHandleStandardArgs)
29 | # handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
30 | # if all listed variables are TRUE and the requested version matches.
31 | find_package_handle_standard_args(Jemalloc REQUIRED_VARS
32 | JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR
33 | VERSION_VAR JEMALLOC_VERSION)
34 |
35 | if(JEMALLOC_FOUND)
36 | set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
37 | set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
38 | endif()
39 |
40 | mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY)
41 |
--------------------------------------------------------------------------------
/nghttp2/src/test.nghttp2.org.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIEDjCCAvagAwIBAgIUQBCY8Nre85JT1c7P+HbXUF9yzg8wDQYJKoZIhvcNAQEL
3 | BQAwXjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoT
4 | GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMOY2EubmdodHRwMi5v
5 | cmcwHhcNMTYwNjI1MDkzMzAwWhcNMjYwNjIzMDkzMzAwWjBkMQswCQYDVQQGEwJB
6 | VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0
7 | cyBQdHkgTHRkMR0wGwYDVQQDExRub3QtdXNlZC5uZ2h0dHAyLm9yZzCCASIwDQYJ
8 | KoZIhvcNAQEBBQADggEPADCCAQoCggEBAO6eiimt3LUvkq/539rkyjbU7Ibg1c07
9 | AU22hsnY/KtGA5k95wpzj1l77xtTfoyb+aXAFzdmZ1fVKRodzeYPwmkXBU4EEPKP
10 | jZQl2AXTyFwCfipG8ZYpg8N5/cSF33i+vldkLjza6oep9t8cA4OW6CmjZKX+1+Tq
11 | 409T4ee0hH19aKdxl28JAD9vt1pccWGLNIbUatoB/e6vSeDJYRzw2qYvrihrPtm9
12 | culMYH+Jw+YxFnT5slanirPn0+I2tp/t4Lo6XTqNpYOdOKedIC+Mz/M4QJXKpUAp
13 | niRi9cRcwrZtsB0KO+lx0lnGuKSe68X9qCHbRO4pL4BZU1V5xtU90xECAwEAAaOB
14 | vTCBujAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0T
15 | AQH/BAIwADAdBgNVHQ4EFgQUGlxgxowH6jrQiyyFpCbwPkCXXIYwHwYDVR0jBBgw
16 | FoAU0DnFVHVlxrFEkv1ULqnO4ua924YwRQYDVR0RBD4wPIIQVEVTVC5OR0hUVFAy
17 | Lk9SR4ISKi50ZXN0Lm5naHR0cDIub3JnghR3KncudGVzdC5uZ2h0dHAyLm9yZzAN
18 | BgkqhkiG9w0BAQsFAAOCAQEANCqM6ocfqOpgDEHYOOQTGFHJIptQhS3kRYAdTIo2
19 | G8XvGCoy+CDYe1GAUWbxE090+a1I1rsYMHcWKJnjKaCBZid7KMhyayIvrmgEsOCh
20 | L8iLf3bxkCoyIAmCpxJwa3LMxm2QQLtRx8AoMXWf+N8are4HY6MLNn6aP4zaTrTZ
21 | H+WkjKIh7WjSHtW/ro666PCXJDCCdRXljOf8v/fff3bYiLg8o70RBp7OFM0HaPtK
22 | wCfcLLxBeoVIncWswB6GtVUFhLeGjepDzWpuDHOdw6DtpghwSXvWFu9bRtl+x02m
23 | LAGfJ0kJrpYGfr9UB51NFX3aM/D3p2zxrjKwR2b59vJEcA==
24 | -----END CERTIFICATE-----
25 |
--------------------------------------------------------------------------------
/nghttp2/src/base64_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2016 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef BASE64_TEST_H
26 | #define BASE64_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | namespace nghttp2 {
33 |
34 | void test_base64_encode(void);
35 | void test_base64_decode(void);
36 |
37 | } // namespace nghttp2
38 |
39 | #endif // BASE64_TEST_H
40 |
--------------------------------------------------------------------------------
/nghttp2/tests/nghttp2_pq_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_PQ_TEST_H
26 | #define NGHTTP2_PQ_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | void test_nghttp2_pq(void);
33 | void test_nghttp2_pq_update(void);
34 | void test_nghttp2_pq_remove(void);
35 |
36 | #endif /* NGHTTP2_PQ_TEST_H */
37 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_worker_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2016 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_WORKER_TEST_H
26 | #define SHRPX_WORKER_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | namespace shrpx {
33 |
34 | void test_shrpx_worker_match_downstream_addr_group(void);
35 |
36 | } // namespace shrpx
37 |
38 | #endif // SHRPX_WORKER_TEST_H
39 |
--------------------------------------------------------------------------------
/nghttp2/tests/nghttp2_map_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_MAP_TEST_H
26 | #define NGHTTP2_MAP_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | void test_nghttp2_map(void);
33 | void test_nghttp2_map_functional(void);
34 | void test_nghttp2_map_each_free(void);
35 |
36 | #endif /* NGHTTP2_MAP_TEST_H */
37 |
--------------------------------------------------------------------------------
/nghttp2/src/template_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2016 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef TEMPLATE_TEST_H
26 | #define TEMPLATE_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | namespace nghttp2 {
33 |
34 | void test_template_immutable_string(void);
35 | void test_template_string_ref(void);
36 |
37 | } // namespace nghttp2
38 |
39 | #endif // TEMPLATE_TEST_H
40 |
--------------------------------------------------------------------------------
/nghttp2/doc/_themes/sphinx_rtd_theme/breadcrumbs.html:
--------------------------------------------------------------------------------
1 | {# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
2 |
3 | {% if page_source_suffix %}
4 | {% set suffix = page_source_suffix %}
5 | {% else %}
6 | {% set suffix = source_suffix %}
7 | {% endif %}
8 |
9 |
17 | {% if pagename != "search" %}
18 | {% if display_github %}
19 | Edit on GitHub
20 | {% elif display_bitbucket %}
21 | Edit on Bitbucket
22 | {% elif show_source and source_url_prefix %}
23 | View page source
24 | {% elif show_source and has_source and sourcename %}
25 | View page source
26 | {% endif %}
27 | {% endif %}
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_router_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2016 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_ROUTER_TEST_H
26 | #define SHRPX_ROUTER_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | namespace shrpx {
33 |
34 | void test_shrpx_router_match(void);
35 | void test_shrpx_router_match_prefix(void);
36 |
37 | } // namespace shrpx
38 |
39 | #endif // SHRPX_ROUTER_TEST_H
40 |
--------------------------------------------------------------------------------
/nghttp2/src/nghttp2_gzip_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_GZIP_TEST_H
26 | #define NGHTTP2_GZIP_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif
35 |
36 | void test_nghttp2_gzip_inflate(void);
37 |
38 | #ifdef __cplusplus
39 | }
40 | #endif
41 |
42 | #endif /* NGHTTP2_GZIP_TEST_H */
43 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_http_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2016 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_HTTP_TEST_H
26 | #define SHRPX_HTTP_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | namespace shrpx {
33 |
34 | void test_shrpx_http_create_forwarded(void);
35 | void test_shrpx_http_create_via_header_value(void);
36 |
37 | } // namespace shrpx
38 |
39 | #endif // SHRPX_HTTP_TEST_H
40 |
--------------------------------------------------------------------------------
/nghttp2/tests/nghttp2_helper_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2013 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef NGHTTP2_HELPER_TEST_H
26 | #define NGHTTP2_HELPER_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | void test_nghttp2_adjust_local_window_size(void);
33 | void test_nghttp2_check_header_name(void);
34 | void test_nghttp2_check_header_value(void);
35 |
36 | #endif /* NGHTTP2_HELPER_TEST_H */
37 |
--------------------------------------------------------------------------------
/nghttp2/cmake/FindCython.cmake:
--------------------------------------------------------------------------------
1 | # Find the Cython compiler.
2 | #
3 | # This code sets the following variables:
4 | #
5 | # CYTHON_EXECUTABLE
6 | #
7 | # See also UseCython.cmake
8 |
9 | #=============================================================================
10 | # Copyright 2011 Kitware, Inc.
11 | #
12 | # Licensed under the Apache License, Version 2.0 (the "License");
13 | # you may not use this file except in compliance with the License.
14 | # You may obtain a copy of the License at
15 | #
16 | # http://www.apache.org/licenses/LICENSE-2.0
17 | #
18 | # Unless required by applicable law or agreed to in writing, software
19 | # distributed under the License is distributed on an "AS IS" BASIS,
20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | # See the License for the specific language governing permissions and
22 | # limitations under the License.
23 | #=============================================================================
24 |
25 | # Use the Cython executable that lives next to the Python executable
26 | # if it is a local installation.
27 | find_package( PythonInterp )
28 | if( PYTHONINTERP_FOUND )
29 | get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
30 | find_program( CYTHON_EXECUTABLE
31 | NAMES cython cython.bat cython3
32 | HINTS ${_python_path}
33 | )
34 | else()
35 | find_program( CYTHON_EXECUTABLE
36 | NAMES cython cython.bat cython3
37 | )
38 | endif()
39 |
40 |
41 | include( FindPackageHandleStandardArgs )
42 | FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )
43 |
44 | mark_as_advanced( CYTHON_EXECUTABLE )
45 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_mruby_module_env.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_MRUBY_MODULE_ENV_H
26 | #define SHRPX_MRUBY_MODULE_ENV_H
27 |
28 | #include "shrpx.h"
29 |
30 | #include
31 |
32 | namespace shrpx {
33 |
34 | namespace mruby {
35 |
36 | void init_env_class(mrb_state *mrb, RClass *module);
37 |
38 | } // namespace mruby
39 |
40 | } // namespace shrpx
41 |
42 | #endif // SHRPX_MRUBY_MODULE_ENV_H
43 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_mruby_module_request.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_MRUBY_MODULE_REQUEST_H
26 | #define SHRPX_MRUBY_MODULE_REQUEST_H
27 |
28 | #include "shrpx.h"
29 |
30 | #include
31 |
32 | namespace shrpx {
33 |
34 | namespace mruby {
35 |
36 | void init_request_class(mrb_state *mrb, RClass *module);
37 |
38 | } // namespace mruby
39 |
40 | } // namespace shrpx
41 |
42 | #endif // SHRPX_MRUBY_MODULE_REQUEST_H
43 |
--------------------------------------------------------------------------------
/nghttp2/genmethodfunc.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | from __future__ import unicode_literals
3 | from io import StringIO
4 |
5 | from gentokenlookup import gentokenlookup
6 |
7 | # copied from http-parser/http_parser.h, and stripped trailing spaces
8 | # and backslashes.
9 | SRC = '''
10 | XX(0, DELETE, DELETE)
11 | XX(1, GET, GET)
12 | XX(2, HEAD, HEAD)
13 | XX(3, POST, POST)
14 | XX(4, PUT, PUT)
15 | /* pathological */
16 | XX(5, CONNECT, CONNECT)
17 | XX(6, OPTIONS, OPTIONS)
18 | XX(7, TRACE, TRACE)
19 | /* webdav */
20 | XX(8, COPY, COPY)
21 | XX(9, LOCK, LOCK)
22 | XX(10, MKCOL, MKCOL)
23 | XX(11, MOVE, MOVE)
24 | XX(12, PROPFIND, PROPFIND)
25 | XX(13, PROPPATCH, PROPPATCH)
26 | XX(14, SEARCH, SEARCH)
27 | XX(15, UNLOCK, UNLOCK)
28 | /* subversion */
29 | XX(16, REPORT, REPORT)
30 | XX(17, MKACTIVITY, MKACTIVITY)
31 | XX(18, CHECKOUT, CHECKOUT)
32 | XX(19, MERGE, MERGE)
33 | /* upnp */
34 | XX(20, MSEARCH, M-SEARCH)
35 | XX(21, NOTIFY, NOTIFY)
36 | XX(22, SUBSCRIBE, SUBSCRIBE)
37 | XX(23, UNSUBSCRIBE, UNSUBSCRIBE)
38 | /* RFC-5789 */
39 | XX(24, PATCH, PATCH)
40 | XX(25, PURGE, PURGE)
41 | /* CalDAV */
42 | XX(26, MKCALENDAR, MKCALENDAR)
43 | '''
44 |
45 | if __name__ == '__main__':
46 | methods = []
47 | for line in StringIO(SRC):
48 | line = line.strip()
49 | if not line.startswith('XX'):
50 | continue
51 | _, m, _ = line.split(',', 2)
52 | methods.append(m.strip())
53 | gentokenlookup(methods, 'HTTP')
54 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_mruby_module_response.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2015 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_MRUBY_MODULE_RESPONSE_H
26 | #define SHRPX_MRUBY_MODULE_RESPONSE_H
27 |
28 | #include "shrpx.h"
29 |
30 | #include
31 |
32 | namespace shrpx {
33 |
34 | namespace mruby {
35 |
36 | void init_response_class(mrb_state *mrb, RClass *module);
37 |
38 | } // namespace mruby
39 |
40 | } // namespace shrpx
41 |
42 | #endif // SHRPX_MRUBY_MODULE_RESPONSE_H
43 |
--------------------------------------------------------------------------------
/nghttp2/tests/failmalloc_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef FAILMALLOC_TEST_H
26 | #define FAILMALLOC_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif /* HAVE_CONFIG_H */
31 |
32 | void test_nghttp2_session_send(void);
33 | void test_nghttp2_session_send_server(void);
34 | void test_nghttp2_session_recv(void);
35 | void test_nghttp2_frame(void);
36 | void test_nghttp2_hd(void);
37 |
38 | #endif /* FAILMALLOC_TEST_H */
39 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_ssl_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2013 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_SSL_TEST_H
26 | #define SHRPX_SSL_TEST_H
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include
30 | #endif // HAVE_CONFIG_H
31 |
32 | namespace shrpx {
33 |
34 | void test_shrpx_ssl_create_lookup_tree(void);
35 | void test_shrpx_ssl_cert_lookup_tree_add_ssl_ctx(void);
36 | void test_shrpx_ssl_tls_hostname_match(void);
37 |
38 | } // namespace shrpx
39 |
40 | #endif // SHRPX_SSL_TEST_H
41 |
--------------------------------------------------------------------------------
/nghttp2/examples/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(ENABLE_EXAMPLES)
2 | file(GLOB c_sources *.c)
3 | set_source_files_properties(${c_sources} PROPERTIES
4 | COMPILE_FLAGS "${WARNCFLAGS}")
5 | file(GLOB cxx_sources *.cc)
6 | set_source_files_properties(${cxx_sources} PROPERTIES
7 | COMPILE_FLAGS "${WARNCXXFLAGS} ${CXX1XCXXFLAGS}")
8 |
9 | include_directories(
10 | ${CMAKE_SOURCE_DIR}
11 | ${CMAKE_SOURCE_DIR}/lib/includes
12 | ${CMAKE_BINARY_DIR}/lib/includes
13 | ${CMAKE_SOURCE_DIR}/src/includes
14 | ${CMAKE_SOURCE_DIR}/third-party
15 |
16 | ${LIBEVENT_INCLUDE_DIRS}
17 | ${OPENSSL_INCLUDE_DIRS}
18 | )
19 |
20 | link_libraries(
21 | nghttp2
22 | ${LIBEVENT_OPENSSL_LIBRARIES}
23 | ${OPENSSL_LIBRARIES}
24 | ${APP_LIBRARIES}
25 | )
26 |
27 | add_executable(client client.c $)
28 | add_executable(libevent-client libevent-client.c $)
29 | add_executable(libevent-server libevent-server.c $)
30 | add_executable(deflate deflate.c $)
31 |
32 | if(ENABLE_ASIO_LIB)
33 | foreach(name asio-sv asio-sv2 asio-cl asio-cl2)
34 | add_executable(${name} ${name}.cc $)
35 | target_include_directories(${name} PRIVATE
36 | ${OPENSSL_INCLUDE_DIRS}
37 | ${Boost_INCLUDE_DIRS}
38 | )
39 | target_link_libraries(${name}
40 | nghttp2
41 | nghttp2_asio
42 | ${JEMALLOC_LIBRARIES}
43 | ${OPENSSL_LIBRARIES}
44 | ${Boost_LIBRARIES}
45 | ${APP_LIBRARIES}
46 | )
47 | endforeach()
48 | endif()
49 | endif()
50 |
--------------------------------------------------------------------------------
/nghttp2/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # XXX testdata/: EXTRA_DIST = cacert.pem index.html privkey.pem
2 | if(HAVE_CUNIT)
3 | string(REPLACE " " ";" c_flags "${WARNCFLAGS}")
4 | add_compile_options(${c_flags})
5 |
6 | include_directories(
7 | "${CMAKE_SOURCE_DIR}/lib/includes"
8 | "${CMAKE_SOURCE_DIR}/lib"
9 | "${CMAKE_SOURCE_DIR}/src/includes"
10 | "${CMAKE_BINARY_DIR}/lib/includes"
11 | ${CUNIT_INCLUDE_DIRS}
12 | )
13 |
14 | set(MAIN_SOURCES
15 | main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c
16 | nghttp2_test_helper.c
17 | nghttp2_frame_test.c
18 | nghttp2_stream_test.c
19 | nghttp2_session_test.c
20 | nghttp2_hd_test.c
21 | nghttp2_npn_test.c
22 | nghttp2_helper_test.c
23 | nghttp2_buf_test.c
24 | )
25 |
26 | add_executable(main EXCLUDE_FROM_ALL
27 | ${MAIN_SOURCES}
28 | )
29 | target_include_directories(main PRIVATE ${CUNIT_INCLUDE_DIRS})
30 | target_link_libraries(main
31 | nghttp2_static
32 | ${CUNIT_LIBRARIES}
33 | )
34 | add_test(main main)
35 | add_dependencies(check main)
36 |
37 | if(ENABLE_FAILMALLOC)
38 | set(FAILMALLOC_SOURCES
39 | failmalloc.c failmalloc_test.c
40 | malloc_wrapper.c
41 | nghttp2_test_helper.c
42 | )
43 | add_executable(failmalloc EXCLUDE_FROM_ALL
44 | ${FAILMALLOC_SOURCES}
45 | )
46 | target_link_libraries(failmalloc
47 | nghttp2_static
48 | ${CUNIT_LIBRARIES}
49 | )
50 | add_test(failmalloc failmalloc)
51 | add_dependencies(check failmalloc)
52 | endif()
53 |
54 | if(ENABLE_APP)
55 | # EXTRA_DIST = end_to_end.py
56 | # TESTS += end_to_end.py
57 | endif()
58 | endif()
59 |
--------------------------------------------------------------------------------
/nghttp2/lib/nghttp2_version.c:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012, 2013 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifdef HAVE_CONFIG_H
26 | #include
27 | #endif /* HAVE_CONFIG_H */
28 |
29 | #include
30 |
31 | static nghttp2_info version = {NGHTTP2_VERSION_AGE, NGHTTP2_VERSION_NUM,
32 | NGHTTP2_VERSION, NGHTTP2_PROTO_VERSION_ID};
33 |
34 | nghttp2_info *nghttp2_version(int least_version) {
35 | if (least_version > NGHTTP2_VERSION_NUM)
36 | return NULL;
37 | return &version;
38 | }
39 |
--------------------------------------------------------------------------------
/nghttp2/author.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # script to extract commit author's name from standard input. The
4 | # input should be :, one per line.
5 | # This script expects the input is created by git-log command:
6 | #
7 | # git log --format=%aN:%aE
8 | #
9 | # This script removes duplicates based on email address, breaking a
10 | # tie with longer author name. Among the all author names extract the
11 | # previous step, we remove duplicate by case-insensitive match.
12 | #
13 | # So we can do this in one line:
14 | #
15 | # git log --format=%aN:%aE | sort | uniq | ./author.py > authors
16 |
17 | import sys
18 |
19 | edict = {}
20 |
21 | for line in sys.stdin:
22 | author, email = line.strip().split(':', 1)
23 | if email in edict:
24 | an = edict[email]
25 | if len(an) < len(author) or an > author:
26 | sys.stderr.write(
27 | 'eliminated {} in favor of {}\n'.format(an, author))
28 | edict[email] = author
29 | else:
30 | sys.stderr.write(
31 | 'eliminated {} in favor of {}\n'.format(author, an))
32 | else:
33 | edict[email] = author
34 |
35 | names = list(sorted(edict.values()))
36 |
37 | ndict = {}
38 |
39 | for name in names:
40 | lowname = name.lower()
41 | if lowname in ndict:
42 | an = ndict[lowname]
43 | if an > name:
44 | sys.stderr.write('eliminated {} in favor of {}\n'.format(an, name))
45 | ndict[lowname] = name
46 | else:
47 | sys.stderr.write('eliminated {} in favor of {}\n'.format(name, an))
48 | else:
49 | ndict[lowname] = name
50 |
51 | for name in sorted(ndict.values()):
52 | print name
53 |
--------------------------------------------------------------------------------
/nghttp2/src/ssl_compat.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2016 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef OPENSSL_COMPAT_H
26 |
27 | #include
28 |
29 | #if defined(LIBRESSL_VERSION_NUMBER)
30 | #define LIBRESSL_IN_USE 1
31 | #else // !defined(LIBRESSL_VERSION_NUMBER)
32 | #define LIBRESSL_IN_USE 0
33 | #endif // !defined(LIBRESSL_VERSION_NUMBER)
34 |
35 | #define OPENSSL_1_1_API \
36 | (!LIBRESSL_IN_USE && OPENSSL_VERSION_NUMBER >= 0x1010000fL)
37 |
38 | #endif // OPENSSL_COMPAT_H
39 |
--------------------------------------------------------------------------------
/nghttp2/src/shrpx_error.h:
--------------------------------------------------------------------------------
1 | /*
2 | * nghttp2 - HTTP/2 C Library
3 | *
4 | * Copyright (c) 2012 Tatsuhiro Tsujikawa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining
7 | * a copy of this software and associated documentation files (the
8 | * "Software"), to deal in the Software without restriction, including
9 | * without limitation the rights to use, copy, modify, merge, publish,
10 | * distribute, sublicense, and/or sell copies of the Software, and to
11 | * permit persons to whom the Software is furnished to do so, subject to
12 | * the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be
15 | * included in all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 | */
25 | #ifndef SHRPX_ERROR_H
26 | #define SHRPX_ERROR_H
27 |
28 | #include "shrpx.h"
29 |
30 | namespace shrpx {
31 |
32 | // Deprecated, do not use.
33 | enum ErrorCode {
34 | SHRPX_ERR_SUCCESS = 0,
35 | SHRPX_ERR_ERROR = -1,
36 | SHRPX_ERR_NETWORK = -100,
37 | SHRPX_ERR_EOF = -101,
38 | SHRPX_ERR_INPROGRESS = -102,
39 | SHRPX_ERR_DCONN_CANCELED = -103,
40 | SHRPX_ERR_RETRY = -104,
41 | SHRPX_ERR_TLS_REQUIRED = -105,
42 | };
43 |
44 | } // namespace shrpx
45 |
46 | #endif // SHRPX_ERROR_H
47 |
--------------------------------------------------------------------------------
/nghttp2/doc/_themes/sphinx_rtd_theme/search.html:
--------------------------------------------------------------------------------
1 | {#
2 | basic/search.html
3 | ~~~~~~~~~~~~~~~~~
4 |
5 | Template for the search page.
6 |
7 | :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
8 | :license: BSD, see LICENSE for details.
9 | #}
10 | {%- extends "layout.html" %}
11 | {% set title = _('Search') %}
12 | {% set script_files = script_files + ['_static/searchtools.js'] %}
13 | {% block footer %}
14 |
17 | {# this is used when loading the search index using $.ajax fails,
18 | such as on Chrome for documents on localhost #}
19 |
20 | {{ super() }}
21 | {% endblock %}
22 | {% block body %}
23 |
31 |
32 | {% if search_performed %}
33 |
{{ _('Search Results') }}
34 | {% if not search_results %}
35 |
{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}
36 | {% endif %}
37 | {% endif %}
38 |
39 | {% if search_results %}
40 |
41 | {% for href, caption, context in search_results %}
42 |