Compare commits

...

168 Commits

Author SHA1 Message Date
George Sokianos c2a039f23f Makefile to build for AmigaOS 4 2023-01-05 23:07:36 +00:00
Tatsuhiro Tsujikawa 05b7929019
Merge pull request #1849 from nghttp2/remove-unused-function
Remove unused function
2022-12-26 21:31:57 +09:00
Tatsuhiro Tsujikawa 5b665b3e48
Merge pull request #1848 from nghttp2/remove-src-includes
Remove src/includes
2022-12-26 21:20:51 +09:00
Tatsuhiro Tsujikawa 5089dcd3f2
Merge pull request #1847 from nghttp2/bump-zlib
Bump zlib to 1.2.13
2022-12-26 20:52:27 +09:00
Tatsuhiro Tsujikawa b52f96d38a Remove unused function 2022-12-26 19:49:28 +09:00
Tatsuhiro Tsujikawa 2ca0bb0a2f Remove src/includes 2022-12-26 19:45:33 +09:00
Tatsuhiro Tsujikawa fa3d1bfc8f Bump zlib to 1.2.13 2022-12-26 19:40:26 +09:00
Tatsuhiro Tsujikawa 30bb4eb8f2
Merge pull request #1846 from nghttp2/remove-python
Remove deprecated python bindings
2022-12-26 19:38:53 +09:00
Tatsuhiro Tsujikawa b4cb3b0090 Remove deprecated python bindings 2022-12-26 17:06:36 +09:00
Tatsuhiro Tsujikawa 2c62572ae1
Merge pull request #1844 from nghttp2/remove-libnghttp2_asio
Remove deprecated libnghttp2_asio
2022-12-26 17:05:44 +09:00
Tatsuhiro Tsujikawa 42904a586c
Merge pull request #1845 from nghttp2/minor-cleanup
Minor cleanup
2022-12-25 18:00:51 +09:00
Tatsuhiro Tsujikawa 8538e1ec42 Minor cleanup 2022-12-25 17:28:08 +09:00
Tatsuhiro Tsujikawa e6d608b522 Remove deprecated libnghttp2_asio 2022-12-24 18:41:49 +09:00
Tatsuhiro Tsujikawa 00a33281be
Merge pull request #1843 from nghttp2/bump-ngtcp2
Bump ngtcp2 dependencies
2022-12-24 17:35:35 +09:00
Tatsuhiro Tsujikawa 7c7ba0586e Bump ngtcp2 dependencies 2022-12-24 16:35:11 +09:00
Tatsuhiro Tsujikawa 252c425ea6
Merge pull request #1837 from fredizzimo/fix-libevent-component
Don't use the unofficial libevent component
2022-12-23 21:35:54 +09:00
Fred Sundvik 525630ae7a Don't use the unofficial libevent component 2022-12-07 16:36:58 +02:00
Tatsuhiro Tsujikawa 5195e8be6a
Merge pull request #1835 from nghttp2/integration-lint
integration: Fix lint errors
2022-11-24 19:05:51 +09:00
Tatsuhiro Tsujikawa 358c15e015 integration: Fix lint errors 2022-11-20 19:14:27 +09:00
Tatsuhiro Tsujikawa b5b18699cb
Merge pull request #1834 from nghttp2/integration-http-status-code
integration: Use HTTP status code constants
2022-11-20 19:12:43 +09:00
Tatsuhiro Tsujikawa 44e4475a31 integration: Use HTTP status code constants 2022-11-20 17:46:46 +09:00
Tatsuhiro Tsujikawa a945c057c5
Merge pull request #1833 from nghttp2/integration-h3
Integration h3
2022-11-20 17:46:17 +09:00
Tatsuhiro Tsujikawa babeddb649 nghttpx: HTTPS redirect should not happen with HTTP/3 upstream 2022-11-20 17:03:30 +09:00
Tatsuhiro Tsujikawa 2d790edac5 integration: Add http3 test which verifies chunked encoding ends prematurely 2022-11-20 16:55:58 +09:00
Tatsuhiro Tsujikawa 2bef60a6f4 integration: Add http3 test which verifies response ends before request 2022-11-20 16:53:34 +09:00
Tatsuhiro Tsujikawa 17e3bb4ec5 integration: Add http3 mruby tests 2022-11-20 16:35:54 +09:00
Tatsuhiro Tsujikawa 5e1b1a0883 integration: Add http3 affinity cookie test 2022-11-20 16:31:24 +09:00
Tatsuhiro Tsujikawa 5b0cbb4892 integration: Add http3 HTTPS redirect test 2022-11-20 16:28:16 +09:00
Tatsuhiro Tsujikawa 17a5ba4969 integration: Add http3 response content-length test 2022-11-20 15:12:19 +09:00
Tatsuhiro Tsujikawa 20d95edc57 integration: Add http3 via tests 2022-11-20 15:04:01 +09:00
Tatsuhiro Tsujikawa 126b5f9d2b Add the missing file 2022-11-20 15:03:41 +09:00
Tatsuhiro Tsujikawa 46602a961d Bump package version 2022-11-13 15:59:20 +09:00
Tatsuhiro Tsujikawa 00399695cb Update manual pages 2022-11-13 14:51:12 +09:00
Tatsuhiro Tsujikawa f8e014de40 Bump package and library versions 2022-11-13 14:40:42 +09:00
Tatsuhiro Tsujikawa 172159305c Update AUTHORS 2022-11-13 14:39:10 +09:00
Tatsuhiro Tsujikawa aa607875b0
Merge pull request #1832 from nghttp2/h3-integration-test
Add http3 integration test
2022-11-13 10:58:10 +09:00
Tatsuhiro Tsujikawa 954d49f7a0 Add http3 integration test 2022-11-12 19:39:25 +09:00
Tatsuhiro Tsujikawa 5929aeb47c
Merge pull request #1831 from nghttp2/bump-ngtcp2
Bump ngtcp2
2022-11-12 18:05:29 +09:00
Tatsuhiro Tsujikawa b990df49d6 Bump boringssl 2022-11-12 16:46:36 +09:00
Tatsuhiro Tsujikawa 2aa9d61ae2 Bump ngtcp2 to v0.11.0 2022-11-12 16:46:24 +09:00
Tatsuhiro Tsujikawa 0fb2c6f4f4
Merge pull request #1830 from nghttp2/bump-libbpf
Bump libbpf to v1.0.1
2022-11-12 16:43:19 +09:00
Tatsuhiro Tsujikawa 1c9817af0d Bump libbpf to v1.0.1 2022-11-12 16:13:03 +09:00
Tatsuhiro Tsujikawa bea6cae0d5
Merge pull request #1829 from nghttp2/disable-python-bindings
Disable python bindings
2022-11-11 19:29:56 +09:00
Tatsuhiro Tsujikawa 804ce364bf Disable python bindings properly by default
Disable python bindings properly by default.  This commit amends
b63705384a.
2022-11-11 18:55:01 +09:00
Tatsuhiro Tsujikawa 83d7fb7fdd Revert "workflow: Disable python bindings"
This reverts commit ddd40bae06.
2022-11-11 18:52:44 +09:00
Tatsuhiro Tsujikawa 266a3d84e4
Merge pull request #1828 from nghttp2/bump-openssl
Bump OpenSSL versions
2022-11-09 18:57:52 +09:00
Tatsuhiro Tsujikawa e91de24be6
Merge pull request #1827 from nghttp2/bump-llhttp
Bump llhttp
2022-11-09 18:48:52 +09:00
Tatsuhiro Tsujikawa b062e9f66c Bump OpenSSL versions 2022-11-09 18:05:55 +09:00
Tatsuhiro Tsujikawa f56448be60 Deal with llhttp incompatible changes 2022-11-09 18:05:14 +09:00
Tatsuhiro Tsujikawa 17aa7b6a61 Bump llhttp to 85dd446419966cafb5a7fdd5031e3113a0768e65 2022-11-09 18:04:54 +09:00
Tatsuhiro Tsujikawa 971d3552c7
Merge pull request #1826 from nghttp2/workflow-disable-python-bindings
workflow: Disable python bindings
2022-11-09 17:37:37 +09:00
Tatsuhiro Tsujikawa ddd40bae06 workflow: Disable python bindings
Disable python bindings because it has been deprecated, and mac OS
build with python binding is broken.
2022-11-09 16:54:19 +09:00
Tatsuhiro Tsujikawa cb11cfcd2c
Merge pull request #1822 from vszakats/warnfix
add casts to silence implicit conversion warnings
2022-10-20 20:50:51 +09:00
Viktor Szakats 5eed83ee17
add casts to silence implicit conversion warnings
Fixes #1821
2022-10-19 11:57:31 +00:00
Tatsuhiro Tsujikawa 11632d3c2c
Merge pull request #1819 from nghttp2/bump-ngtcp2
Bump ngtcp2
2022-10-18 22:35:47 +09:00
Tatsuhiro Tsujikawa 8c70d9c2e1 Bump ngtcp2 2022-10-18 21:11:14 +09:00
Tatsuhiro Tsujikawa 3b21fbaf03
Merge pull request #1818 from nghttp2/fix-nghttpx-affinity-cookie-stickiness
nghttpx: Fix affinity-cookie-stickiness parameter handling
2022-10-18 17:45:25 +09:00
Tatsuhiro Tsujikawa 5abafb4268 nghttpx: Fix affinity-cookie-stickiness parameter handling
Fix affinity-cookie-stickiness backend parameter handling.
Previously, if 3 backend options are used for the same pattern, and
the first one does not have affinity-cookie-stickiness, and the rest
of them have affinity-cookie-stickiness=strict, nghttpx wrongly
determines that they have inconsistent configurations.
2022-10-18 17:17:44 +09:00
Tatsuhiro Tsujikawa 2f71f5c3c9
Merge pull request #1816 from nghttp2/update-doc
Update doc
2022-10-16 16:49:06 +09:00
Tatsuhiro Tsujikawa 3f65ab7871 Update doc
Remove outdated text
2022-10-16 16:09:43 +09:00
Tatsuhiro Tsujikawa 8e120de5bd
Merge pull request #1814 from nghttp2/workflow-bump-compilers
Workflow bump compilers
2022-10-04 21:47:39 +09:00
Tatsuhiro Tsujikawa 8a355db8d9 Fix compile error with gcc-12 2022-10-04 17:58:15 +09:00
Tatsuhiro Tsujikawa 93f1096de3
Merge pull request #1813 from nghttp2/test-fix-tz
Fix test failure on Linux if tz database is not available
2022-10-04 17:48:32 +09:00
Tatsuhiro Tsujikawa f190afd0c0
Merge pull request #1812 from nghttp2/update-ubuntu-packages
Update Ubuntu packages based on Ubuntu 22.04
2022-10-04 17:19:54 +09:00
Tatsuhiro Tsujikawa ebef6b5ced workflow: Bump compilers 2022-10-04 17:12:15 +09:00
Tatsuhiro Tsujikawa 6c45e943b0
Merge pull request #1811 from nghttp2/disable-python
Disable python bindings by default because it has been deprecated
2022-10-04 17:08:40 +09:00
Tatsuhiro Tsujikawa 61caf66f1b Fix test failure on Linux if tz database is not available 2022-10-04 16:47:51 +09:00
Tatsuhiro Tsujikawa c56cda058e Update Ubuntu packages based on Ubuntu 22.04 2022-10-04 16:07:53 +09:00
Tatsuhiro Tsujikawa b63705384a Disable python bindings by default because it has been deprecated 2022-10-04 16:04:43 +09:00
Tatsuhiro Tsujikawa 7380ff3551
Merge pull request #1809 from nghttp2/update-doc-h2-rfc
Update README to mention new HTTP/2 RFC
2022-10-02 12:53:13 +09:00
Tatsuhiro Tsujikawa bfba6764e0 Update README to mention new HTTP/2 RFC 2022-10-02 12:18:41 +09:00
Tatsuhiro Tsujikawa 634e65df64
Merge pull request #1807 from nghttp2/nghttpx-add-missing-exit
nghttpx: Add missing DIE()
2022-09-27 23:13:25 +09:00
Tatsuhiro Tsujikawa 011fbf7f10 nghttpx: Add missing DIE() 2022-09-27 22:23:13 +09:00
Tatsuhiro Tsujikawa 0363606924
Merge pull request #1806 from nghttp2/update-android-build-doc
Update android build documentation
2022-09-26 17:50:42 +09:00
Tatsuhiro Tsujikawa 40c7922386 Update android build documentation 2022-09-26 17:12:03 +09:00
Tatsuhiro Tsujikawa 958d9ac63b
Merge pull request #1805 from nghttp2/dockerfile-android-improvements
Dockerfile android improvements
2022-09-26 17:05:59 +09:00
Tatsuhiro Tsujikawa c06f1e9974 Remove --with-xml-prefix 2022-09-26 16:24:53 +09:00
Tatsuhiro Tsujikawa d3381233b1 Do not create OpenSSL shared library 2022-09-26 16:24:53 +09:00
Tatsuhiro Tsujikawa 6d88da58f1 PATH is required by OpenSSL only 2022-09-26 16:24:53 +09:00
Tatsuhiro Tsujikawa 77449a9477
Merge pull request #1804 from nghttp2/update-dockerfile-android
Bump NDK and others to the latest
2022-09-26 00:06:18 +09:00
Tatsuhiro Tsujikawa 116feb4a8c Bump NDK and others to the latest
The latest nghttp2 release version cannot be built with the latest
NDK.  The nghttp2 version in Dockerfile points to master for now.
2022-09-25 23:23:48 +09:00
Tatsuhiro Tsujikawa dd63d1df42
Merge pull request #1802 from PufferBlue/patch-1
Update dependency versions for Dockerfile.android
2022-09-25 21:29:09 +09:00
PufferOverflow c47fa08b40
Update dependency versions for Dockerfile.android 2022-09-23 10:33:56 +08:00
Tatsuhiro Tsujikawa 4bfd802937 Bump package version 2022-09-21 17:21:01 +09:00
Tatsuhiro Tsujikawa 87fef4ab71 Update manual pages 2022-09-21 16:55:07 +09:00
Tatsuhiro Tsujikawa 844af88dc1 Bump package and library versions 2022-09-21 16:47:56 +09:00
Tatsuhiro Tsujikawa 2f6ebfdf8c Update AUTHORS 2022-09-21 16:45:44 +09:00
Tatsuhiro Tsujikawa 25858d8ada
Merge pull request #1800 from nghttp2/bump-ngtcp2
Bump ngtcp2
2022-09-20 18:28:51 +09:00
Tatsuhiro Tsujikawa 11d1f95412 Bump ngtcp2 2022-09-20 17:46:11 +09:00
Tatsuhiro Tsujikawa 931adb146b
Merge pull request #1799 from nghttp2/dyn-dns-family
nghttpx: Respect backend-address-family on dynamic DNS lookup
2022-09-15 19:45:09 +09:00
Tatsuhiro Tsujikawa 6a513dc9fd nghttpx: Respect backend-address-family on dynamic DNS lookup 2022-09-15 19:11:13 +09:00
Tatsuhiro Tsujikawa f13cff01bb
Merge pull request #1798 from nghttp2/bump-libbpf
Bump libbpf to v1.0.0
2022-09-15 19:10:22 +09:00
Tatsuhiro Tsujikawa 2608333ce5 Bump libbpf to v1.0.0 2022-09-15 18:29:07 +09:00
Tatsuhiro Tsujikawa 9f5bf5c7dd
Merge pull request #1792 from nghttp2/option-no-rfc9113-ltws-validation
Option no rfc9113 ltws validation
2022-09-07 17:08:04 +09:00
Tatsuhiro Tsujikawa eb06e33e38 Add nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation 2022-09-07 16:34:12 +09:00
Tatsuhiro Tsujikawa a94d2de89a Check leading white spaces in :protocol 2022-09-07 16:32:20 +09:00
Tatsuhiro Tsujikawa 921b4d027a
Merge pull request #1791 from nghttp2/bump-ngtcp2
Bump ngtcp2
2022-09-06 20:55:12 +09:00
Tatsuhiro Tsujikawa 026ff48edb Bump ngtcp2 2022-09-01 22:06:41 +09:00
Tatsuhiro Tsujikawa 1340b296dd
Merge pull request #1787 from heitbaum/patch-1
Fix typographic error
2022-08-29 21:22:56 +09:00
Rudi Heitbaum fc5a020bc6
Fix typographic error 2022-08-29 22:05:58 +10:00
Tatsuhiro Tsujikawa f919cf1a8e Bump package version 2022-08-22 21:10:20 +09:00
Tatsuhiro Tsujikawa 08676d23f9 Update manual pages 2022-08-22 20:49:37 +09:00
Tatsuhiro Tsujikawa 28fa90811c Bump package and library versions 2022-08-22 20:42:14 +09:00
Tatsuhiro Tsujikawa 56f39b30ce Update AUTHORS 2022-08-22 19:40:15 +09:00
Tatsuhiro Tsujikawa df000cd01b
Merge pull request #1784 from nghttp2/fix-covscan-errors
Fix errors reported by coverity scan
2022-08-22 19:37:29 +09:00
Tatsuhiro Tsujikawa 47b990f508 Fix errors reported by coverity scan 2022-08-22 19:06:35 +09:00
Tatsuhiro Tsujikawa 68ea085535
Merge pull request #1783 from nghttp2/bump-libbpf
Bump libbpf
2022-08-22 18:58:37 +09:00
Tatsuhiro Tsujikawa eb397721be Bump libbpf 2022-08-22 18:27:38 +09:00
Tatsuhiro Tsujikawa c3fa77158a
Merge pull request #1782 from nghttp2/embed-km-id-in-token
nghttpx: Embed km_id in a regular token
2022-08-22 17:46:52 +09:00
Tatsuhiro Tsujikawa 7c0649d466 nghttpx: Embed km_id in a regular token 2022-08-21 23:34:32 +09:00
Tatsuhiro Tsujikawa f02f9ff50c
Merge pull request #1781 from nghttp2/token-dcidlen
nghttpx: Regular token does not require server issued DCID
2022-08-21 23:01:27 +09:00
Tatsuhiro Tsujikawa 31be334660 nghttpx: Regular token does not require server issued DCID 2022-08-21 22:40:10 +09:00
Tatsuhiro Tsujikawa 9d265e8bb8
Merge pull request #1780 from nghttp2/bump-ngtcp2
Bump ngtcp2 and nghttp3
2022-08-21 20:53:04 +09:00
Tatsuhiro Tsujikawa 1aa97d5d2c Bump ngtcp2 and nghttp3 2022-08-21 18:25:08 +09:00
Tatsuhiro Tsujikawa 42394e3342
Merge pull request #1779 from nghttp2/bump-boringssl
Bump boringssl
2022-08-20 11:36:27 +09:00
Tatsuhiro Tsujikawa 1bc1374d0c Bump boringssl 2022-08-20 11:16:44 +09:00
Tatsuhiro Tsujikawa f2c793c75b clang-format 2022-08-10 16:57:01 +09:00
Tatsuhiro Tsujikawa 1bb4877976
Merge pull request #1770 from DavidKorczynski/dav-fuzz-1
fuzz: add frames fuzzer
2022-08-10 16:56:10 +09:00
David Korczynski 651f3bfce2
cleanup 2022-08-09 15:34:04 +01:00
Tatsuhiro Tsujikawa 8a026e18f5 clang-format fuzz 2022-08-09 21:01:42 +09:00
Tatsuhiro Tsujikawa 5164745ff9
Merge pull request #1771 from DavidKorczynski/dav-fuzz-2
fuzz: add extended fuzzer using FuzzedDataProvider
2022-08-09 20:59:50 +09:00
Tatsuhiro Tsujikawa 179ecf7ccd
Merge pull request #1775 from nghttp2/src-eliminate-strtoul
Replace the use of strtoul and strtol with parse_uint
2022-08-09 20:58:52 +09:00
Tatsuhiro Tsujikawa a4d12f2a71 Replace the use of strtoul and strtol with parse_uint
Replace the use of strtoul and strtol with parse_uint to fix the
handling of negative integer.
2022-08-09 19:56:01 +09:00
David Korczynski 0ade040a68
fuzz: add extended fuzzer using FuzzedDataProvider
Similar in nature to fuzz_target.cc but adds the difference of a random
iv constructed by way of fuzzer data.
2022-08-04 20:22:28 +01:00
David Korczynski 59be24be32
fuzz: add frames fuzzer 2022-08-04 15:24:27 +01:00
Tatsuhiro Tsujikawa 092014d5af
Merge pull request #1769 from nghttp2/randomize-backend-addresses
nghttpx: Randomize backend address backend robin order per thread (2nd Ed.)
2022-08-04 19:03:53 +09:00
Tatsuhiro Tsujikawa 39d9efe4bd nghttpx: Randomize backend address backend robin order per thread (2nd Ed.)
This is the 2nd attempt to randomize backend address round robin
order.

The initial attempt of doing this was
fdcdb21c38, which has been reverted via
470f06e5f6 because it broke the session
affinity.

This time, we shuffles seq fields and avoid reordering addrs vector.
2022-08-04 18:38:23 +09:00
Tatsuhiro Tsujikawa a3be763650
Merge pull request #1766 from nghttp2/h2load-h3-reset-stream-cb
h2load: Implement nghttp3 reset_stream callback
2022-07-26 17:39:58 +09:00
Tatsuhiro Tsujikawa b4cf6358d4 h2load: Implement nghttp3 reset_stream callback 2022-07-26 17:05:13 +09:00
Tatsuhiro Tsujikawa a80df35b39 Merge branch 'lemourin-coro-http' 2022-07-26 17:02:03 +09:00
Paweł Wegner ff48a84a86 cmake: add ENABLE_DOC option.
doc subdirectory breaks Xcode generator
2022-07-26 16:42:26 +09:00
Tatsuhiro Tsujikawa 75a0d090df
Merge pull request #1764 from nghttp2/h3-ignore-errors
Ignore nghttp3 errors which can be ignored
2022-07-26 00:40:11 +09:00
Tatsuhiro Tsujikawa 6418a86504 Ignore nghttp3 errors which can be ignored 2022-07-25 23:09:33 +09:00
Tatsuhiro Tsujikawa 2916208eb3
Merge pull request #1763 from nghttp2/bump-neverbleed
Bump neverbleed
2022-07-25 23:04:43 +09:00
Tatsuhiro Tsujikawa 22c88548b9 Bump neverbleed 2022-07-25 21:20:02 +09:00
Tatsuhiro Tsujikawa c642a9f856
Merge pull request #1762 from nghttp2/bump-llhttp
Bump llhttp
2022-07-25 21:04:13 +09:00
Tatsuhiro Tsujikawa 05f8d4e8c9 Fix integration test failure 2022-07-25 20:08:58 +09:00
Tatsuhiro Tsujikawa 9d389e8744 Bump llhttp to f84c4de65875a43b683d4c0c26337b2fa5a38efa 2022-07-25 19:41:13 +09:00
Tatsuhiro Tsujikawa d51647f37e
Merge pull request #1761 from nghttp2/relocate-nghttp2-asio
libnghttp2_asio has moved to its own repository
2022-07-25 18:08:37 +09:00
Tatsuhiro Tsujikawa c011105124 libnghttp2_asio has moved to its own repository 2022-07-25 17:33:50 +09:00
Tatsuhiro Tsujikawa bc909d6157
Merge pull request #1759 from nghttp2/bump-quic-libs
Bump QUIC related libraries
2022-07-22 00:05:52 +09:00
Tatsuhiro Tsujikawa 5cf678cf5e Bump QUIC related libraries 2022-07-21 23:22:42 +09:00
Tatsuhiro Tsujikawa f11be7df09
Merge pull request #1755 from vszakats/fix-win-openssl-quic-detection
cmake: fix detecting quic openssl with win32
2022-07-21 21:18:05 +09:00
Viktor Szakats 7113970ff0
cmake: fix detecting quic openssl with win32
By adding two necessary system libraries to make the QUIC test snippet
link correctly.

Before:
```
-- Looking for SSL_is_quic
-- Looking for SSL_is_quic - not found
CMake Warning at CMakeLists.txt:206 (message):
  OpenSSL in
  /[...]/openssl-quic/x64-ucrt/usr/lib/libssl.a;/[...]/openssl-quic/x64-ucrt/usr/lib/libcrypto.a
  dose not have SSL_is_quic.  HTTP/3 support cannot be enabled
```

After:
```
-- Looking for SSL_is_quic
-- Looking for SSL_is_quic - found
```

Same fix as previously merged to ngtcp2:
https://github.com/ngtcp2/ngtcp2/pull/481
2022-07-14 05:35:11 +00:00
Tatsuhiro Tsujikawa 33974fbcd7
Merge pull request #1754 from nghttp2/bump-sphinx-rtd-theme
Bump sphinx_rtd_theme
2022-07-12 22:47:51 +09:00
Tatsuhiro Tsujikawa 6eb90570f0 Bump sphinx_rtd_theme 2022-07-12 22:23:12 +09:00
Tatsuhiro Tsujikawa 014f1c510d
Merge pull request #1752 from nghttp2/cross-build-fix
Cross build fix
2022-07-08 00:04:18 +09:00
Tatsuhiro Tsujikawa db770a815a Remove missing header patch 2022-07-07 21:59:14 +09:00
Tatsuhiro Tsujikawa aedb01a1a4 Run tests for x86_64-w64-mingw32 host only
GitHub Actions suddenly refused to install wine32 because of broken
dependencies.  In order to workaround this issue, do not run tests on
i686-w64-mingw32 host.
2022-07-07 21:54:31 +09:00
Tatsuhiro Tsujikawa 3d35558f0e
Merge pull request #1751 from nghttp2/bump-quictls
Bump quictls
2022-07-06 22:58:26 +09:00
Tatsuhiro Tsujikawa 02a3a15b82 Bump quictls 2022-07-06 22:21:26 +09:00
Tatsuhiro Tsujikawa ffe1519366
Merge pull request #1750 from nghttp2/pythonbindings-deprecation
Deprecate Python bindings
2022-07-05 20:10:24 +09:00
Tatsuhiro Tsujikawa 97a5ca584b Deprecate Python bindings 2022-07-05 19:45:14 +09:00
Tatsuhiro Tsujikawa 78cb0008d3
Merge pull request #1749 from nghttp2/libasio-deprecation
Deprecate libnghttp2_asio
2022-07-05 19:41:47 +09:00
Tatsuhiro Tsujikawa d38cf2d11c
Merge pull request #1748 from nghttp2/cross-build
Cross build
2022-07-05 19:10:28 +09:00
Tatsuhiro Tsujikawa b7b09acb81 Deprecate libnghttp2_asio 2022-07-05 18:57:22 +09:00
Tatsuhiro Tsujikawa 83ea8e5ba5 Add build-cross 2022-07-05 18:14:22 +09:00
Tatsuhiro Tsujikawa 9a16e73813 Compile with mingw64 2022-07-05 18:10:57 +09:00
Tatsuhiro Tsujikawa 2da1713200 Define BUILDING_NGHTTP2 for tests to make linker work 2022-07-05 18:10:35 +09:00
Tatsuhiro Tsujikawa 118648ff17
Merge pull request #1747 from nghttp2/nghttpx-fix-proxy-proto
nghttpx: Fix broken PROXY-protocol
2022-07-04 22:16:57 +09:00
Tatsuhiro Tsujikawa d9acf873ed nghttpx: Fix broken PROXY-protocol
Fix PROXY-protocol that is enabled for TLS connection.
2022-07-04 21:21:02 +09:00
Tatsuhiro Tsujikawa e065cbccb6
Merge pull request #1745 from nghttp2/no-lws-check
No need to check pseudo header lws
2022-06-25 11:52:15 +09:00
Tatsuhiro Tsujikawa cad6f6c3f0
Merge pull request #1744 from nghttp2/nghttpx-remove-h1-field-trailing-white-spaces
nghttpx: Remove trailing white spaces from HTTP/1.1 fields
2022-06-25 11:37:27 +09:00
Tatsuhiro Tsujikawa fc6d064371 No need to check pseudo header lws
No need to check pseudo header lws because it is guaranteed not to
have leading white spaces.
2022-06-25 11:24:10 +09:00
Tatsuhiro Tsujikawa 501b1d4dcf nghttpx: Remove trailing white spaces from HTTP/1.1 fields 2022-06-25 11:09:35 +09:00
Tatsuhiro Tsujikawa 54848210a9
Merge pull request #1743 from nghttp2/rfc9113-field-value-validation
Add nghttp2_check_header_value_rfc9113
2022-06-24 20:52:17 +09:00
Tatsuhiro Tsujikawa 7f4c2f9ec3 Add nghttp2_check_header_value_rfc9113
Add nghttp2_check_header_value_rfc9113 which verifies the additional
rule imposed by RFC 9113, section 8.2.1, that is a field value must
not start or end with 0x20(SPC) or 0x09(HTAB).

libnghttp2 uses this new function internally.
2022-06-24 19:44:13 +09:00
Tatsuhiro Tsujikawa af30e57c5e Bump package version 2022-06-24 18:27:00 +09:00
221 changed files with 9719 additions and 14861 deletions

View File

@ -36,8 +36,8 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get install \
g++-11 \
clang-12 \
g++-12 \
clang-14 \
autoconf \
automake \
autotools-dev \
@ -74,8 +74,8 @@ jobs:
- name: Setup clang (Linux)
if: runner.os == 'Linux' && matrix.compiler == 'clang'
run: |
echo 'CC=clang-12' >> $GITHUB_ENV
echo 'CXX=clang++-12' >> $GITHUB_ENV
echo 'CC=clang-14' >> $GITHUB_ENV
echo 'CXX=clang++-14' >> $GITHUB_ENV
- name: Setup clang (MacOS)
if: runner.os == 'macOS' && matrix.compiler == 'clang'
run: |
@ -84,8 +84,8 @@ jobs:
- name: Setup gcc (Linux)
if: runner.os == 'Linux' && matrix.compiler == 'gcc'
run: |
echo 'CC=gcc-11' >> $GITHUB_ENV
echo 'CXX=g++-11' >> $GITHUB_ENV
echo 'CC=gcc-12' >> $GITHUB_ENV
echo 'CXX=g++-12' >> $GITHUB_ENV
- name: Setup gcc (MacOS)
if: runner.os == 'macOS' && matrix.compiler == 'gcc'
run: |
@ -94,7 +94,7 @@ jobs:
- name: Build libbpf
if: matrix.http3 == 'http3' && matrix.compiler == 'clang' && runner.os == 'Linux'
run: |
git clone -b v0.8.0 https://github.com/libbpf/libbpf
git clone -b v1.0.1 https://github.com/libbpf/libbpf
cd libbpf
PREFIX=$PWD/build make -C src install
@ -106,7 +106,7 @@ jobs:
- name: Build quictls/openssl v1.1.1
if: matrix.http3 == 'http3' && matrix.openssl == 'openssl1'
run: |
git clone --depth 1 -b OpenSSL_1_1_1p+quic https://github.com/quictls/openssl
git clone --depth 1 -b OpenSSL_1_1_1s+quic https://github.com/quictls/openssl
cd openssl
./config --prefix=$PWD/build
make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
@ -117,7 +117,7 @@ jobs:
unset CPPFLAGS
unset LDFLAGS
git clone --depth 1 -b openssl-3.0.4+quic https://github.com/quictls/openssl
git clone --depth 1 -b openssl-3.0.7+quic https://github.com/quictls/openssl
cd openssl
./config enable-ktls --prefix=$PWD/build --libdir=$PWD/build/lib
make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
@ -127,7 +127,7 @@ jobs:
run: |
git clone https://boringssl.googlesource.com/boringssl
cd boringssl
git checkout 27ffcc6e19bbafddf1b59ec0bc6df2904de7eb2c
git checkout 31bad2514d21f6207f3925ba56754611c462a873
mkdir build
cd build
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
@ -148,7 +148,7 @@ jobs:
- name: Build nghttp3
if: matrix.http3 == 'http3'
run: |
git clone --depth 1 -b v0.5.0 https://github.com/ngtcp2/nghttp3
git clone --depth 1 -b v0.8.0 https://github.com/ngtcp2/nghttp3
cd nghttp3
autoreconf -i
./configure --prefix=$PWD/build --enable-lib-only
@ -157,7 +157,7 @@ jobs:
- name: Build ngtcp2
if: matrix.http3 == 'http3'
run: |
git clone --depth 1 -b v0.6.0 https://github.com/ngtcp2/ngtcp2
git clone --depth 1 -b v0.12.0 https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -i
./configure --prefix=$PWD/build --enable-lib-only PKG_CONFIG_PATH="../openssl/build/lib/pkgconfig" $EXTRA_NGTCP2_OPTS
@ -229,6 +229,53 @@ jobs:
cd $NGHTTP2_CMAKE_DIR/integration-tests
make itprep it
build-cross:
strategy:
matrix:
host: [x86_64-w64-mingw32, i686-w64-mingw32]
runs-on: ubuntu-22.04
env:
HOST: ${{ matrix.host }}
steps:
- uses: actions/checkout@v3
- name: Linux setup
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install \
gcc-mingw-w64 \
autoconf \
automake \
autotools-dev \
libtool \
pkg-config \
wine
- name: Build CUnit
run: |
curl -LO https://jaist.dl.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2
tar xf CUnit-2.1-3.tar.bz2
cd CUnit-2.1-3
./bootstrap
./configure --disable-shared --host="$HOST" --prefix="$PWD/build"
make -j$(nproc) install
- name: Configure autotools
run: |
autoreconf -i && \
./configure --enable-werror --enable-lib-only --with-cunit \
--host="$HOST" PKG_CONFIG_PATH="$PWD/CUnit-2.1-3/build/lib/pkgconfig"
- name: Build nghttp2
run: |
make -j$(nproc)
make -j$(nproc) check TESTS=""
- name: Run tests
if: matrix.host == 'x86_64-w64-mingw32'
run: |
cd tests
wine main.exe
build-windows:
runs-on: windows-latest

4
.gitignore vendored
View File

@ -54,4 +54,6 @@ _VC_ROOT/
.depend.MSVC
*.pyd
*.egg-info/
python/nghttp2.c
release
libnghttp2.lha

View File

@ -40,6 +40,7 @@ Daniel Evers
Daniel Stenberg
Dave Reisner
David Beitey
David Korczynski
David Weekly
Dimitris Apostolou
Dmitri Tikhonov
@ -90,10 +91,12 @@ Mike Frysinger
Mike Lothian
Nicholas Hurley
Nora Shoemaker
Paweł Wegner
Pedro Santos
Peeyush Aggarwal
Peter Wu
Piotr Sikora
PufferOverflow
Raul Gutierrez Segales
Remo E
Renaud
@ -101,6 +104,7 @@ Reza Tavakoli
Richard Wolfert
Rick Lei
Ross Smith II
Rudi Heitbaum
Ryo Ota
Scott Mitchell
Sebastiaan Deckers

View File

@ -24,13 +24,13 @@
cmake_minimum_required(VERSION 3.0)
# XXX using 1.8.90 instead of 1.9.0-DEV
project(nghttp2 VERSION 1.48.0)
project(nghttp2 VERSION 1.51.90)
# See versioning rule:
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
set(LT_CURRENT 36)
set(LT_REVISION 0)
set(LT_AGE 22)
set(LT_CURRENT 38)
set(LT_REVISION 1)
set(LT_AGE 24)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
include(Version)
@ -52,9 +52,8 @@ endif()
include(GNUInstallDirs)
# For Python bindings and documentation
# (Must be called before PythonLibs for matching versions.)
find_package(PythonInterp)
# For documentation
find_package(Python3 COMPONENTS Interpreter)
# Auto-detection of features that can be toggled
find_package(OpenSSL 1.0.1)
@ -82,15 +81,8 @@ find_package(Systemd 209)
find_package(Jansson 2.5)
set(ENABLE_HPACK_TOOLS_DEFAULT ${JANSSON_FOUND})
# 2.0.8 is required because we use evconnlistener_set_error_cb()
find_package(Libevent 2.0.8 COMPONENTS libevent openssl)
find_package(Libevent 2.0.8 COMPONENTS core extra openssl)
set(ENABLE_EXAMPLES_DEFAULT ${LIBEVENT_OPENSSL_FOUND})
find_package(Cython)
find_package(PythonLibs)
if(CYTHON_FOUND AND PYTHONLIBS_FOUND)
set(ENABLE_PYTHON_BINDINGS_DEFAULT ON)
else()
set(ENABLE_PYTHON_BINDINGS_DEFAULT OFF)
endif()
find_package(LibXml2 2.6.26)
set(WITH_LIBXML2_DEFAULT ${LIBXML2_FOUND})
@ -99,8 +91,7 @@ set(WITH_JEMALLOC_DEFAULT ${JEMALLOC_FOUND})
include(CMakeOptions.txt)
if(ENABLE_LIB_ONLY AND (ENABLE_APP OR ENABLE_HPACK_TOOLS OR ENABLE_EXAMPLES OR
ENABLE_PYTHON_BINDINGS))
if(ENABLE_LIB_ONLY AND (ENABLE_APP OR ENABLE_HPACK_TOOLS OR ENABLE_EXAMPLES))
# Remember when disabled options are disabled for later diagnostics.
set(ENABLE_LIB_ONLY_DISABLED_OTHERS 1)
else()
@ -110,7 +101,6 @@ if(ENABLE_LIB_ONLY)
set(ENABLE_APP OFF)
set(ENABLE_HPACK_TOOLS OFF)
set(ENABLE_EXAMPLES OFF)
set(ENABLE_PYTHON_BINDINGS OFF)
endif()
# Do not disable assertions based on CMAKE_BUILD_TYPE.
@ -156,20 +146,6 @@ cmake_pop_check_state()
# Additional libraries required for programs under src directory.
set(APP_LIBRARIES)
if(ENABLE_PYTHON_BINDINGS)
if(NOT (CYTHON_FOUND AND PYTHONLIBS_FOUND))
message(FATAL_ERROR "python bindings were requested "
"(ENABLE_PYTHON_BINDINGS=1) but dependencies are not met.")
endif()
if(NOT PYTHON_VERSION_STRING STREQUAL PYTHONLIBS_VERSION_STRING)
message(FATAL_ERROR
"Python executable and library must have the same version!"
" Found Python ${PYTHON_VERSION_STRING} and"
" PythonLibs ${PYTHONLIBS_VERSION_STRING}"
)
endif()
endif()
set(CMAKE_THREAD_PREFER_PTHREAD 1)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
@ -201,9 +177,12 @@ if(OPENSSL_FOUND)
cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
if(WIN32)
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" "ws2_32" "bcrypt")
endif()
check_symbol_exists(SSL_is_quic "openssl/ssl.h" HAVE_SSL_IS_QUIC)
if(NOT HAVE_SSL_IS_QUIC)
message(WARNING "OpenSSL in ${OPENSSL_LIBRARIES} dose not have SSL_is_quic. HTTP/3 support cannot be enabled")
message(WARNING "OpenSSL in ${OPENSSL_LIBRARIES} does not have SSL_is_quic. HTTP/3 support cannot be enabled")
endif()
cmake_pop_check_state()
else()
@ -240,10 +219,6 @@ endif()
# jemalloc
set(HAVE_JEMALLOC ${JEMALLOC_FOUND})
if(ENABLE_ASIO_LIB)
find_package(Boost 1.54.0 REQUIRED system thread)
endif()
# libbpf (for bpf)
set(HAVE_LIBBPF ${LIBBPF_FOUND})
if(LIBBPF_FOUND)
@ -274,13 +249,13 @@ if(ENABLE_HPACK_TOOLS AND NOT HAVE_JANSSON)
message(FATAL_ERROR "HPACK tools were requested (ENABLE_HPACK_TOOLS=1) but dependencies are not met.")
endif()
# C++ library libnghttp2_asio
# examples
if(ENABLE_EXAMPLES AND NOT (OPENSSL_FOUND AND LIBEVENT_OPENSSL_FOUND))
message(FATAL_ERROR "examples were requested (ENABLE_EXAMPLES=1) but dependencies are not met.")
endif()
# third-party http-parser only be built when needed
if(ENABLE_EXAMPLES OR ENABLE_APP OR ENABLE_HPACK_TOOLS OR ENABLE_ASIO_LIB)
if(ENABLE_EXAMPLES OR ENABLE_APP OR ENABLE_HPACK_TOOLS)
set(ENABLE_THIRD_PARTY 1)
# mruby (for src/nghttpx)
set(HAVE_MRUBY ${WITH_MRUBY})
@ -464,8 +439,6 @@ set(sbindir "${CMAKE_INSTALL_FULL_SBINDIR}")
foreach(name
lib/libnghttp2.pc
lib/includes/nghttp2/nghttp2ver.h
src/libnghttp2_asio.pc
python/setup.py
integration-tests/config.go
integration-tests/setenv
doc/conf.py
@ -476,14 +449,9 @@ foreach(name
doc/tutorial-hpack.rst
doc/nghttpx-howto.rst
doc/h2load-howto.rst
doc/libnghttp2_asio.rst
doc/python-apiref.rst
doc/building-android-binary.rst
doc/nghttp2.h.rst
doc/nghttp2ver.h.rst
doc/asio_http2.h.rst
doc/asio_http2_server.h.rst
doc/asio_http2_client.h.rst
doc/contribute.rst
)
configure_file("${name}.in" "${name}" @ONLY)
@ -506,13 +474,13 @@ add_subdirectory(lib)
#add_subdirectory(lib/includes)
add_subdirectory(third-party)
add_subdirectory(src)
#add_subdirectory(src/includes)
add_subdirectory(examples)
add_subdirectory(python)
add_subdirectory(tests)
#add_subdirectory(tests/testdata)
add_subdirectory(integration-tests)
add_subdirectory(doc)
if(ENABLE_DOC)
add_subdirectory(doc)
endif()
add_subdirectory(contrib)
add_subdirectory(script)
add_subdirectory(bpf)
@ -534,10 +502,8 @@ message(STATUS "summary of build options:
WARNCFLAGS: ${WARNCFLAGS}
CXX1XCXXFLAGS: ${CXX1XCXXFLAGS}
Python:
Python: ${PYTHON_EXECUTABLE}
PYTHON_VERSION: ${PYTHON_VERSION_STRING}
Library version:${PYTHONLIBS_VERSION_STRING}
Cython: ${CYTHON_EXECUTABLE}
Python: ${Python3_EXECUTABLE}
Python3_VERSION: ${Python3_VERSION}
Test:
CUnit: ${HAVE_CUNIT} (LIBS='${CUNIT_LIBRARIES}')
Failmalloc: ${ENABLE_FAILMALLOC}
@ -555,8 +521,6 @@ message(STATUS "summary of build options:
Jemalloc: ${HAVE_JEMALLOC} (LIBS='${JEMALLOC_LIBRARIES}')
Zlib: ${HAVE_ZLIB} (LIBS='${ZLIB_LIBRARIES}')
Systemd: ${HAVE_SYSTEMD} (LIBS='${SYSTEMD_LIBRARIES}')
Boost::System: ${Boost_SYSTEM_LIBRARY}
Boost::Thread: ${Boost_THREAD_LIBRARY}
Third-party:
http-parser: ${ENABLE_THIRD_PARTY}
MRuby: ${HAVE_MRUBY}
@ -564,9 +528,7 @@ message(STATUS "summary of build options:
Features:
Applications: ${ENABLE_APP}
HPACK tools: ${ENABLE_HPACK_TOOLS}
Libnghttp2_asio:${ENABLE_ASIO_LIB}
Examples: ${ENABLE_EXAMPLES}
Python bindings:${ENABLE_PYTHON_BINDINGS}
Threading: ${ENABLE_THREADS}
HTTP/3(EXPERIMENTAL): ${ENABLE_HTTP3}
")

View File

@ -7,17 +7,15 @@ option(ENABLE_APP "Build applications (nghttp, nghttpd, nghttpx and h2load
${ENABLE_APP_DEFAULT})
option(ENABLE_HPACK_TOOLS "Build HPACK tools"
${ENABLE_HPACK_TOOLS_DEFAULT})
option(ENABLE_ASIO_LIB "Build C++ libnghttp2_asio library")
option(ENABLE_EXAMPLES "Build examples"
${ENABLE_EXAMPLES_DEFAULT})
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_LIB_ONLY "Build libnghttp2 only. This is a short hand for -DENABLE_APP=0 -DENABLE_EXAMPLES=0 -DENABLE_HPACK_TOOLS=0")
option(ENABLE_STATIC_LIB "Build libnghttp2 in static mode also")
option(ENABLE_SHARED_LIB "Build libnghttp2 as a shared library" ON)
option(ENABLE_STATIC_CRT "Build libnghttp2 against the MS LIBCMT[d]")
option(ENABLE_HTTP3 "Enable HTTP/3 support" OFF)
option(ENABLE_DOC "Build documentation" ON)
option(WITH_LIBXML2 "Use libxml2"
${WITH_LIBXML2_DEFAULT})

View File

@ -12,59 +12,41 @@
# Only use standalone-toolchain for reduce size
FROM ubuntu:xenial
FROM ubuntu:22.04
MAINTAINER Tatsuhiro Tsujikawa
ENV ANDROID_HOME /root
ENV TOOLCHAIN $ANDROID_HOME/toolchain
ENV PATH $TOOLCHAIN/bin:$PATH
ENV NDK_VERSION r14b
ENV NDK_VERSION r25b
ENV NDK /root/android-ndk-$NDK_VERSION
ENV TOOLCHAIN $NDK/toolchains/llvm/prebuilt/linux-x86_64
ENV TARGET aarch64-linux-android
ENV API 33
ENV AR $TOOLCHAIN/bin/llvm-ar
ENV CC $TOOLCHAIN/bin/$TARGET$API-clang
ENV CXX $TOOLCHAIN/bin/$TARGET$API-clang++
ENV LD $TOOLCHAIN/bin/ld
ENV RANDLIB $TOOLCHAIN/bin/llvm-ranlib
ENV STRIP $TOOLCHAIN/bin/llvm-strip
ENV PREFIX /root/usr/local
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/*
lib32stdc++6 && \
rm -rf /var/cache/apt/*
# 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
# Download NDK
RUN curl -L -O https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux.zip && \
unzip -q android-ndk-$NDK_VERSION-linux.zip && \
rm android-ndk-$NDK_VERSION-linux.zip
# 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 git clone https://github.com/tatsuhiro-t/spdylay -b $SPDYLAY_VERSION --depth 1
WORKDIR /root/build/spdylay
RUN autoreconf -i && \
./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" && \
make install
ENV OPENSSL_VERSION 1.1.1q
ENV LIBEV_VERSION 4.33
ENV ZLIB_VERSION 1.2.13
ENV CARES_VERSION 1.18.1
ENV NGHTTP2_VERSION master
WORKDIR /root/build
RUN curl -L -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz && \
@ -72,20 +54,18 @@ RUN curl -L -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz &&
rm openssl-$OPENSSL_VERSION.tar.gz
WORKDIR /root/build/openssl-$OPENSSL_VERSION
RUN export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi- && \
./Configure --prefix=$PREFIX android && \
RUN export ANDROID_NDK_HOME=$NDK PATH=$TOOLCHAIN/bin:$PATH && \
./Configure no-shared --prefix=$PREFIX android-arm64 && \
make && make install_sw
WORKDIR /root/build
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-$LIBEV_VERSION.tar.gz && \
rm libev-$LIBEV_VERSION.tar.gz
WORKDIR /root/build/libev-$LIBEV_VERSION
RUN patch -p1 < ../libev-4.19-android.patch && \
./configure \
--host=arm-linux-androideabi \
RUN ./configure \
--host=$TARGET \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--prefix=$PREFIX \
--disable-shared \
@ -95,17 +75,12 @@ RUN patch -p1 < ../libev-4.19-android.patch && \
make install
WORKDIR /root/build
RUN curl -L -O https://downloads.sourceforge.net/project/libpng/zlib/$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz && \
RUN curl -L -O https://zlib.net/zlib-$ZLIB_VERSION.tar.gz && \
tar xf zlib-$ZLIB_VERSION.tar.gz && \
rm zlib-$ZLIB_VERSION.tar.gz
WORKDIR /root/build/zlib-$ZLIB_VERSION
RUN HOST=arm-linux-androideabi \
CC=$HOST-gcc \
AR=$HOST-ar \
LD=$HOST-ld \
RANLIB=$HOST-ranlib \
STRIP=$HOST-strip \
RUN HOST=$TARGET \
./configure \
--prefix=$PREFIX \
--libdir=$PREFIX/lib \
@ -121,7 +96,7 @@ RUN curl -L -O https://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz && \
WORKDIR /root/build/c-ares-$CARES_VERSION
RUN ./configure \
--host=arm-linux-androideabi \
--host=$TARGET \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--prefix=$PREFIX \
--disable-shared && \
@ -134,17 +109,13 @@ RUN autoreconf -i && \
./configure \
--enable-app \
--disable-shared \
--host=arm-linux-androideabi \
--host=$TARGET \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--with-xml-prefix="$PREFIX" \
--without-libxml2 \
--disable-python-bindings \
--disable-examples \
--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" && \
make && \
arm-linux-androideabi-strip src/nghttpx src/nghttpd src/nghttp
$STRIP src/nghttpx src/nghttpd src/nghttp

View File

@ -20,19 +20,14 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SUBDIRS = lib third-party src bpf examples python tests integration-tests \
SUBDIRS = lib third-party src bpf examples tests integration-tests \
doc contrib script
# Now with python setuptools, make uninstall will leave many files we
# cannot easily remove (e.g., easy-install.pth). Disable it for
# distcheck rule.
AM_DISTCHECK_CONFIGURE_FLAGS = --disable-python-bindings
ACLOCAL_AMFLAGS = -I m4
dist_doc_DATA = README.rst
EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-make \
EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-env \
Dockerfile.android \
cmakeconfig.h.in \
CMakeLists.txt \
@ -42,7 +37,6 @@ EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-make \
cmake/FindLibev.cmake \
cmake/FindCUnit.cmake \
cmake/Version.cmake \
cmake/FindCython.cmake \
cmake/FindLibevent.cmake \
cmake/FindJansson.cmake \
cmake/FindLibcares.cmake \
@ -61,5 +55,5 @@ clang-format:
CLANGFORMAT=`git config --get clangformat.binary`; \
test -z $${CLANGFORMAT} && CLANGFORMAT="clang-format"; \
$${CLANGFORMAT} -i lib/*.{c,h} lib/includes/nghttp2/*.h \
src/*.{c,cc,h} src/includes/nghttp2/*.h examples/*.{c,cc} \
tests/*.{c,h} bpf/*.c
src/*.{c,cc,h} examples/*.{c,cc} \
tests/*.{c,h} bpf/*.c fuzz/*.cc

36
Makefile.os4 Normal file
View File

@ -0,0 +1,36 @@
USE_CLIB2=YES
ifeq ($(USE_CLIB2), YES)
LIBC=clib2
else
LIBC=newlib
endif
all: build
init:
git submodule update --init
autoreconf -i
automake
autoconf
build: init
CC="ppc-amigaos-gcc" CFLAGS="-mcrt=${LIBC} -fPIC" LDFLAGS="-mcrt=${LIBC}" CXXFLAGS="-mcrt=${LIBC} -fPIC" ./configure --host=ppc-amigaos && \
make -j$(shell nproc)
clean:
make -f Makefile clean
rm -rf autom4te.cache
rm compile config.guess config.h config.h.in config.log config.status config.sub configure depcomp install-sh libtool ltmain.sh missing stamp-h1 test-driver INSTALL Makefile Makefile.in *.m4
release:
mkdir -p release/local/common/include/nghttp2
mkdir -p release/local/clib2/lib
mkdir -p release/local/newlib/lib
make -f Makefile.os4 USE_CLIB2=YES
cp ./lib/.libs/libnghttp2.a ./lib/.libs/libnghttp2.la release/local/clib2/lib/
cp ./lib/includes/nghttp2/* release/local/common/include/nghttp2/
make -f Makefile.os4 clean
make -f Makefile.os4 USE_CLIB2=NO
cp ./lib/.libs/libnghttp2.a ./lib/.libs/libnghttp2.la ./lib/.libs/libnghttp2.so release/local/newlib/lib/
lha -aeq libnghttp2.lha release/

View File

@ -11,17 +11,14 @@ HTTP/2.
An HPACK encoder and decoder are available as a public API.
An experimental high level C++ library is also available.
We have Python bindings of this library, but we do not have full
code coverage yet.
Development Status
------------------
We have implemented `RFC 7540 <https://tools.ietf.org/html/rfc7540>`_
HTTP/2 and `RFC 7541 <https://tools.ietf.org/html/rfc7541>`_ HPACK -
Header Compression for HTTP/2
nghttp2 was originally developed based on `RFC 7540
<https://tools.ietf.org/html/rfc7540>`_ HTTP/2 and `RFC 7541
<https://tools.ietf.org/html/rfc7541>`_ HPACK - Header Compression for
HTTP/2. Now we are updating our code to implement `RFC 9113
<https://datatracker.ietf.org/doc/html/rfc9113>`_.
The nghttp2 code base was forked from the spdylay
(https://github.com/tatsuhiro-t/spdylay) project.
@ -106,27 +103,6 @@ To mitigate heap fragmentation in long running server programs
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
* libboost-thread-dev >= 1.54.0
The Python bindings require the following packages:
* cython >= 0.19
* python >= 3.8
* python-setuptools
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 \
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
mruby with C++ ABI explicitly turned on, and probably need other
@ -151,11 +127,11 @@ To enable the experimental HTTP/3 support for h2load and nghttpx, the
following libraries are required:
* `OpenSSL with QUIC support
<https://github.com/quictls/openssl/tree/OpenSSL_1_1_1p+quic>`_; or
<https://github.com/quictls/openssl/tree/OpenSSL_1_1_1s+quic>`_; or
`BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit
27ffcc6e19bbafddf1b59ec0bc6df2904de7eb2c)
* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 0.6.0
* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 0.4.0
31bad2514d21f6207f3925ba56754611c462a873)
* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 0.10.0
* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 0.7.0
Use ``--enable-http3`` configure option to enable HTTP/3 feature for
h2load and nghttpx.
@ -170,7 +146,7 @@ Use ``--with-libbpf`` configure option to build eBPF program.
libelf-dev is needed to build libbpf.
For Ubuntu 20.04, you can build libbpf from `the source code
<https://github.com/libbpf/libbpf/releases/tag/v0.8.0>`_. nghttpx
<https://github.com/libbpf/libbpf/releases/tag/v1.0.1>`_. nghttpx
requires eBPF program for reloading its configuration and hot swapping
its executable.
@ -224,6 +200,18 @@ language features.
responsible to specify the correct values to these variables. For
complete list of these variables, run ``./configure -h``.
If you are using Ubuntu 22.04 LTS, run the following to install the
required packages:
.. code-block:: text
sudo apt-get install g++ clang make binutils autoconf automake \
autotools-dev libtool pkg-config \
zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev \
libevent-dev libjansson-dev \
libc-ares-dev libjemalloc-dev libsystemd-dev \
ruby-dev bison libelf-dev
Building nghttp2 from release tar archive
-----------------------------------------
@ -355,7 +343,7 @@ Build custom OpenSSL:
.. code-block:: text
$ git clone --depth 1 -b OpenSSL_1_1_1p+quic https://github.com/quictls/openssl
$ git clone --depth 1 -b OpenSSL_1_1_1s+quic https://github.com/quictls/openssl
$ cd openssl
$ ./config --prefix=$PWD/build --openssldir=/etc/ssl
$ make -j$(nproc)
@ -366,7 +354,7 @@ Build nghttp3:
.. code-block:: text
$ git clone --depth 1 -b v0.5.0 https://github.com/ngtcp2/nghttp3
$ git clone --depth 1 -b v0.8.0 https://github.com/ngtcp2/nghttp3
$ cd nghttp3
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only
@ -378,7 +366,7 @@ Build ngtcp2:
.. code-block:: text
$ git clone --depth 1 -b v0.6.0 https://github.com/ngtcp2/ngtcp2
$ git clone --depth 1 -b v0.12.0 https://github.com/ngtcp2/ngtcp2
$ cd ngtcp2
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only \
@ -392,7 +380,7 @@ from source:
.. code-block:: text
$ git clone --depth 1 -b v0.8.0 https://github.com/libbpf/libbpf
$ git clone --depth 1 -b v1.0.1 https://github.com/libbpf/libbpf
$ cd libbpf
$ PREFIX=$PWD/build make -C src install
$ cd ..
@ -406,8 +394,7 @@ Build nghttp2:
$ git submodule update --init
$ autoreconf -i
$ ./configure --with-mruby --with-neverbleed --enable-http3 --with-libbpf \
--disable-python-bindings \
CC=clang-12 CXX=clang++-12 \
CC=clang-14 CXX=clang++-14 \
PKG_CONFIG_PATH="$PWD/../openssl/build/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig:$PWD/../ngtcp2/build/lib/pkgconfig:$PWD/../libbpf/build/lib64/pkgconfig" \
LDFLAGS="$LDFLAGS -Wl,-rpath,$PWD/../openssl/build/lib -Wl,-rpath,$PWD/../libbpf/build/lib64"
$ make -j$(nproc)
@ -1431,219 +1418,6 @@ associated value includes the state of the dynamic header table after the
corresponding header set was processed. The format is the same as
``deflatehd``.
libnghttp2_asio: High level HTTP/2 C++ library
----------------------------------------------
libnghttp2_asio is C++ library built on top of libnghttp2 and provides
high level abstraction API to build HTTP/2 applications. It depends
on the Boost::ASIO library and OpenSSL. Currently libnghttp2_asio
provides both client and server APIs.
libnghttp2_asio is not built by default. Use the ``--enable-asio-lib``
configure flag to build libnghttp2_asio. The required Boost libraries
are:
* Boost::Asio
* Boost::System
* Boost::Thread
The server API is designed to build an HTTP/2 server very easily to utilize
C++14 anonymous functions and closures. The bare minimum example of
an HTTP/2 server looks like this:
.. code-block:: cpp
#include <iostream>
#include <nghttp2/asio_http2_server.h>
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
http2 server;
server.handle("/", [](const request &req, const response &res) {
res.write_head(200);
res.end("hello, world\n");
});
if (server.listen_and_serve(ec, "localhost", "3000")) {
std::cerr << "error: " << ec.message() << std::endl;
}
}
Here is sample code to use the client API:
.. code-block:: cpp
#include <iostream>
#include <nghttp2/asio_http2_client.h>
using boost::asio::ip::tcp;
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::client;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
boost::asio::io_service io_service;
// connect to localhost:3000
session sess(io_service, "localhost", "3000");
sess.on_connect([&sess](tcp::resolver::iterator endpoint_it) {
boost::system::error_code ec;
auto req = sess.submit(ec, "GET", "http://localhost:3000/");
req->on_response([](const response &res) {
// print status code and response header fields.
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([](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) {
// shutdown session after first request was done.
sess.shutdown();
});
});
sess.on_error([](const boost::system::error_code &ec) {
std::cerr << "error: " << ec.message() << std::endl;
});
io_service.run();
}
For more details, see the documentation of libnghttp2_asio.
Python bindings
---------------
The ``python`` directory contains nghttp2 Python bindings. The
bindings currently provide HPACK compressor and decompressor classes
and an HTTP/2 server.
The extension module is called ``nghttp2``.
``make`` will build the bindings and target Python version is
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.8``).
The following example code illustrates basic usage of the HPACK compressor
and decompressor in Python:
.. code-block:: python
import binascii
import nghttp2
deflater = nghttp2.HDDeflater()
inflater = nghttp2.HDInflater()
data = deflater.deflate([(b'foo', b'bar'),
(b'baz', b'buz')])
print(binascii.b2a_hex(data))
hdrs = inflater.inflate(data)
print(hdrs)
The ``nghttp2.HTTP2Server`` class builds on top of the asyncio event
loop. On construction, *RequestHandlerClass* must be given, which
must be a subclass of ``nghttp2.BaseRequestHandler`` class.
The ``BaseRequestHandler`` class is used to handle the HTTP/2 stream.
By default, it does nothing. It must be subclassed to handle each
event callback method.
The first callback method invoked is ``on_headers()``. It is called
when HEADERS frame, which includes the request header fields, has arrived.
If the request has a request body, ``on_data(data)`` is invoked for each
chunk of received data.
Once the entire request is received, ``on_request_done()`` is invoked.
When the stream is closed, ``on_close(error_code)`` is called.
The application can send a response using ``send_response()`` method.
It can be used in ``on_headers()``, ``on_data()`` or
``on_request_done()``.
The application can push resources using the ``push()`` method. It must be
used before the ``send_response()`` call.
The following instance variables are available:
client_address
Contains a tuple of the form (host, port) referring to the
client's address.
stream_id
Stream ID of this stream.
scheme
Scheme of the request URI. This is a value of :scheme header
field.
method
Method of this stream. This is a value of :method header field.
host
This is a value of :authority or host header field.
path
This is a value of :path header field.
The following example illustrates the HTTP2Server and
BaseRequestHandler usage:
.. code-block:: python
#!/usr/bin/env python3
import io, ssl
import nghttp2
class Handler(nghttp2.BaseRequestHandler):
def on_headers(self):
self.push(path='/css/bootstrap.css',
request_headers = [('content-length', '3')],
status=200,
body='foo')
self.push(path='/js/bootstrap.js',
method='GET',
request_headers = [('content-length', '10')],
status=200,
body='foobarbuzz')
self.send_response(status=200,
headers = [('content-type', 'text/plain')],
body=io.BytesIO(b'nghttp2-python FTW'))
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ctx.options = ssl.OP_ALL | ssl.OP_NO_SSLv2
ctx.load_cert_chain('server.crt', 'server.key')
# give None to ssl to make the server non-SSL/TLS
server = nghttp2.HTTP2Server(('127.0.0.1', 8443), Handler, ssl=ctx)
server.serve_forever()
Contribution
------------

View File

@ -23,25 +23,15 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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"
. ./android-env
./configure \
--disable-shared \
--host=arm-linux-androideabi \
--host=$TARGET \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--with-xml-prefix="$PREFIX" \
--without-libxml2 \
--disable-python-bindings \
--disable-examples \
--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"

View File

@ -2,7 +2,7 @@
#
# nghttp2 - HTTP/2 C Library
#
# Copyright (c) 2013 Tatsuhiro Tsujikawa
# Copyright (c) 2022 nghttp2 contributors
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@ -23,11 +23,18 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if [ -z "$ANDROID_HOME" ]; then
echo 'No $ANDROID_HOME specified.'
if [ -z "$NDK" ]; then
echo 'No $NDK specified.'
exit 1
fi
TOOLCHAIN=$ANDROID_HOME/toolchain
PATH=$TOOLCHAIN/bin:$PATH
make "$@"
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
export TARGET=aarch64-linux-android
export API=33
export AR=$TOOLCHAIN/bin/llvm-ar
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
export LD=$TOOLCHAIN/bin/ld
export RANDLIB=$TOOLCHAIN/bin/llvm-ranlib
export STRIP=$TOOLCHAIN/bin/llvm-strip
export PREFIX=$NDK/usr/local

View File

@ -1,44 +0,0 @@
# Find the Cython compiler.
#
# This code sets the following variables:
#
# CYTHON_EXECUTABLE
#
# See also UseCython.cmake
#=============================================================================
# Copyright 2011 Kitware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================
# Use the Cython executable that lives next to the Python executable
# if it is a local installation.
find_package( PythonInterp )
if( PYTHONINTERP_FOUND )
get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
find_program( CYTHON_EXECUTABLE
NAMES cython cython.bat cython3
HINTS ${_python_path}
)
else()
find_program( CYTHON_EXECUTABLE
NAMES cython cython.bat cython3
)
endif()
include( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )
mark_as_advanced( CYTHON_EXECUTABLE )

View File

@ -25,7 +25,7 @@ dnl Do not change user variables!
dnl https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
AC_PREREQ(2.61)
AC_INIT([nghttp2], [1.48.0], [t-tujikawa@users.sourceforge.net])
AC_INIT([nghttp2], [1.52.0-DEV], [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 https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST(LT_CURRENT, 36)
AC_SUBST(LT_REVISION, 0)
AC_SUBST(LT_AGE, 22)
AC_SUBST(LT_CURRENT, 38)
AC_SUBST(LT_REVISION, 1)
AC_SUBST(LT_AGE, 24)
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"`
@ -82,21 +82,11 @@ AC_ARG_ENABLE([hpack-tools],
[Build HPACK tools [default=check]])],
[request_hpack_tools=$enableval], [request_hpack_tools=check])
AC_ARG_ENABLE([asio-lib],
[AS_HELP_STRING([--enable-asio-lib],
[Build C++ libnghttp2_asio library [default=no]])],
[request_asio_lib=$enableval], [request_asio_lib=no])
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples],
[Build examples [default=check]])],
[request_examples=$enableval], [request_examples=check])
AC_ARG_ENABLE([python-bindings],
[AS_HELP_STRING([--enable-python-bindings],
[Build Python bindings [default=check]])],
[request_python_bindings=$enableval], [request_python_bindings=check])
AC_ARG_ENABLE([failmalloc],
[AS_HELP_STRING([--disable-failmalloc],
[Do not build failmalloc test program])],
@ -104,7 +94,7 @@ AC_ARG_ENABLE([failmalloc],
AC_ARG_ENABLE([lib-only],
[AS_HELP_STRING([--enable-lib-only],
[Build libnghttp2 only. This is a short hand for --disable-app --disable-examples --disable-hpack-tools --disable-python-bindings])],
[Build libnghttp2 only. This is a short hand for --disable-app --disable-examples --disable-hpack-tools])],
[request_lib_only=$enableval], [request_lib_only=no])
AC_ARG_ENABLE([http3],
@ -172,11 +162,6 @@ AC_ARG_WITH([neverbleed],
[Use neverbleed [default=no]])],
[request_neverbleed=$withval], [request_neverbleed=no])
AC_ARG_WITH([cython],
[AS_HELP_STRING([--with-cython=PATH],
[Use cython in given PATH])],
[cython_path=$withval], [])
AC_ARG_WITH([libngtcp2],
[AS_HELP_STRING([--with-libngtcp2],
[Use libngtcp2 [default=check]])],
@ -193,8 +178,6 @@ AC_ARG_WITH([libbpf],
[request_libbpf=$withval], [request_libbpf=no])
dnl Define variables
AC_ARG_VAR([CYTHON], [the Cython executable])
AC_ARG_VAR([LIBEV_CFLAGS], [C compiler flags for libev, skipping any checks])
AC_ARG_VAR([LIBEV_LIBS], [linker flags for libev, skipping any checks])
@ -220,16 +203,10 @@ PKG_PROG_PKG_CONFIG([0.20])
AM_PATH_PYTHON([3.8],, [:])
if test "x$request_python_bindings" = "xyes" &&
test "x$PYTHON" = "x:"; then
AC_MSG_ERROR([python was requested (enable-python-bindings) but not found])
fi
if [test "x$request_lib_only" = "xyes"]; then
request_app=no
request_hpack_tools=no
request_examples=no
request_python_bindings=no
request_http3=no
request_libxml2=no
request_jansson=no
@ -247,19 +224,6 @@ if [test "x$request_lib_only" = "xyes"]; then
request_libbpf=no
fi
if test "x$request_python_bindings" != "xno" &&
test "x$PYTHON" != "x:"; then
# version check is broken
AX_PYTHON_DEVEL()
fi
if test "x${cython_path}" = "x"; then
AC_CHECK_PROGS([CYTHON], [cython.py cython])
else
CYTHON=${cython_path}
AC_SUBST([CYTHON])
fi
if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
AC_DEFINE([NGHTTP2_NORETURN], [__attribute__((noreturn))], [Hint to the compiler that a function never return])
else
@ -364,8 +328,8 @@ APPLDFLAGS=
case "$host_os" in
*android*)
android_build=yes
# android does not need -pthread, but needs following 3 libs for C++
APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic -lsupc++"
# android does not need -pthread, but needs following 2 libs for C++
APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic"
;;
*)
PTHREAD_LDFLAGS="-pthread"
@ -540,7 +504,7 @@ fi
# ngtcp2 (for src)
have_libngtcp2=no
if test "x${request_libngtcp2}" != "xno"; then
PKG_CHECK_MODULES([LIBNGTCP2], [libngtcp2 >= 0.6.0], [have_libngtcp2=yes],
PKG_CHECK_MODULES([LIBNGTCP2], [libngtcp2 >= 0.10.0], [have_libngtcp2=yes],
[have_libngtcp2=no])
if test "x${have_libngtcp2}" = "xno"; then
AC_MSG_NOTICE($LIBNGTCP2_PKG_ERRORS)
@ -557,7 +521,7 @@ have_libngtcp2_crypto_openssl=no
if test "x${have_ssl_is_quic}" = "xyes" &&
test "x${request_libngtcp2}" != "xno"; then
PKG_CHECK_MODULES([LIBNGTCP2_CRYPTO_OPENSSL],
[libngtcp2_crypto_openssl >= 0.6.0],
[libngtcp2_crypto_openssl >= 0.10.0],
[have_libngtcp2_crypto_openssl=yes],
[have_libngtcp2_crypto_openssl=no])
if test "x${have_libngtcp2_crypto_openssl}" = "xno"; then
@ -599,7 +563,7 @@ fi
# nghttp3 (for src)
have_libnghttp3=no
if test "x${request_libnghttp3}" != "xno"; then
PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 0.4.0], [have_libnghttp3=yes],
PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 0.7.0], [have_libnghttp3=yes],
[have_libnghttp3=no])
if test "x${have_libnghttp3}" = "xno"; then
AC_MSG_NOTICE($LIBNGHTTP3_PKG_ERRORS)
@ -763,25 +727,6 @@ if test "x${request_jemalloc}" = "xyes" &&
AC_MSG_ERROR([jemalloc was requested (--with-jemalloc) but not found])
fi
# Check Boost Asio library
have_asio_lib=no
if test "x${request_asio_lib}" = "xyes"; then
AX_BOOST_BASE([1.54.0], [have_boost_base=yes], [have_boost_base=no])
if test "x${have_boost_base}" = "xyes"; then
AX_BOOST_ASIO()
AX_BOOST_SYSTEM()
AX_BOOST_THREAD()
if test "x${ax_cv_boost_asio}" = "xyes" &&
test "x${ax_cv_boost_system}" = "xyes" &&
test "x${ax_cv_boost_thread}" = "xyes"; then
have_asio_lib=yes
fi
fi
fi
# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL,
# libev, and libc-ares.
enable_app=no
@ -834,16 +779,6 @@ fi
AM_CONDITIONAL([ENABLE_HPACK_TOOLS], [ test "x${enable_hpack_tools}" = "xyes" ])
# C++ library libnghttp2_asio
enable_asio_lib=no
if test "x${request_asio_lib}" != "xno" &&
test "x${have_asio_lib}" = "xyes"; then
enable_asio_lib=yes
fi
AM_CONDITIONAL([ENABLE_ASIO_LIB], [ test "x${enable_asio_lib}" = "xyes" ])
# The example programs depend on OpenSSL and libevent_openssl
enable_examples=no
if test "x${request_examples}" != "xno" &&
@ -866,8 +801,7 @@ have_mruby=no
have_neverbleed=no
if test "x${enable_examples}" = "xyes" ||
test "x${enable_app}" = "xyes" ||
test "x${enable_hpack_tools}" = "xyes" ||
test "x${enable_asio_lib}" = "xyes"; then
test "x${enable_hpack_tools}" = "xyes"; then
enable_third_party=yes
# mruby (for src/nghttpx)
@ -892,27 +826,6 @@ AM_CONDITIONAL([ENABLE_THIRD_PARTY], [ test "x${enable_third_party}" = "xyes" ])
AM_CONDITIONAL([HAVE_MRUBY], [test "x${have_mruby}" = "xyes"])
AM_CONDITIONAL([HAVE_NEVERBLEED], [test "x${have_neverbleed}" = "xyes"])
# Python bindings
enable_python_bindings=no
if test "x${request_python_bindings}" != "xno" &&
test "x${CYTHON}" != "x" &&
test "x${PYTHON}" != "x:" &&
test "x${PYTHON_VERSION}" != "x"; then
enable_python_bindings=yes
fi
if test "x${request_python_bindings}" = "xyes" &&
test "x${enable_python_bindings}" != "xyes"; then
AC_MSG_ERROR([python bindings were requested (--enable-python-bindings) but dependencies are not met.])
fi
AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS],
[test "x${enable_python_bindings}" = "xyes"])
# Produce cython conditional, so that we can distribute generated C
# source
AM_CONDITIONAL([HAVE_CYTHON], [test "x${CYTHON}" != "x"])
# failmalloc tests
enable_failmalloc=no
if test "x${request_failmalloc}" = "xyes"; then
@ -1159,12 +1072,8 @@ AC_CONFIG_FILES([
tests/testdata/Makefile
third-party/Makefile
src/Makefile
src/includes/Makefile
src/libnghttp2_asio.pc
bpf/Makefile
examples/Makefile
python/Makefile
python/setup.py
integration-tests/Makefile
integration-tests/config.go
integration-tests/setenv
@ -1177,14 +1086,9 @@ AC_CONFIG_FILES([
doc/tutorial-hpack.rst
doc/nghttpx-howto.rst
doc/h2load-howto.rst
doc/libnghttp2_asio.rst
doc/python-apiref.rst
doc/building-android-binary.rst
doc/nghttp2.h.rst
doc/nghttp2ver.h.rst
doc/asio_http2.h.rst
doc/asio_http2_server.h.rst
doc/asio_http2_client.h.rst
doc/contribute.rst
contrib/Makefile
script/Makefile
@ -1226,10 +1130,6 @@ AC_MSG_NOTICE([summary of build options:
Python:
Python: ${PYTHON}
PYTHON_VERSION: ${PYTHON_VERSION}
pyexecdir: ${pyexecdir}
PYTHON_CPPFLAGS:${PYTHON_CPPFLAGS}
PYTHON_LIBS: ${PYTHON_LIBS}
Cython: ${CYTHON}
Test:
CUnit: ${have_cunit} (CFLAGS='${CUNIT_CFLAGS}' LIBS='${CUNIT_LIBS}')
Failmalloc: ${enable_failmalloc}
@ -1248,11 +1148,6 @@ AC_MSG_NOTICE([summary of build options:
Jemalloc: ${have_jemalloc} (CFLAGS='${JEMALLOC_CFLAGS}' 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}
Boost::System: ${BOOST_SYSTEM_LIB}
Boost::Thread: ${BOOST_THREAD_LIB}
Third-party:
http-parser: ${enable_third_party}
MRuby: ${have_mruby} (CFLAGS='${LIBMRUBY_CFLAGS}' LIBS='${LIBMRUBY_LIBS}')
@ -1260,9 +1155,7 @@ AC_MSG_NOTICE([summary of build options:
Features:
Applications: ${enable_app}
HPACK tools: ${enable_hpack_tools}
Libnghttp2_asio:${enable_asio_lib}
Examples: ${enable_examples}
Python bindings:${enable_python_bindings}
Threading: ${enable_threads}
HTTP/3 (EXPERIMENTAL): ${enable_http3}
])

5
doc/.gitignore vendored
View File

@ -1,15 +1,11 @@
# generated files
apiref.rst
asio_http2.h.rst
asio_http2_client.h.rst
asio_http2_server.h.rst
building-android-binary.rst
conf.py
contribute.rst
enums.rst
h2load-howto.rst
index.rst
libnghttp2_asio.rst
macros.rst
manual/
nghttp2.h.rst
@ -17,7 +13,6 @@ nghttp2_*.rst
nghttp2ver.h.rst
nghttpx-howto.rst
package_README.rst
python-apiref.rst
tutorial-client.rst
tutorial-hpack.rst
tutorial-server.rst

View File

@ -180,8 +180,6 @@ set(EXTRA_DIST
sources/tutorial-hpack.rst
sources/nghttpx-howto.rst
sources/h2load-howto.rst
sources/libnghttp2_asio.rst
sources/python-apiref.rst
sources/building-android-binary.rst
sources/contribute.rst
_exts/rubydomain/LICENSE.rubydomain
@ -269,7 +267,7 @@ add_custom_command(
apiref.rst
${APIDOCS}
COMMAND
"${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkapiref.py"
"${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkapiref.py"
apiref.rst macros.rst enums.rst types.rst .
${apiref_SOURCES}
DEPENDS

View File

@ -30,6 +30,7 @@ APIDOCS= \
nghttp2_check_authority.rst \
nghttp2_check_header_name.rst \
nghttp2_check_header_value.rst \
nghttp2_check_header_value_rfc9113.rst \
nghttp2_check_method.rst \
nghttp2_check_path.rst \
nghttp2_hd_deflate_bound.rst \
@ -68,6 +69,7 @@ APIDOCS= \
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_no_rfc9113_leading_and_trailing_ws_validation.rst \
nghttp2_option_set_peer_max_concurrent_streams.rst \
nghttp2_option_set_server_fallback_rfc7540_priorities.rst \
nghttp2_option_set_user_recv_extension_type.rst \
@ -204,8 +206,6 @@ EXTRA_DIST = \
sources/tutorial-hpack.rst \
sources/nghttpx-howto.rst \
sources/h2load-howto.rst \
sources/libnghttp2_asio.rst \
sources/python-apiref.rst \
sources/building-android-binary.rst \
sources/contribute.rst \
sources/security.rst \

View File

@ -5,13 +5,18 @@ From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
"""
from os import path
from sys import version_info as python_version
import sphinx
from sphinx import version_info as sphinx_version
from sphinx.locale import _
from sphinx.util.logging import getLogger
__version__ = '0.5.0'
__version__ = '1.0.1alpha1'
__version_full__ = __version__
logger = getLogger(__name__)
def get_html_theme_path():
"""Return list of HTML theme paths."""
@ -19,16 +24,40 @@ def get_html_theme_path():
return cur_dir
def config_initiated(app, config):
theme_options = config.html_theme_options or {}
if theme_options.get('canonical_url'):
logger.warning(
_('The canonical_url option is deprecated, use the html_baseurl option from Sphinx instead.')
)
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
def setup(app):
if sphinx.version_info >= (1, 6, 0):
# Register the theme that can be referenced without adding a theme path
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
if python_version[0] < 3:
logger.warning("Python 2 is deprecated with sphinx_rtd_theme, update to Python 3")
app.require_sphinx('1.6')
if sphinx_version <= (2, 0, 0):
logger.warning("Sphinx 1.x is deprecated with sphinx_rtd_theme, update to Sphinx 2.x or greater")
if not app.config.html_experimental_html5_writer:
logger.warning("'html4_writer' is deprecated with sphinx_rtd_theme")
else:
if app.config.html4_writer:
logger.warning("'html4_writer' is deprecated with sphinx_rtd_theme")
if sphinx.version_info >= (1, 8, 0):
# Register the theme that can be referenced without adding a theme path
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
if sphinx_version >= (1, 8, 0):
# Add Sphinx message catalog for newer versions of Sphinx
# See http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog
rtd_locale_path = path.join(path.abspath(path.dirname(__file__)), 'locale')
app.add_message_catalog('sphinx', rtd_locale_path)
app.connect('config-inited', config_initiated)
# sphinx emits the permalink icon for headers, so choose one more in keeping with our theme
if sphinx_version >= (3, 5, 0):
app.config.html_permalinks_icon = "\uf0c1"
else:
app.config.html_add_permalinks = "\uf0c1"
return {'parallel_read_safe': True, 'parallel_write_safe': True}

View File

@ -1,84 +1,77 @@
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
{%- if meta is defined and meta is not none %}
{%- set check_meta = True %}
{%- else %}
{%- set check_meta = False %}
{%- endif %}
{% if page_source_suffix %}
{% set suffix = page_source_suffix %}
{% else %}
{% set suffix = source_suffix %}
{% endif %}
{%- if check_meta and 'github_url' in meta %}
{%- set display_github = True %}
{%- endif %}
{% if meta is defined and meta is not none %}
{% set check_meta = True %}
{% else %}
{% set check_meta = False %}
{% endif %}
{%- if check_meta and 'bitbucket_url' in meta %}
{%- set display_bitbucket = True %}
{%- endif %}
{% if check_meta and 'github_url' in meta %}
{% set display_github = True %}
{% endif %}
{%- if check_meta and 'gitlab_url' in meta %}
{%- set display_gitlab = True %}
{%- endif %}
{% if check_meta and 'bitbucket_url' in meta %}
{% set display_bitbucket = True %}
{% endif %}
{% if check_meta and 'gitlab_url' in meta %}
{% set display_gitlab = True %}
{% endif %}
{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
<div role="navigation" aria-label="breadcrumbs navigation">
{%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
{#- Translators: This is an ARIA section label for page links, including previous/next page link and links to GitHub/GitLab/etc. -#}
<div role="navigation" aria-label="{{ _('Page navigation') }}">
<ul class="wy-breadcrumbs">
{% block breadcrumbs %}
{%- block breadcrumbs %}
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> &raquo;</li>
{% for doc in parents %}
{%- for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
{% endfor %}
{%- endfor %}
<li>{{ title }}</li>
{% endblock %}
{% block breadcrumbs_aside %}
{%- endblock %}
{%- block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside">
{% if hasdoc(pagename) and display_vcs_links %}
{% if display_github %}
{% if check_meta and 'github_url' in meta %}
{%- if hasdoc(pagename) and display_vcs_links %}
{%- if display_github %}
{%- if check_meta and 'github_url' in meta %}
<!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% endif %}
{% elif display_bitbucket %}
{% if check_meta and 'bitbucket_url' in meta %}
{%- else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{%- endif %}
{%- elif display_bitbucket %}
{%- if check_meta and 'bitbucket_url' in meta %}
<!-- User defined Bitbucket URL -->
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{% else %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode|default("view") }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{% endif %}
{% elif display_gitlab %}
{% if check_meta and 'gitlab_url' in meta %}
{%- else %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{%- endif %}
{%- elif display_gitlab %}
{%- if check_meta and 'gitlab_url' in meta %}
<!-- User defined GitLab URL -->
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{% else %}
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{% endif %}
{% elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
{% elif show_source and has_source and sourcename %}
{%- else %}
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{%- endif %}
{%- elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ page_source_suffix }}">{{ _('View page source') }}</a>
{%- elif show_source and has_source and sourcename %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{% endif %}
{% endif %}
{%- endif %}
{%- endif %}
</li>
{% endblock %}
{%- endblock %}
</ul>
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
{% if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
{% endif %}
{% if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
{% endif %}
{%- if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
{#- Translators: This is an ARIA section label for sequential page links, such as previous and next page links. -#}
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Sequential page navigation') }}">
{%- if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
{%- endif %}
{%- if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
{%- endif %}
</div>
{% endif %}
{%- endif %}
<hr/>
</div>

View File

@ -1,63 +1,62 @@
<footer>
{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
{% if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
{% endif %}
{% if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
{% endif %}
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
{#- Translators: This is an ARIA section label for the footer section of the page. -#}
<div class="rst-footer-buttons" role="navigation" aria-label="{{ _('Footer') }}">
{%- if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
{%- endif %}
{%- if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
{%- endif %}
</div>
{% endif %}
{%- endif %}
<hr/>
<div role="contentinfo">
{%- block contentinfo %}
<p>
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% set path = pathto('copyright') %}
{% set copyright = copyright|e %}
&copy; <a href="{{ path }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright }}
{%- trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% set copyright = copyright|e %}
&copy; {% trans %}Copyright{% endtrans %} {{ copyright }}
{%- trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if build_id and build_url %}
<span class="build">
{# Translators: Build is a noun, not a verb #}
{% trans %}Build{% endtrans %}
{#- Translators: Build is a noun, not a verb -#}
{%- trans %}Build{% endtrans -%}
<a href="{{ build_url }}">{{ build_id }}</a>.
</span>
{%- elif commit %}
<span class="commit">
{# Translators: the phrase "revision" comes from Git, referring to a commit #}
{% trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
{#- Translators: the phrase "revision" comes from Git, referring to a commit #}
{%- trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
</span>
{%- endif %}
{%- if last_updated %}
<span class="lastupdated">
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
</span>
{%- endif %}
{%- endif -%}
</p>
{%- endblock %}
</div>
{%- if show_sphinx %}
{% set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
{% set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
{# Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{% trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
{# Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #}
{% if show_sphinx %}
{%- set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
{%- set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
{#- Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{%- trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
{#- Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documentation #}
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
{# Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
{#- Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
{%- endif %}
{% endif %}
{%- block extrafooter %} {% endblock %}
</footer>

View File

@ -7,56 +7,74 @@
{%- set titlesuffix = "" %}
{%- endif %}
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' %}
{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' -%}
{# Build sphinx_version_info tuple from sphinx_version string in pure Jinja #}
{%- set (_ver_major, _ver_minor, _ver_bugfix) = sphinx_version.split('.') | map('int') -%}
{%- set sphinx_version_info = (_ver_major, _ver_minor, _ver_bugfix) -%}
<!DOCTYPE html>
<html class="{{ sphinx_writer }}" lang="{{ lang_attr }}" >
<head>
<meta charset="utf-8">
{{ metatags }}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block htmltitle %}
<meta charset="utf-8" />
{{- metatags }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{% endblock %}
{%- endblock -%}
{# CSS #}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{#- CSS #}
{%- if sphinx_version_info < (4, 0) -%}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- endif %}
{%- for css in css_files %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
{%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
{%- endif %}
{%- endfor %}
{%- for cssfile in extra_css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
{%- endfor -%}
{# FAVICON #}
{% if favicon %}
{#- FAVICON #}
{%- if favicon %}
{%- if sphinx_version_info < (4, 0) -%}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{% endif %}
{# CANONICAL URL #}
{% if theme_canonical_url %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{% endif %}
{%- else %}
<link rel="shortcut icon" href="{{ favicon_url }}"/>
{%- endif %}
{%- endif -%}
{# JAVASCRIPTS #}
{#- CANONICAL URL (deprecated) #}
{%- if theme_canonical_url and not pageurl %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{%- endif -%}
{#- CANONICAL URL #}
{%- if pageurl %}
<link rel="canonical" href="{{ pageurl|e }}" />
{%- endif -%}
{#- JAVASCRIPTS #}
{%- block scripts %}
<!--[if lt IE 9]>
<script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
<![endif]-->
{%- if not embedded %}
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
{% if sphinx_version >= "1.8.0" %}
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
{%- if sphinx_version_info >= (1, 8) -%}
{%- if sphinx_version_info < (4, 0) -%}
<script id="documentation_options" data-url_root="{{ url_root }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
{%- endif -%}
{%- for scriptfile in script_files %}
{{ js_tag(scriptfile) }}
{%- endfor %}
{% else %}
<script type="text/javascript">
{%- else %}
<script>
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'{{ url_root }}',
VERSION:'{{ release|e }}',
@ -68,12 +86,12 @@
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
<script src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{% endif %}
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{%- endif %}
<script src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{# OPENSEARCH #}
{#- OPENSEARCH #}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
@ -107,133 +125,131 @@
<body class="wy-body-for-nav">
{% block extrabody %} {% endblock %}
{%- block extrabody %} {% endblock %}
<div class="wy-grid-for-nav">
{# SIDE NAV, TOGGLES ON MOBILE #}
{#- SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}>
{% block sidebartitle %}
{%- block sidebartitle %}
{% if logo and theme_logo_only %}
{%- if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{% else %}
{%- else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{% endif %}
{%- endif %}
{% if logo %}
{# Not strictly valid HTML, but it's the only way to display/scale
it properly, without weird scripting or heaps of work
{%- if logo %}
{#- Not strictly valid HTML, but it's the only way to display/scale
it properly, without weird scripting or heaps of work
#}
{%- if sphinx_version_info < (4, 0) -%}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
{% endif %}
{%- else %}
<img src="{{ logo_url }}" class="logo" alt="{{ _('Logo') }}"/>
{%- endif %}
{%- endif %}
</a>
{% if theme_display_version %}
{%- if theme_display_version %}
{%- set nav_version = version %}
{% if READTHEDOCS and current_version %}
{%- if READTHEDOCS and current_version %}
{%- set nav_version = current_version %}
{% endif %}
{% if nav_version %}
{%- endif %}
{%- if nav_version %}
<div class="version">
{{ nav_version }}
</div>
{% endif %}
{% endif %}
{%- endif %}
{%- endif %}
{% include "searchbox.html" %}
{%- include "searchbox.html" %}
{% endblock %}
{%- endblock %}
</div>
{% block navigation %}
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{% block menu %}
{#
The singlehtml builder doesn't handle this toctree call when the
toctree is empty. Skip building this for now.
#}
{% if 'singlehtml' not in builder %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=theme_includehidden|tobool,
titles_only=theme_titles_only|tobool) %}
{% endif %}
{% if global_toc %}
{{ global_toc }}
{% else %}
{%- block navigation %}
{#- Translators: This is an ARIA section label for the main navigation menu -#}
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="{{ _('Navigation menu') }}">
{%- block menu %}
{%- set toctree = toctree(maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=theme_includehidden|tobool,
titles_only=theme_titles_only|tobool) %}
{%- if toctree %}
{{ toctree }}
{%- else %}
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
{% endif %}
{% endblock %}
{%- endif %}
{%- endblock %}
</div>
{% endblock %}
{%- endblock %}
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
<nav class="wy-nav-top" aria-label="top navigation">
{% block mobile_nav %}
{#- MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
{#- Translators: This is an ARIA section label for the navigation menu that is visible when viewing the page on mobile devices -#}
<nav class="wy-nav-top" aria-label="{{ _('Mobile navigation menu') }}" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}>
{%- block mobile_nav %}
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
{% endblock %}
{%- endblock %}
</nav>
<div class="wy-nav-content">
{%- block content %}
{% if theme_style_external_links|tobool %}
{%- if theme_style_external_links|tobool %}
<div class="rst-content style-external-links">
{% else %}
{%- else %}
<div class="rst-content">
{% endif %}
{%- endif %}
{% include "breadcrumbs.html" %}
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
{%- block document %}
<div itemprop="articleBody">
{% block body %}{% endblock %}
{% block body %}{% endblock %}
</div>
{% if self.comments()|trim %}
<div class="articleComments">
{% block comments %}{% endblock %}
</div>
{% endif%}
{%- if self.comments()|trim %}
<div class="articleComments">
{%- block comments %}{% endblock %}
</div>
{%- endif%}
</div>
{%- endblock %}
{% include "footer.html" %}
</div>
{%- endblock %}
</div>
</section>
</div>
{% include "versions.html" %}
{% include "versions.html" -%}
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
});
</script>
{# Do not conflict with RTD insertion of analytics script #}
{% if not READTHEDOCS %}
{% if theme_analytics_id %}
{#- Do not conflict with RTD insertion of analytics script #}
{%- if not READTHEDOCS %}
{%- if theme_analytics_id %}
<!-- Theme Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ theme_analytics_id }}"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
ga('create', '{{ theme_analytics_id }}', 'auto');
ga('send', 'pageview');
gtag('config', '{{ theme_analytics_id }}', {
'anonymize_ip': {{ 'true' if theme_analytics_anonymize_ip|tobool else 'false' }},
});
</script>
{% endif %}
{% endif %}
{%- endif %}
{%- endif %}
{%- block footer %} {% endblock %}

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Tom Kunze <transifex.com@tomabrafix.de>, 2019\n"
"Language-Team: German (https://www.transifex.com/readthedocs/teams/101354/de/)\n"
@ -22,37 +22,32 @@ msgstr ""
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Auf GitHub bearbeiten"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Auf Bitbucket bearbeiten"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Auf GitLab bearbeiten"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Quelltext anzeigen"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Weiter"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Zurück"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Copyright"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Weiter"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Build"
@ -64,49 +59,53 @@ msgstr "Zuletzt aktualisiert am %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Erstellt mit %(sphinx_web)s mit einem"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "bereitgestellt von %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "%(docstitle)s durchsuchen"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Über diese Dokumentation"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Suche"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Copyright"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Bitte aktiviere JavaScript, um die Suchfunktion zu nutzen."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Suchergebnisse"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -119,7 +118,7 @@ msgstr ""
msgid "Search docs"
msgstr "Dokumentation durchsuchen"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versionen"
@ -135,9 +134,3 @@ msgstr "Projektübersicht"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Builds"
#~ msgid "Docs"
#~ msgstr "Dokumentation"
#~ msgid "Free document hosting provided by"
#~ msgstr "Kostenloses Dokumentationen-Hosting zur Verfügung gestellt von"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 15:43-0600\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
@ -19,42 +19,64 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr ""
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr ""
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr ""
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr ""
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr ""
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr ""
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr ""
@ -65,59 +87,70 @@ msgstr ""
#. the variable "sphinx_web" is a link to the Sphinx project documentation with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr ""
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr ""
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr ""
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr ""
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr ""
#: sphinx_rtd_theme/layout.html:121
msgid "Documentation Home"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr ""
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr ""
#: sphinx_rtd_theme/search.html:29
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr ""
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr ""
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr ""
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@ -127,7 +160,7 @@ msgstr ""
msgid "Search docs"
msgstr ""
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr ""
@ -154,3 +187,15 @@ msgstr ""
#~ msgid "Free document hosting provided by"
#~ msgstr ""
#~ msgid "Documentation Home"
#~ msgstr ""
#~ msgid "Breadcrumbs"
#~ msgstr ""
#~ msgid "Main"
#~ msgstr ""
#~ msgid "Top"
#~ msgstr ""

View File

@ -6,15 +6,15 @@
#
# Translators:
# Anthony <aj@ohess.org>, 2019
# Leonardo J. Caballero G. <leonardocaballero@gmail.com>, 2020
# Radina Matic <radina.matic@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Leonardo J. Caballero G. <leonardocaballero@gmail.com>, 2020\n"
"Last-Translator: Radina Matic <radina.matic@gmail.com>, 2021\n"
"Language-Team: Spanish (https://www.transifex.com/readthedocs/teams/101354/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -23,107 +23,117 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Editar en GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Editar en Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Editar en GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Ver código fuente de la página"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Siguiente"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Anterior"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Derechos de autor"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Siguiente"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Pie de página"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Derechos de autor</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Derechos de autor %(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Construido"
msgstr "Compilación"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Revisión"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Actualizado por última vez en %(last_updated)s."
msgstr "Actualizado por última vez el %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Construido con %(sphinx_web)s usando un"
msgstr "Compilado con %(sphinx_web)s usando un"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "tema"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "proporcionado por %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Buscar en %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Sobre esta documentación"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Índice"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Búsqueda"
#: sphinx_rtd_theme/layout.html:121
msgid "Documentation Home"
msgstr "Inicio de Documentación"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Derechos de autor"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logotipo"
#: sphinx_rtd_theme/search.html:29
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
"Por favor, active JavaScript para habilitar la funcionalidad de búsqueda."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Resultados de la búsqueda"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -136,7 +146,7 @@ msgstr ""
msgid "Search docs"
msgstr "Buscar documentos"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versiones"
@ -155,10 +165,4 @@ msgstr "Página de Proyecto"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Construcciones"
#~ msgid "Docs"
#~ msgstr "Documentos"
#~ msgid "Free document hosting provided by"
#~ msgstr "Alojamiento gratuito de documentos proporcionado por"
msgstr "Compilaciones"

View File

@ -6,15 +6,15 @@
#
# Translators:
# Anthony <aj@ohess.org>, 2020
# Ivar Smolin <okul@linux.ee>, 2020
# Ivar Smolin <okul@linux.ee>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Ivar Smolin <okul@linux.ee>, 2020\n"
"Last-Translator: Ivar Smolin <okul@linux.ee>, 2021\n"
"Language-Team: Estonian (https://www.transifex.com/readthedocs/teams/101354/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -23,42 +23,52 @@ msgstr ""
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Muuda GitHubis"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Muuda Bitbucketis"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Muuda GitLabis"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Vaata lehe lähtekoodi"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Järgmine"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Eelmine"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Autoriõigus"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Järgmine"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Jalus"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Autoriõigus</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Autoriõigus %(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Ehitus"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Redaktsioon"
@ -70,52 +80,59 @@ msgstr "Viimati uuendatud %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Ehitatud %(sphinx_web)s'iga,"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "kujundusteema"
#: sphinx_rtd_theme/layout.html:79
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "on loonud %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Otsi dokumendist %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Nende dokumentide kirjeldused"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Indeks"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Otsing"
#: sphinx_rtd_theme/layout.html:121
msgid "Documentation Home"
msgstr "Dokumentatsiooni kodu"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Autoriõigus"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Otsimisfunktsiooni lubamiseks aktiveeri palun JavaScript"
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Otsingu tulemused"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -127,7 +144,7 @@ msgstr ""
msgid "Search docs"
msgstr "Otsi dokumente"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versioonid"
@ -147,9 +164,3 @@ msgstr "Projekti kodu"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Ehitused"
#~ msgid "Docs"
#~ msgstr "Dokumendid"
#~ msgid "Free document hosting provided by"
#~ msgstr "Dokumentatsiooni majutab tasuta"

Binary file not shown.

View File

@ -0,0 +1,160 @@
# English translations for sphinx_rtd_theme.
# Copyright (C) 2019 ORGANIZATION
# This file is distributed under the same license as the sphinx_rtd_theme
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Anthony <aj@ohess.org>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Anthony <aj@ohess.org>, 2021\n"
"Language-Team: Persian (Iran) (https://www.transifex.com/readthedocs/teams/101354/fa_IR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: fa_IR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "ویرایش در GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "ویرایش در Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "ویرایش در GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "نمایش متن منبع صفحه"
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "پیشین"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "بعدی"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">حق انتشار</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; حق انتشار%(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "ساخت"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "بازبینی"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "آخرین بروز رسانی در %(last_updated)s ."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "ساخته شده با %(sphinx_web)s"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "پوسته"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "تهیّه شده با %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "جستجو در %(docstitle)s"
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "درباره این مستندات"
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "فهرست"
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "جستجوی"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "کپی رایت"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "آرم"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "لطفاً جاوا اسکریپت را فعّال کنید تا قابلیّت جستجو فعّال شود."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "نتایج جستجو"
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
msgstr ""
"جستجوی شما با هیچ سندی مطابقت نداشت. لطفاً از درستی املای واژگان مطمئن شوید."
" هم‌چنین بررسی کنید آیا به اندازه کافی دسته بندی انتخاب کرده‌اید."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "جستجوی مستندات"
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "نگارش‌ها"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "بارگیری‌ها"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "درباره‌ی خواندن مستندات"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "صفحه خانگی پروژه"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "ساخت‌ها"

View File

@ -5,16 +5,16 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Radina Matic <radina.matic@gmail.com>, 2020
# Anthony <aj@ohess.org>, 2020
# Radina Matic <radina.matic@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Anthony <aj@ohess.org>, 2020\n"
"Last-Translator: Radina Matic <radina.matic@gmail.com>, 2021\n"
"Language-Team: French (https://www.transifex.com/readthedocs/teams/101354/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -23,42 +23,52 @@ msgstr ""
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Éditer sur GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Éditer sur Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Éditer sur GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Afficher la source de la page"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Suivant"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Précédent"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Droits d'auteur"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Suivant"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Pied de page"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Droits d'auteur</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Droits d'auteur %(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Compilation"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Révision"
@ -70,55 +80,59 @@ msgstr "Dernière mise à jour le %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Compilé avec %(sphinx_web)s en utilisant un"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "thème"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "fourni par %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Rechercher dans %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "À propos de cette documentation"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Rechercher"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Droits d'auteur"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Activez JavaScript pour accéder à la fonction de recherche."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Résultats de la recherche"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -131,7 +145,7 @@ msgstr ""
msgid "Search docs"
msgstr "Rechercher docs"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versions"
@ -139,6 +153,11 @@ msgstr "Versions"
msgid "Downloads"
msgstr "Téléchargements"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "À propos de Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "Accueil du projet"
@ -146,9 +165,3 @@ msgstr "Accueil du projet"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Compilations"
#~ msgid "Docs"
#~ msgstr "Docs"
#~ msgid "Free document hosting provided by"
#~ msgstr "Hébergement gratuit de documents fourni par"

Binary file not shown.

View File

@ -0,0 +1,190 @@
# English translations for sphinx_rtd_theme.
# Copyright (C) 2019 ORGANIZATION
# This file is distributed under the same license as the sphinx_rtd_theme
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Anthony <aj@ohess.org>, 2021
# Maurizio Paglia <mpaglia0@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Maurizio Paglia <mpaglia0@gmail.com>, 2021\n"
"Language-Team: Italian (https://www.transifex.com/readthedocs/teams/101354/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr "Naviga tra le pagine"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Modifica su GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Modifica su Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Modifica su GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Visualizza sorgente pagina"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr "Naviga sequenzialmente tra le pagine"
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Precedente"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Prossimo"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Piè di pagina"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Copyright %(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Rev."
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Revisione"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Ultimo aggiornamento il %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Realizzato con %(sphinx_web)s e il tema"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "tema"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "fornito da %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Cerca in %(docstitle)s"
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Nota sulla documentazione"
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Indice"
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Ricerca"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Copyright"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr "Menu di navigazione"
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr "Menu navigazione dispositivi mobili"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Devi attivare JavaScript per attivare la funzione di ricerca."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Risultati della ricerca"
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
msgstr ""
"La tua ricerca non ha prodotto nessun risultato. Assicurati di aver scritto "
"correttamente tutti i termini cercati e di aver selezionato sufficienti "
"categorie."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Cerca documenti"
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versioni"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Downloads"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "Riguardo Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "Home progetto"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Rev."

Binary file not shown.

View File

@ -0,0 +1,188 @@
# English translations for sphinx_rtd_theme.
# Copyright (C) 2019 ORGANIZATION
# This file is distributed under the same license as the sphinx_rtd_theme
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Tomas Straupis, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Tomas Straupis, 2021\n"
"Language-Team: Lithuanian (https://www.transifex.com/readthedocs/teams/101354/lt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: lt\n"
"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);\n"
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr "Puslapių navigacija"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Keisti GitHub'e"
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Keisti Bitbucket'e"
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Keisti GitLab'e"
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Žiūrėti puslapio šaltinį"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr "Puslapių navigacija iš eilės"
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Ankstesnis"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Kitas"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Poraštė"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Copyright %(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Surinkimas"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Versija"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Atnaujinta %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Surinkta su %(sphinx_web)s naudojant"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "temą"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "pateiktą %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Ieškoti %(docstitle)s"
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Apie šiuos dokumentus"
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Indeksas"
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Paieška"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Autorių teisės"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr "Navigacijos meniu"
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr "Mobilios navigacijos meniu"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Prašome įjungti JavaScript, kad veiktų paieškos funkcionalumas."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Paieškos rezultatai"
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
msgstr ""
"Jūsų paieškai neatitiko nei vienas dokumentas. Prašome įsitikinti, kad visi "
"žodžiai parašyti teisingai ir kad parinkote pakankamai kategorijų."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Ieškoti dokumentuose"
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versijos"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Atsisiuntimai"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "Apie Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "Projekto namai"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Surinkimai"

View File

@ -5,15 +5,15 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Jesse Tan, 2019
# Jesse Tan, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Jesse Tan, 2019\n"
"Last-Translator: Jesse Tan, 2021\n"
"Language-Team: Dutch (https://www.transifex.com/readthedocs/teams/101354/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -22,42 +22,64 @@ msgstr ""
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr "Paginanavigatie"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Bewerk op GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Bewerk op BitBucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Bewerk op GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Bekijk paginabron"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Volgende"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr "Navigatie voor gerelateerde pagina's"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Vorige"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Copyright"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Volgende"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Voettekst"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Copyright %(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Bouwresultaat"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Revisie"
@ -69,55 +91,70 @@ msgstr "Laatste update op %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Gebouwd met %(sphinx_web)s met een"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "thema"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "geleverd door %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Zoek binnen %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Over deze documenten"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Zoek"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Copyright"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr "Navigatiemenu"
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr "Navigatiemenu voor mobiel"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Zet JavaScript aan om de zoekfunctie mogelijk te maken."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Zoekresultaten"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -129,7 +166,7 @@ msgstr ""
msgid "Search docs"
msgstr "Zoek in documentatie"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versies"
@ -149,9 +186,3 @@ msgstr "Project Home"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Bouwresultaten"
#~ msgid "Docs"
#~ msgstr "Documentatie"
#~ msgid "Free document hosting provided by"
#~ msgstr "Gratis hosting voor documentatie verzorgd door"

Binary file not shown.

View File

@ -0,0 +1,137 @@
# English translations for sphinx_rtd_theme.
# Copyright (C) 2019 ORGANIZATION
# This file is distributed under the same license as the sphinx_rtd_theme
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Michal Sniatala, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Michal Sniatala, 2021\n"
"Language-Team: Polish (https://www.transifex.com/readthedocs/teams/101354/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Edytuj na GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Edytuj na Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Edytuj na GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Zobacz źródło strony"
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Poprzedni"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Następny"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Prawa zastrzeżone</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Prawa zastrzeżone %(copyright)s."
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Ostatnia aktualizacja %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Zbudowano w %(sphinx_web)s używając"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "dostarczone przez %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Szukaj w %(docstitle)s"
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "O tych dokumentach"
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Indeks"
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Szukaj"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Prawa zastrzeżone"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
"Proszę aktywować obsługę JavaScript, aby włączyć funkcję wyszukiwania."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Wyniki wyszukiwania"
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
msgstr ""
"Nie znaleziono szukanej frazy. Upewnij się, że wszystkie słowa są napisane "
"poprawnie i że wybrałeś wystarczającą liczbę kategorii."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Szukaj"
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Wersje"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Pobrania"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "Na Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "Strona projektu"

Binary file not shown.

View File

@ -0,0 +1,161 @@
# English translations for sphinx_rtd_theme.
# Copyright (C) 2019 ORGANIZATION
# This file is distributed under the same license as the sphinx_rtd_theme
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Ana Costa <anacosta.xl@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Ana Costa <anacosta.xl@gmail.com>, 2021\n"
"Language-Team: Portuguese (https://www.transifex.com/readthedocs/teams/101354/pt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr "Navegação da página"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Editar no GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Editar no Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Editar no GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Ver código-fonte da página"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr "Navegação sequencial da página"
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Anterior"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Seguinte"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Rodapé"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Revisão"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Última actualização em %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Compilado com %(sphinx_web)s usando um"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "tema"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "fornecido por %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Procurar em %(docstitle)s"
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Sobre estes documentos"
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Índice"
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Pesquisar"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr "Menu de navegação"
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr "Menu de navegação móvel"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Por favor, active o JavaScript para permitir a função de pesquisa."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Resultados de Pesquisa"
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
msgstr ""
"A sua pesquisa não encontrou nenhum documento. Por favor confirme que todas "
"as palavras estão bem escritas e que selecionou categorias suficientes."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Pesquisar docs"
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versões"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Transferências"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "No Read the Docs"

View File

@ -5,15 +5,16 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Rafael Fontenelle <rffontenelle@gmail.com>, 2020
# Rafael Fontenelle <rffontenelle@gmail.com>, 2021
# Wellington Uemura <wellingtonuemura@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2020\n"
"Last-Translator: Wellington Uemura <wellingtonuemura@gmail.com>, 2021\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/readthedocs/teams/101354/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -22,42 +23,64 @@ msgstr ""
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr "Navegação da página"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Editar no GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Editar no Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Editar no GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Ver código-fonte da página"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Próximo"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr "Navegação sequencial da página"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Anterior"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Copyright"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Próximo"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Rodapé"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Direitos autorais</a> %(copyright)s."
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Direitos autorais %(copyright)s."
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Compilação"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Revisão"
@ -69,56 +92,71 @@ msgstr "Última atualização em %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Compilado com %(sphinx_web)s usando um"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "tema"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "fornecido por %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Pesquisar em %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Sobre esses documentos"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Índice"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Pesquisar"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Copyright"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr "Menu de navegação"
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr "Menu de navegação móvel"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
"Por favor, ative JavaScript para habilitar a funcionalidade de pesquisa."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Resultados da pesquisa"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -131,7 +169,7 @@ msgstr ""
msgid "Search docs"
msgstr "Pesquisar documentos"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versões"
@ -151,9 +189,3 @@ msgstr "Página inicial"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Compilações"
#~ msgid "Docs"
#~ msgstr "Docs"
#~ msgid "Free document hosting provided by"
#~ msgstr "Hospedagem de documentos livres fornecida por"

View File

@ -5,16 +5,16 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
# Translators:
# Dmitry Shachnev <mitya57@gmail.com>, 2019
# lvv83 <vlozhkin83@gmail.com>, 2019
# Dmitry Shachnev <mitya57@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: lvv83 <vlozhkin83@gmail.com>, 2019\n"
"Last-Translator: Dmitry Shachnev <mitya57@gmail.com>, 2021\n"
"Language-Team: Russian (https://www.transifex.com/readthedocs/teams/101354/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -23,42 +23,64 @@ msgstr ""
"Language: ru\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr "Навигация по страницам"
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Редактировать на GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Редактировать на BitBucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Редактировать на GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Просмотреть исходный код страницы"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Следующая"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr "Навигация по соседним страницам"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Предыдущая"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Авторские права"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Следующая"
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr "Нижняя область"
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&#169; <a href=\"%(path)s\">Авторские права</a> %(copyright)s. "
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr "&#169; Авторские права %(copyright)s. "
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Сборка"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Ревизия"
@ -70,55 +92,70 @@ msgstr "Последний раз обновлено %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Собрано при помощи %(sphinx_web)s с использованием"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "темы,"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "предоставленной %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Поиск в %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Об этих документах"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Алфавитный указатель"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Поиск"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Авторские права"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Логотип"
#: sphinx_rtd_theme/search.html:29
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr "Меню навигации"
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr "Меню навигации для мобильных устройств"
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Активируйте JavaScript, чтобы использовать функционал поиска."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Результаты поиска"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -130,7 +167,7 @@ msgstr ""
msgid "Search docs"
msgstr "Поиск в документации"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Версии"
@ -150,9 +187,3 @@ msgstr "Домашняя страница проекта"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Сборки"
#~ msgid "Docs"
#~ msgstr "Документация"
#~ msgid "Free document hosting provided by"
#~ msgstr "Бесплатный хостинг документов, предоставленный"

View File

@ -1,15 +1,15 @@
# Translations template for sphinx_rtd_theme.
# Copyright (C) 2020 ORGANIZATION
# Copyright (C) 2021 ORGANIZATION
# This file is distributed under the same license as the sphinx_rtd_theme
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Project-Id-Version: sphinx_rtd_theme 1.0.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,42 +18,64 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#. This is an ARIA section label for page links, including previous/next page
#. link and links to GitHub/GitLab/etc.
#: sphinx_rtd_theme/breadcrumbs.html:22
msgid "Page navigation"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
#. This is an ARIA section label for sequential page links, such as previous
#. and next page links.
#: sphinx_rtd_theme/breadcrumbs.html:67
msgid "Sequential page navigation"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr ""
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr ""
#. This is an ARIA section label for the footer section of the page.
#: sphinx_rtd_theme/footer.html:4
msgid "Footer"
msgstr ""
#: sphinx_rtd_theme/footer.html:21
#, python-format
msgid "&#169; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr ""
#: sphinx_rtd_theme/footer.html:23
#, python-format
msgid "&#169; Copyright %(copyright)s."
msgstr ""
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr ""
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr ""
@ -64,59 +86,70 @@ msgstr ""
#. the variable "sphinx_web" is a link to the Sphinx project documentation with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr ""
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr ""
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr ""
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr ""
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr ""
#: sphinx_rtd_theme/layout.html:121
msgid "Documentation Home"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr ""
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr ""
#: sphinx_rtd_theme/search.html:29
#. This is an ARIA section label for the main navigation menu
#: sphinx_rtd_theme/layout.html:173
msgid "Navigation menu"
msgstr ""
#. This is an ARIA section label for the navigation menu that is visible when
#. viewing the page on mobile devices
#: sphinx_rtd_theme/layout.html:195
msgid "Mobile navigation menu"
msgstr ""
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr ""
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@ -126,7 +159,7 @@ msgstr ""
msgid "Search docs"
msgstr ""
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr ""

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Daniel Holmberg <daniel.holmberg97@gmail.com>, 2020\n"
"Language-Team: Swedish (https://www.transifex.com/readthedocs/teams/101354/sv/)\n"
@ -22,42 +22,37 @@ msgstr ""
"Language: sv\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "Editera på GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Editera på Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "Editera på GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Visa sidkälla"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Nästa"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Tillbaka"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Upphovsrätt"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Nästa"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Bygg"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Ändra"
@ -69,60 +64,60 @@ msgstr "Senast uppdaterad %(last_updated)s."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Gjord med %(sphinx_web)s med hjälp av"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "tema"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "erhållet av %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Sök i %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Om dessa dokument"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Sök"
#: sphinx_rtd_theme/layout.html:121
msgid "Documentation Home"
msgstr "Dokumentation Hem"
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Upphovsrätt"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
"Var vänlig och aktivera JavaScript för att möjliggöra sökfunktionaliteten."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Sökresultat"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -134,7 +129,7 @@ msgstr ""
msgid "Search docs"
msgstr "Sök i dokumentationen"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versioner"
@ -151,8 +146,6 @@ msgstr "På Read the Docs"
msgid "Project Home"
msgstr "Projekt Hem"
#~ msgid "Docs"
#~ msgstr "Dokumentation"
#~ msgid "Free document hosting provided by"
#~ msgstr "Gratis dokumentations hysning erhållen av"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Versioner"

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: BouRock, 2020\n"
"Language-Team: Turkish (https://www.transifex.com/readthedocs/teams/101354/tr/)\n"
@ -22,42 +22,37 @@ msgstr ""
"Language: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "GitHub'da Düzenle"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "Bitbucket'ta Düzenle"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "GitLab'ta Düzenle"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "Sayfa kaynağını görüntüle"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Sonraki"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "Önceki"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Telif hakkı"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "Sonraki"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "Oluşturma"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "Gözden geçirme"
@ -67,50 +62,54 @@ msgid "Last updated on %(last_updated)s."
msgstr "Son olarak %(last_updated)s tarihinde güncellendi."
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "tema"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "kullanılarak %(readthedocs_web)s tarafından sağlanmasıyla oluşturuldu"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "%(docstitle)s içinde ara"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "Bu belgeler hakkında"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "Dizin"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Arama"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "Telif hakkı"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
"Arama işlevselliğini etkinleştirmek için lütfen JavaScript'i etkinleştirin."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "Arama Sonuçları"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -122,7 +121,7 @@ msgstr ""
msgid "Search docs"
msgstr "Belgeleri arayın"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Sürümler"
@ -142,6 +141,3 @@ msgstr "Proje Ana Sayfa"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Oluşturmalar"
#~ msgid "Free document hosting provided by"
#~ msgstr "Ücretsiz belge barındırmayı sağlayan"

View File

@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-06 13:38-0600\n"
"POT-Creation-Date: 2021-09-13 13:35-0600\n"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Anthony <aj@ohess.org>, 2020\n"
"Language-Team: Chinese (China) (https://www.transifex.com/readthedocs/teams/101354/zh_CN/)\n"
@ -23,40 +23,40 @@ msgstr ""
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
#: sphinx_rtd_theme/breadcrumbs.html:37 sphinx_rtd_theme/breadcrumbs.html:39
msgid "Edit on GitHub"
msgstr "在 GitHub 上修改"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
#: sphinx_rtd_theme/breadcrumbs.html:44 sphinx_rtd_theme/breadcrumbs.html:46
msgid "Edit on Bitbucket"
msgstr "在 Bitbucket 上修改"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
#: sphinx_rtd_theme/breadcrumbs.html:51 sphinx_rtd_theme/breadcrumbs.html:53
msgid "Edit on GitLab"
msgstr "在 GitLab 上修改"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
#: sphinx_rtd_theme/breadcrumbs.html:56 sphinx_rtd_theme/breadcrumbs.html:58
msgid "View page source"
msgstr "查看页面源码"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "下一页"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
#: sphinx_rtd_theme/breadcrumbs.html:69 sphinx_rtd_theme/footer.html:6
msgid "Previous"
msgstr "上一页"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "版权所有"
#: sphinx_rtd_theme/breadcrumbs.html:72 sphinx_rtd_theme/footer.html:9
msgid "Next"
msgstr "下一页"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
#: sphinx_rtd_theme/footer.html:30
msgid "Build"
msgstr "构建"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:36
msgid "Revision"
msgstr "修订"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
@ -65,55 +65,59 @@ msgstr "最后更新时间 %(last_updated)s。"
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#: sphinx_rtd_theme/footer.html:53
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "利用 %(sphinx_web)s 构建,使用了 "
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
#. generated documenation
#: sphinx_rtd_theme/footer.html:54
#. generated documentation
#: sphinx_rtd_theme/footer.html:55
msgid "theme"
msgstr "主题"
#. this is always used as "provided by Read the Docs", and should not imply
#. Read the Docs is an author of the generated documentation.
#: sphinx_rtd_theme/footer.html:56
#: sphinx_rtd_theme/footer.html:57
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "由 %(readthedocs_web)s开发"
#: sphinx_rtd_theme/layout.html:79
#: sphinx_rtd_theme/layout.html:97
#, python-format
msgid "Search within %(docstitle)s"
msgstr "在 %(docstitle)s中搜索"
#: sphinx_rtd_theme/layout.html:87
#: sphinx_rtd_theme/layout.html:105
msgid "About these documents"
msgstr "关于此文档"
#: sphinx_rtd_theme/layout.html:90
#: sphinx_rtd_theme/layout.html:108
msgid "Index"
msgstr "索引"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
#: sphinx_rtd_theme/layout.html:111 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "搜索"
#: sphinx_rtd_theme/layout.html:128
#: sphinx_rtd_theme/layout.html:114
msgid "Copyright"
msgstr "版权所有"
#: sphinx_rtd_theme/layout.html:147 sphinx_rtd_theme/layout.html:149
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
#: sphinx_rtd_theme/search.html:31
msgid "Please activate JavaScript to enable the search functionality."
msgstr "请启用 JavaScript 以便使用搜索功能"
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
#: sphinx_rtd_theme/search.html:39
msgid "Search Results"
msgstr "搜索结果"
#: sphinx_rtd_theme/search.html:39
#: sphinx_rtd_theme/search.html:41
msgid ""
"Your search did not match any documents. Please make sure that all words are"
" spelled correctly and that you've selected enough categories."
@ -123,7 +127,7 @@ msgstr "您的搜索没有匹配到任何文档。请确保所有单词拼写正
msgid "Search docs"
msgstr "在文档中搜索"
#: sphinx_rtd_theme/versions.html:11
#: sphinx_rtd_theme/versions.html:3 sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "版本列表"
@ -143,9 +147,3 @@ msgstr "项目首页"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "构建"
#~ msgid "Docs"
#~ msgstr "文档"
#~ msgid "Free document hosting provided by"
#~ msgstr "此文档免费托管于"

View File

@ -5,22 +5,23 @@
Template for the search page.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
:license: BSD, see https://github.com/sphinx-doc/sphinx/blob/master/LICENSE for details.
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
{% set display_vcs_links = False %}
{%- block scripts %}
{{ super() }}
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
<script src="{{ pathto('_static/searchtools.js', 1) }}"></script>
<script src="{{ pathto('_static/language_data.js', 1) }}"></script>
{%- endblock %}
{% block footer %}
<script type="text/javascript">
<script>
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
</script>
{# this is used when loading the search index using $.ajax fails,
such as on Chrome for documents on localhost #}
<script type="text/javascript" id="searchindexloader"></script>
<script id="searchindexloader"></script>
{{ super() }}
{% endblock %}
{% block body %}

View File

@ -1,4 +1,4 @@
{%- if builder != 'singlehtml' %}
{%- if 'singlehtml' not in builder %}
<div role="search">
<form id="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" placeholder="{{ _('Search docs') }}" />

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,7 @@ pygments_style = default
[options]
canonical_url =
analytics_id =
analytics_anonymize_ip = False
collapse_navigation = True
sticky_navigation = True
navigation_depth = 4
@ -15,4 +16,5 @@ logo_only =
display_version = True
prev_next_buttons_location = bottom
style_external_links = False
style_nav_header_background =
style_nav_header_background =
vcs_pageview_mode =

View File

@ -1,6 +1,6 @@
{% if READTHEDOCS %}
{# Add rst-badge after rst-versions for small badge style. #}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Versions') }}">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span>
v: {{ current_version }}

View File

@ -1,5 +0,0 @@
asio_http2.h
============
.. literalinclude:: @top_srcdir@/src/includes/nghttp2/asio_http2.h
:language: cpp

View File

@ -1,5 +0,0 @@
asio_http2_client.h
===================
.. literalinclude:: @top_srcdir@/src/includes/nghttp2/asio_http2_client.h
:language: cpp

View File

@ -1,5 +0,0 @@
asio_http2_server.h
===================
.. literalinclude:: @top_srcdir@/src/includes/nghttp2/asio_http2_server.h
:language: cpp

View File

@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "H2LOAD" "1" "Jun 23, 2022" "1.48.0" "nghttp2"
.TH "H2LOAD" "1" "Nov 13, 2022" "1.51.0" "nghttp2"
.SH NAME
h2load \- HTTP/2 benchmarking tool
.SH SYNOPSIS

View File

@ -1 +0,0 @@
.. include:: @top_srcdir@/doc/sources/libnghttp2_asio.rst

View File

@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "NGHTTP" "1" "Jun 23, 2022" "1.48.0" "nghttp2"
.TH "NGHTTP" "1" "Nov 13, 2022" "1.51.0" "nghttp2"
.SH NAME
nghttp \- HTTP/2 client
.SH SYNOPSIS

View File

@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "NGHTTPD" "1" "Jun 23, 2022" "1.48.0" "nghttp2"
.TH "NGHTTPD" "1" "Nov 13, 2022" "1.51.0" "nghttp2"
.SH NAME
nghttpd \- HTTP/2 server
.SH SYNOPSIS

View File

@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "NGHTTPX" "1" "Jun 23, 2022" "1.48.0" "nghttp2"
.TH "NGHTTPX" "1" "Nov 13, 2022" "1.51.0" "nghttp2"
.SH NAME
nghttpx \- HTTP/2 proxy
.SH SYNOPSIS

View File

@ -1 +0,0 @@
.. include:: @top_srcdir@/doc/sources/python-apiref.rst

View File

@ -2,49 +2,39 @@ Building Android binary
=======================
In this article, we briefly describe how to build Android binary using
`Android NDK <https://developer.android.com/ndk/index.html>`_
cross-compiler on Debian Linux.
`Android NDK <https://developer.android.com/ndk>`_ cross-compiler on
Debian Linux.
The easiest way to build android binary is use Dockerfile.android.
See Dockerfile.android for more details. If you cannot use
Dockerfile.android for whatever reason, continue to read the rest of
this article.
We offer ``android-config`` and ``android-make`` scripts to make the
build easier. To make these script work, NDK toolchain must be
installed in the following way. First, let us introduce
``ANDROID_HOME`` environment variable. We need to install toolchain
under ``$ANDROID_HOME/toolchain``. An user can freely choose the path
for ``ANDROID_HOME``. For example, to install toolchain under
``$ANDROID_HOME/toolchain``, do this in the the directory where NDK is
unpacked:
We offer ``android-config`` script to make the build easier. To make
the script work, NDK directory must be set to ``NDK`` environment
variable. NDK directory is the directory where NDK is unpacked:
.. code-block:: text
$ build/tools/make_standalone_toolchain.py \
--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.
$ unzip android-ndk-$NDK_VERSION-linux.zip
$ cd android-ndk-$NDK_VERSION
$ export NDK=$PWD
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.
built with the same NDK toolchain and installed under
``$NDK/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.
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``:
Before running ``android-config``, ``NDK`` environment variable must
be set to point to the correct path.
.. code-block:: text
$ export PATH=$PATH:$ANDROID_HOME/toolchain/bin
You need to set ``NGHTTP2`` environment variable to the absolute path
to the source directory of nghttp2.
To configure OpenSSL, use the following script:
@ -52,39 +42,36 @@ To configure OpenSSL, use the following script:
#!/bin/sh
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
. $NGHTTP2/android-env
export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi-
./Configure --prefix=$PREFIX android
export ANDROID_NDK_HOME=$NDK
export PATH=$TOOLCHAIN/bin:$PATH
And run ``make install_sw`` to build and install without
documentation.
./Configure no-shared --prefix=$PREFIX android-arm64
We cannot compile libev without modification. Apply `this patch
<https://gist.github.com/tatsuhiro-t/48c45f08950f587180ed>`_ before
configuring libev. This patch is for libev-4.19. After applying the
patch, to configure libev, use the following script:
And run the following script to build and install without
documentation:
.. code-block:: sh
#!/bin/sh
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
. $NGHTTP2/android-env
export PATH=$TOOLCHAIN/bin:$PATH
make install_sw
To configure libev, use the following script:
.. code-block:: sh
#!/bin/sh
. $NGHTTP2/android-env
./configure \
--host=arm-linux-androideabi \
--host=$TARGET \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--prefix=$PREFIX \
--disable-shared \
@ -100,41 +87,26 @@ To configure c-ares, use the following script:
#!/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
. $NGHTTP2/android-env
./configure \
--host=arm-linux-androideabi \
--host=$TARGET \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--prefix=$PREFIX \
--disable-shared
And run ``make install`` to build and install.
To configure zlib, 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
. $NGHTTP2/android-env
HOST=arm-linux-androideabi
export HOST=$TARGET
CC=$HOST-gcc \
AR=$HOST-ar \
LD=$HOST-ld \
RANLIB=$HOST-ranlib \
STRIP=$HOST-strip \
./configure \
--prefix=$PREFIX \
--libdir=$PREFIX/lib \
@ -144,7 +116,7 @@ To configure zlib, use the following script:
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.
then ``make`` to compile nghttp2 source files.
If all went well, application binaries, such as nghttpx, are created
under src directory. Strip debugging information from the binary
@ -152,4 +124,4 @@ using the following command:
.. code-block:: text
$ arm-linux-androideabi-strip src/nghttpx
$ $NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip src/nghttpx

View File

@ -31,13 +31,8 @@ Contents:
h2load-howto
programmers-guide
apiref
libnghttp2_asio
python-apiref
nghttp2.h
nghttp2ver.h
asio_http2_server.h
asio_http2_client.h
asio_http2.h
Source <https://github.com/nghttp2/nghttp2>
Issues <https://github.com/nghttp2/nghttp2/issues>
nghttp2.org <https://nghttp2.org/>

View File

@ -1,433 +0,0 @@
libnghttp2_asio: High level HTTP/2 C++ library
==============================================
libnghttp2_asio is C++ library built on top of libnghttp2 and provides
high level abstraction API to build HTTP/2 applications. It depends
on Boost::ASIO library and OpenSSL. Currently libnghttp2_asio
provides server and client side API.
libnghttp2_asio is not built by default. Use ``--enable-asio-lib``
configure flag to build libnghttp2_asio. The required Boost libraries
are:
* Boost::Asio
* Boost::System
* Boost::Thread
We have 3 header files for this library:
* :doc:`asio_http2_server.h`
* :doc:`asio_http2_client.h`
* :doc:`asio_http2.h`
asio_http2.h is included from the other two files.
To build a program with libnghttp2_asio, link to the following
libraries::
-lnghttp2_asio -lboost_system
If ``boost::asio::ssl`` is used in application code, OpenSSL is also
required in link line::
-lnghttp2_asio -lboost_system -lssl -lcrypto
Server API
----------
To use server API, first include following header file:
.. code-block:: cpp
#include <nghttp2/asio_http2_server.h>
Also take a look at that header file :doc:`asio_http2_server.h`.
Server API is designed to build HTTP/2 server very easily to utilize
C++11 anonymous function and closure. The bare minimum example of
HTTP/2 server looks like this:
.. code-block:: cpp
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
http2 server;
server.handle("/", [](const request &req, const response &res) {
res.write_head(200);
res.end("hello, world\n");
});
if (server.listen_and_serve(ec, "localhost", "3000")) {
std::cerr << "error: " << ec.message() << std::endl;
}
}
First we instantiate ``nghttp2::asio_http2::server::http2`` object.
``nghttp2::asio_http2::server::http2::handle`` function registers
pattern and its handler function. In this example, we register "/" as
pattern, which matches all requests. Then call
``nghttp2::asio_http2::server::http2::listen_and_serve`` function with
address and port to listen to.
The ``req`` and ``res`` represent HTTP request and response
respectively. ``nghttp2::asio_http2_::server::response::write_head``
constructs HTTP response header fields. The first argument is HTTP
status code, in the above example, which is 200. The second argument,
which is omitted in the above example, is additional header fields to
send.
``nghttp2::asio_http2::server::response::end`` sends response body.
In the above example, we send string "hello, world".
The life time of req and res object ends after the callback set by
``nghttp2::asio_http2::server::response::on_close`` function.
Application must not use those objects after this call.
Serving static files and enabling SSL/TLS
+++++++++++++++++++++++++++++++++++++++++
In this example, we serve a couple of static files and also enable
SSL/TLS.
.. code-block:: cpp
#include <nghttp2/asio_http2_server.h>
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
boost::asio::ssl::context tls(boost::asio::ssl::context::sslv23);
tls.use_private_key_file("server.key", boost::asio::ssl::context::pem);
tls.use_certificate_chain_file("server.crt");
configure_tls_context_easy(ec, tls);
http2 server;
server.handle("/index.html", [](const request &req, const response &res) {
res.write_head(200);
res.end(file_generator("index.html"));
});
if (server.listen_and_serve(ec, tls, "localhost", "3000")) {
std::cerr << "error: " << ec.message() << std::endl;
}
}
We first create ``boost::asio::ssl::context`` object and set path to
private key file and certificate file.
``nghttp2::asio_http2::server::configure_tls_context_easy`` function
configures SSL/TLS context object for HTTP/2 server use, including NPN
callbacks.
In the above example, if request path is "/index.html", we serve
index.html file in the current working directory.
``nghttp2::asio_http2::server::response::end`` has overload to take
function of type ``nghttp2::asio_http2::generator_cb`` and application
pass its implementation to generate response body. For the
convenience, libnghttp2_asio library provides
``nghttp2::asio_http2::file_generator`` function to generate function
to server static file. If other resource is requested, server
automatically responds with 404 status code.
Server push
+++++++++++
Server push is also supported.
.. code-block:: cpp
#include <nghttp2/asio_http2_server.h>
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
boost::asio::ssl::context tls(boost::asio::ssl::context::sslv23);
tls.use_private_key_file("server.key", boost::asio::ssl::context::pem);
tls.use_certificate_chain_file("server.crt");
configure_tls_context_easy(ec, tls);
http2 server;
std::string style_css = "h1 { color: green; }";
server.handle("/", [&style_css](const request &req, const response &res) {
boost::system::error_code ec;
auto push = res.push(ec, "GET", "/style.css");
push->write_head(200);
push->end(style_css);
res.write_head(200);
res.end(R"(
<!DOCTYPE html><html lang="en">
<title>HTTP/2 FTW</title><body>
<link href="/style.css" rel="stylesheet" type="text/css">
<h1>This should be green</h1>
</body></html>
)");
});
server.handle("/style.css",
[&style_css](const request &req, const response &res) {
res.write_head(200);
res.end(style_css);
});
if (server.listen_and_serve(ec, tls, "localhost", "3000")) {
std::cerr << "error: " << ec.message() << std::endl;
}
}
When client requested any resource other than "/style.css", we push
"/style.css". To push resource, call
``nghttp2::asio_http2::server::response::push`` function with desired
method and path. It returns another response object and use its
functions to send push response.
Enable multi-threading
++++++++++++++++++++++
Enabling multi-threading is very easy. Just call
``nghttp2::asio_http2::server::http2::num_threads`` function with the
desired number of threads:
.. code-block:: cpp
http2 server;
// Use 4 native threads
server.num_threads(4);
Client API
----------
To use client API, first include following header file:
.. code-block:: cpp
#include <nghttp2/asio_http2_client.h>
Also take a look at that header file :doc:`asio_http2_client.h`.
Here is the sample client code to access HTTP/2 server and print out
response header fields and response body to the console screen:
.. code-block:: cpp
#include <iostream>
#include <nghttp2/asio_http2_client.h>
using boost::asio::ip::tcp;
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::client;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
boost::asio::io_service io_service;
// connect to localhost:3000
session sess(io_service, "localhost", "3000");
sess.on_connect([&sess](tcp::resolver::iterator endpoint_it) {
boost::system::error_code ec;
auto req = sess.submit(ec, "GET", "http://localhost:3000/");
req->on_response([](const response &res) {
// print status code and response header fields.
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([](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) {
// shutdown session after first request was done.
sess.shutdown();
});
});
sess.on_error([](const boost::system::error_code &ec) {
std::cerr << "error: " << ec.message() << std::endl;
});
io_service.run();
}
``nghttp2::asio_http2::client::session`` object takes
``boost::asio::io_service`` object and remote server address. When
connection is made, the callback function passed to
``nghttp2::asio_http2::client::on_connect`` is invoked with connected
address as its parameter. After this callback call, use
``nghttp2::asio_http2::session::submit`` to send request to the
server. You can submit multiple requests at once without waiting for
the completion of previous request.
The life time of req and res object ends after the callback set by
``nghttp2::asio_http2::server::request::on_close`` function.
Application must not use those objects after this call.
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()``.
Receive server push and enable SSL/TLS
++++++++++++++++++++++++++++++++++++++
.. code-block:: cpp
#include <iostream>
#include <nghttp2/asio_http2_client.h>
using boost::asio::ip::tcp;
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::client;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
boost::asio::io_service io_service;
boost::asio::ssl::context tls(boost::asio::ssl::context::sslv23);
tls.set_default_verify_paths();
// disabled to make development easier...
// tls_ctx.set_verify_mode(boost::asio::ssl::verify_peer);
configure_tls_context(ec, tls);
// connect to localhost:3000
session sess(io_service, tls, "localhost", "3000");
sess.on_connect([&sess](tcp::resolver::iterator endpoint_it) {
boost::system::error_code ec;
auto req = sess.submit(ec, "GET", "http://localhost:3000/");
req->on_response([&sess](const response &res) {
std::cerr << "response received!" << std::endl;
res.on_data([&sess](const uint8_t *data, std::size_t len) {
std::cerr.write(reinterpret_cast<const char *>(data), len);
std::cerr << std::endl;
});
});
req->on_push([](const request &push) {
std::cerr << "push request received!" << std::endl;
push.on_response([](const response &res) {
std::cerr << "push response received!" << std::endl;
res.on_data([](const uint8_t *data, std::size_t len) {
std::cerr.write(reinterpret_cast<const char *>(data), len);
std::cerr << std::endl;
});
});
});
});
sess.on_error([](const boost::system::error_code &ec) {
std::cerr << "error: " << ec.message() << std::endl;
});
io_service.run();
}
The above sample code demonstrates how to enable SSL/TLS and receive
server push. Currently,
``nghttp2::asio_http2::client::configure_tls_context`` function setups
NPN callbacks for SSL/TLS context for HTTP/2 use.
To receive server push, use
``nghttp2::asio_http2::client::request::on_push`` function to set
callback function which is invoked when server push request is
arrived. The callback function takes
``nghttp2::asio_http2::client::request`` object, which contains the
pushed request. To get server push response, set callback using
``nghttp2::asio_http2::client::request::on_response``.
As stated in the previous section, client does not stop automatically
as long as HTTP/2 session is fine and connection is alive. We don't
call ``nghttp2::asio_http2::client::session::shutdown`` in this
example, so the program does not terminate after all responses are
received. Hit Ctrl-C to terminate the program.
Multiple concurrent requests
++++++++++++++++++++++++++++
.. code-block:: cpp
#include <iostream>
#include <nghttp2/asio_http2_client.h>
using boost::asio::ip::tcp;
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::client;
int main(int argc, char *argv[]) {
boost::system::error_code ec;
boost::asio::io_service io_service;
// connect to localhost:3000
session sess(io_service, "localhost", "3000");
sess.on_connect([&sess](tcp::resolver::iterator endpoint_it) {
boost::system::error_code ec;
auto printer = [](const response &res) {
res.on_data([](const uint8_t *data, std::size_t len) {
std::cerr.write(reinterpret_cast<const char *>(data), len);
std::cerr << std::endl;
});
};
std::size_t num = 3;
auto count = std::make_shared<int>(num);
for (std::size_t i = 0; i < num; ++i) {
auto req = sess.submit(ec, "GET",
"http://localhost:3000/" + std::to_string(i + 1));
req->on_response(printer);
req->on_close([&sess, count](uint32_t error_code) {
if (--*count == 0) {
// shutdown session after |num| requests were done.
sess.shutdown();
}
});
}
});
sess.on_error([](const boost::system::error_code &ec) {
std::cerr << "error: " << ec.message() << std::endl;
});
io_service.run();
}
Here is the sample to send 3 requests at once. Depending on the
server settings, these requests are processed out-of-order. In this
example, we have a trick to shutdown session after all requests were
done. We made ``count`` object which is shared pointer to int and is
initialized to 3. On each request closure (the invocation of the
callback set by ``nghttp2::asio_http2::client::request::on_close``),
we decrement the count. If count becomes 0, we are sure that all
requests have been done and initiate shutdown.

View File

@ -1,439 +0,0 @@
Python API Reference
====================
.. py:module:: nghttp2
nghttp2 offers some high level Python API to C library. The bindings
currently provide HPACK compressor and decompressor classes and HTTP/2
server class.
The extension module is called ``nghttp2``.
``make`` will build the bindings. The target Python version is
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.8``).
HPACK API
---------
.. py:class:: HDDeflater(hd_table_bufsize_max=DEFLATE_MAX_HEADER_TABLE_SIZE)
This class is used to perform header compression. The
*hd_table_bufsize_max* limits the usage of header table in the
given amount of bytes. The default value is
:py:data:`DEFLATE_MAX_HEADER_TABLE_SIZE`. This is necessary
because the deflater and inflater share the same amount of header
table and the inflater decides that number. The deflater may not
want to use all header table size because of limited memory
availability. In that case, *hd_table_bufsize_max* can be used to
cap the upper limit of table size whatever the header table size is
chosen by the inflater.
.. py:method:: deflate(headers)
Deflates the *headers*. The *headers* must be sequence of tuple
of name/value pair, which are byte strings (not unicode string).
This method returns the deflated header block in byte string.
Raises the exception if any error occurs.
.. py:method:: set_no_refset(no_refset)
Tells the deflater not to use reference set if *no_refset* is
evaluated to ``True``. If that happens, on each subsequent
invocation of :py:meth:`deflate()`, deflater will clear up
refersent set.
.. py:method:: change_table_size(hd_table_bufsize_max)
Changes header table size to *hd_table_bufsize_max* byte. if
*hd_table_bufsize_max* is strictly larger than
``hd_table_bufsize_max`` given in constructor,
``hd_table_bufsize_max`` is used as header table size instead.
Raises the exception if any error occurs.
.. py:method:: get_hd_table()
Returns copy of current dynamic header table.
The following example shows how to deflate header name/value pairs:
.. code-block:: python
import binascii, nghttp2
deflater = nghttp2.HDDeflater()
res = deflater.deflate([(b'foo', b'bar'),
(b'baz', b'buz')])
print(binascii.b2a_hex(res))
.. py:class:: HDInflater()
This class is used to perform header decompression.
.. py:method:: inflate(data)
Inflates the deflated header block *data*. The *data* must be
byte string.
Raises the exception if any error occurs.
.. py:method:: change_table_size(hd_table_bufsize_max)
Changes header table size to *hd_table_bufsize_max* byte.
Raises the exception if any error occurs.
.. py:method:: get_hd_table()
Returns copy of current dynamic header table.
The following example shows how to inflate deflated header block:
.. code-block:: python
deflater = nghttp2.HDDeflater()
data = deflater.deflate([(b'foo', b'bar'),
(b'baz', b'buz')])
inflater = nghttp2.HDInflater()
hdrs = inflater.inflate(data)
print(hdrs)
.. py:function:: print_hd_table(hdtable)
Convenient function to print *hdtable* to the standard output. The
*hdtable* is the one retrieved by
:py:meth:`HDDeflater.get_hd_table()` or
:py:meth:`HDInflater.get_hd_table()`. This function does not work
if header name/value cannot be decoded using UTF-8 encoding.
In output, ``s=N`` means the entry occupies ``N`` bytes in header
table. If ``r=y``, then the entry is in the reference set.
.. py:data:: DEFAULT_HEADER_TABLE_SIZE
The default header table size, which is 4096 as per HTTP/2
specification.
.. py:data:: DEFLATE_MAX_HEADER_TABLE_SIZE
The default header table size for deflater. The initial value
is 4096.
HTTP/2 servers
--------------
.. note::
We use :py:mod:`asyncio` for HTTP/2 server classes, and ALPN.
Therefore, Python 3.8 or later is required to use these objects.
To explicitly configure nghttp2 build to use Python 3.8, specify
the ``PYTHON`` variable to the path to Python 3.8 executable when
invoking configure script like this:
.. code-block:: text
$ ./configure PYTHON=/usr/bin/python3.8
.. py:class:: HTTP2Server(address, RequestHandlerClass, ssl=None)
This class builds on top of the :py:mod:`asyncio` event loop. On
construction, *RequestHandlerClass* must be given, which must be a
subclass of :py:class:`BaseRequestHandler` class.
The *address* must be a tuple of hostname/IP address and port to
bind. If hostname/IP address is ``None``, all interfaces are
assumed.
To enable SSL/TLS, specify instance of :py:class:`ssl.SSLContext`
in *ssl*. Before passing *ssl* to
:py:func:`BaseEventLoop.create_server`, ALPN protocol identifiers
are set using :py:meth:`ssl.SSLContext.set_npn_protocols`.
To disable SSL/TLS, omit *ssl* or specify ``None``.
.. py:method:: serve_forever()
Runs server and processes incoming requests forever.
.. py:class:: BaseRequestHandler(http2, stream_id)
The class is used to handle the single HTTP/2 stream. By default,
it does not nothing. It must be subclassed to handle each event
callback method.
The first callback method invoked is :py:meth:`on_headers()`. It is
called when HEADERS frame, which includes request header fields, is
arrived.
If request has request body, :py:meth:`on_data()` is invoked for
each chunk of received data chunk.
When whole request is received, :py:meth:`on_request_done()` is
invoked.
When stream is closed, :py:meth:`on_close()` is called.
The application can send response using :py:meth:`send_response()`
method. It can be used in :py:meth:`on_headers()`,
:py:meth:`on_data()` or :py:meth:`on_request_done()`.
The application can push resource using :py:meth:`push()` method.
It must be used before :py:meth:`send_response()` call.
A :py:class:`BaseRequestHandler` has the following instance
variables:
.. py:attribute:: client_address
Contains a tuple of the form ``(host, port)`` referring to the
client's address.
.. py:attribute:: stream_id
Stream ID of this stream
.. py:attribute:: scheme
Scheme of the request URI. This is a value of ``:scheme``
header field.
.. py:attribute:: method
Method of this stream. This is a value of ``:method`` header
field.
.. py:attribute:: host
This is a value of ``:authority`` or ``host`` header field.
.. py:attribute:: path
This is a value of ``:path`` header field.
.. py:attribute:: headers
Request header fields.
A :py:class:`BaseRequestHandler` has the following methods:
.. py:method:: on_headers()
Called when request HEADERS is arrived. By default, this method
does nothing.
.. py:method:: on_data(data)
Called when a chunk of request body *data* is arrived. This
method will be called multiple times until all data are
received. By default, this method does nothing.
.. py:method:: on_request_done()
Called when whole request was received. By default, this method
does nothing.
.. py:method:: on_close(error_code)
Called when stream is about to close. The *error_code*
indicates the reason of closure. If it is ``0``, the stream is
going to close without error.
.. py:method:: send_response(status=200, headers=None, body=None)
Send response. The *status* is HTTP status code. The *headers*
is additional response headers. The *:status* header field will
be appended by the library. The *body* is the response body.
It could be ``None`` if response body is empty. Or it must be
instance of either ``str``, ``bytes``, :py:class:`io.IOBase` or
callable, called body generator, which takes one parameter,
size. The body generator generates response body. It can pause
generation of response so that it can wait for slow backend data
generation. When invoked, it should return tuple, byte string
at most size length and flag. The flag is either
:py:data:`DATA_OK`, :py:data:`DATA_EOF` or
:py:data:`DATA_DEFERRED`. For non-empty byte string and it is
not the last chunk of response, :py:data:`DATA_OK` must be
returned as flag. If this is the last chunk of the response
(byte string could be ``None``), :py:data:`DATA_EOF` must be
returned as flag. If there is no data available right now, but
additional data are anticipated, return tuple (``None``,
:py:data:`DATA_DEFERRED`). When data arrived, call
:py:meth:`resume()` and restart response body transmission.
Only the body generator can pause response body generation;
instance of :py:class:`io.IOBase` must not block.
If instance of ``str`` is specified as *body*, it will be
encoded using UTF-8.
The *headers* is a list of tuple of the form ``(name,
value)``. The ``name`` and ``value`` can be either byte string
or unicode string. In the latter case, they will be encoded
using UTF-8.
Raises the exception if any error occurs.
.. py:method:: push(path, method='GET', request_headers=None, status=200, headers=None, body=None)
Push a specified resource. The *path* is a path portion of
request URI for this resource. The *method* is a method to
access this resource. The *request_headers* is additional
request headers to access this resource. The ``:scheme``,
``:method``, ``:authority`` and ``:path`` are appended by the
library. The ``:scheme`` and ``:authority`` are inherited from
request header fields of the associated stream.
The *status* is HTTP status code. The *headers* is additional
response headers. The ``:status`` header field is appended by
the library. The *body* is the response body. It has the same
semantics of *body* parameter of :py:meth:`send_response()`.
The headers and request_headers are a list of tuple of the form
``(name, value)``. The ``name`` and ``value`` can be either byte
string or unicode string. In the latter case, they will be
encoded using UTF-8.
Returns an instance of ``RequestHandlerClass`` specified in
:py:class:`HTTP2Server` constructor for the pushed resource.
Raises the exception if any error occurs.
.. py:method:: resume()
Signals the restarting of response body transmission paused by
``DATA_DEFERRED`` from the body generator (see
:py:meth:`send_response()` about the body generator). It is not
an error calling this method while response body transmission is
not paused.
.. py:data:: DATA_OK
``DATA_OK`` indicates non empty data is generated from body generator.
.. py:data:: DATA_EOF
``DATA_EOF`` indicates the end of response body.
.. py:data:: DATA_DEFERRED
``DATA_DEFERRED`` indicates that data are not available right now
and response should be paused.
The following example illustrates :py:class:`HTTP2Server` and
:py:class:`BaseRequestHandler` usage:
.. code-block:: python
#!/usr/bin/env python3
import io, ssl
import nghttp2
class Handler(nghttp2.BaseRequestHandler):
def on_headers(self):
self.push(path='/css/style.css',
request_headers = [('content-type', 'text/css')],
status=200,
body='body{margin:0;}')
self.send_response(status=200,
headers = [('content-type', 'text/plain')],
body=io.BytesIO(b'nghttp2-python FTW'))
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ctx.options = ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3
ctx.load_cert_chain('server.crt', 'server.key')
# give None to ssl to make the server non-SSL/TLS
server = nghttp2.HTTP2Server(('127.0.0.1', 8443), Handler, ssl=ctx)
server.serve_forever()
The following example illustrates HTTP/2 server using asynchronous
response body generation. This is simplified reverse proxy:
.. code-block:: python
#!/usr/bin/env python3
import ssl
import os
import urllib
import asyncio
import io
import nghttp2
@asyncio.coroutine
def get_http_header(handler, url):
url = urllib.parse.urlsplit(url)
ssl = url.scheme == 'https'
if url.port == None:
if url.scheme == 'https':
port = 443
else:
port = 80
else:
port = url.port
connect = asyncio.open_connection(url.hostname, port, ssl=ssl)
reader, writer = yield from connect
req = 'GET {path} HTTP/1.0\r\n\r\n'.format(path=url.path or '/')
writer.write(req.encode('utf-8'))
# skip response header fields
while True:
line = yield from reader.readline()
line = line.rstrip()
if not line:
break
# read body
while True:
b = yield from reader.read(4096)
if not b:
break
handler.buf.write(b)
writer.close()
handler.buf.seek(0)
handler.eof = True
handler.resume()
class Body:
def __init__(self, handler):
self.handler = handler
self.handler.eof = False
self.handler.buf = io.BytesIO()
def generate(self, n):
buf = self.handler.buf
data = buf.read1(n)
if not data and not self.handler.eof:
return None, nghttp2.DATA_DEFERRED
return data, nghttp2.DATA_EOF if self.handler.eof else nghttp2.DATA_OK
class Handler(nghttp2.BaseRequestHandler):
def on_headers(self):
body = Body(self)
asyncio.async(get_http_header(
self, 'http://localhost' + self.path.decode('utf-8')))
self.send_response(status=200, body=body.generate)
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ctx.options = ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3
ctx.load_cert_chain('server.crt', 'server.key')
server = nghttp2.HTTP2Server(('127.0.0.1', 8443), Handler, ssl=ctx)
server.serve_forever()

View File

@ -7,7 +7,7 @@ RUN apt-get update && \
zlib1g-dev libev-dev libjemalloc-dev ruby-dev libc-ares-dev bison \
libelf-dev
RUN git clone --depth 1 -b OpenSSL_1_1_1p+quic https://github.com/quictls/openssl && \
RUN git clone --depth 1 -b OpenSSL_1_1_1s+quic https://github.com/quictls/openssl && \
cd openssl && \
./config --openssldir=/etc/ssl && \
make -j$(nproc) && \
@ -15,7 +15,7 @@ RUN git clone --depth 1 -b OpenSSL_1_1_1p+quic https://github.com/quictls/openss
cd .. && \
rm -rf openssl
RUN git clone --depth 1 -b v0.5.0 https://github.com/ngtcp2/nghttp3 && \
RUN git clone --depth 1 -b v0.8.0 https://github.com/ngtcp2/nghttp3 && \
cd nghttp3 && \
autoreconf -i && \
./configure --enable-lib-only && \
@ -24,7 +24,7 @@ RUN git clone --depth 1 -b v0.5.0 https://github.com/ngtcp2/nghttp3 && \
cd .. && \
rm -rf nghttp3
RUN git clone --depth 1 -b v0.6.0 https://github.com/ngtcp2/ngtcp2 && \
RUN git clone --depth 1 -b v0.12.0 https://github.com/ngtcp2/ngtcp2 && \
cd ngtcp2 && \
autoreconf -i && \
./configure --enable-lib-only \
@ -36,7 +36,7 @@ RUN git clone --depth 1 -b v0.6.0 https://github.com/ngtcp2/ngtcp2 && \
cd .. && \
rm -rf ngtcp2
RUN git clone --depth 1 -b v0.8.0 https://github.com/libbpf/libbpf && \
RUN git clone --depth 1 -b v1.0.1 https://github.com/libbpf/libbpf && \
cd libbpf && \
PREFIX=/usr/local make -C src install && \
cd .. && \
@ -47,7 +47,7 @@ RUN git clone --depth 1 https://github.com/nghttp2/nghttp2.git && \
git submodule update --init && \
autoreconf -i && \
./configure --disable-examples --disable-hpack-tools \
--disable-python-bindings --with-mruby --with-neverbleed \
--with-mruby --with-neverbleed \
--enable-http3 --with-libbpf \
CC=clang CXX=clang++ \
LIBTOOL_LDFLAGS="-static-libtool-libs" \

4
examples/.gitignore vendored
View File

@ -3,7 +3,3 @@ libevent-client
libevent-server
deflate
tiny-nghttpd
asio-sv
asio-sv2
asio-cl
asio-cl2

View File

@ -34,24 +34,4 @@ if(ENABLE_EXAMPLES)
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:llhttp>
$<TARGET_OBJECTS:url-parser>
)
target_include_directories(${name} PRIVATE
${OPENSSL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
target_link_libraries(${name}
nghttp2
nghttp2_asio
${JEMALLOC_LIBRARIES}
${OPENSSL_LIBRARIES}
${Boost_LIBRARIES}
${APP_LIBRARIES}
)
endforeach()
endif()
endif()

View File

@ -30,7 +30,6 @@ AM_CXXFLAGS = $(WARNCXXFLAGS) $(CXX1XCXXFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/lib/includes \
-I$(top_builddir)/lib/includes \
-I$(top_srcdir)/src/includes \
-I$(top_srcdir)/third-party \
@LIBEVENT_OPENSSL_CFLAGS@ \
@OPENSSL_CFLAGS@ \
@ -52,40 +51,4 @@ libevent_server_SOURCES = libevent-server.c
deflate_SOURCES = deflate.c
if ENABLE_ASIO_LIB
noinst_PROGRAMS += asio-sv asio-sv2 asio-cl asio-cl2
# AM_CPPFLAGS must be placed first, so that header file (e.g.,
# nghttp2/nghttp2.h) in this package is used rather than installed
# one.
ASIOCPPFLAGS = ${AM_CPPFLAGS} ${BOOST_CPPFLAGS}
ASIOLDADD = $(top_builddir)/lib/libnghttp2.la \
$(top_builddir)/src/libnghttp2_asio.la @JEMALLOC_LIBS@ \
$(top_builddir)/third-party/liburl-parser.la \
@OPENSSL_LIBS@ \
${BOOST_LDFLAGS} \
${BOOST_ASIO_LIB} \
${BOOST_THREAD_LIB} \
${BOOST_SYSTEM_LIB} \
@APPLDFLAGS@
asio_sv_SOURCES = asio-sv.cc
asio_sv_CPPFLAGS = ${ASIOCPPFLAGS}
asio_sv_LDADD = ${ASIOLDADD}
asio_sv2_SOURCES = asio-sv2.cc
asio_sv2_CPPFLAGS = ${ASIOCPPFLAGS}
asio_sv2_LDADD = ${ASIOLDADD}
asio_cl_SOURCES = asio-cl.cc
asio_cl_CPPFLAGS = ${ASIOCPPFLAGS}
asio_cl_LDADD = ${ASIOLDADD}
asio_cl2_SOURCES = asio-cl2.cc
asio_cl2_CPPFLAGS = ${ASIOCPPFLAGS}
asio_cl2_LDADD = ${ASIOLDADD}
endif # ENABLE_ASIO_LIB
endif # ENABLE_EXAMPLES

View File

@ -1,96 +0,0 @@
/*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2015 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <iostream>
#include <nghttp2/asio_http2_client.h>
using boost::asio::ip::tcp;
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::client;
int main(int argc, char *argv[]) {
try {
if (argc < 2) {
std::cerr << "Usage: asio-cl URI" << std::endl;
return 1;
}
boost::system::error_code ec;
boost::asio::io_service io_service;
std::string uri = argv[1];
std::string scheme, host, service;
if (host_service_from_uri(ec, scheme, host, service, uri)) {
std::cerr << "error: bad URI: " << ec.message() << std::endl;
return 1;
}
boost::asio::ssl::context tls_ctx(boost::asio::ssl::context::sslv23);
tls_ctx.set_default_verify_paths();
// disabled to make development easier...
// tls_ctx.set_verify_mode(boost::asio::ssl::verify_peer);
configure_tls_context(ec, tls_ctx);
auto sess = scheme == "https" ? session(io_service, tls_ctx, host, service)
: session(io_service, host, service);
sess.on_connect([&sess, &uri](tcp::resolver::iterator endpoint_it) {
boost::system::error_code ec;
auto req = sess.submit(ec, "GET", uri);
if (ec) {
std::cerr << "error: " << ec.message() << std::endl;
return;
}
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([](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) { sess.shutdown(); });
});
sess.on_error([](const boost::system::error_code &ec) {
std::cerr << "error: " << ec.message() << std::endl;
});
io_service.run();
} catch (std::exception &e) {
std::cerr << "exception: " << e.what() << "\n";
}
return 0;
}

View File

@ -1,134 +0,0 @@
/*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2015 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <iostream>
#include <string>
#include <nghttp2/asio_http2_client.h>
using boost::asio::ip::tcp;
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::client;
void print_header(const header_map &h) {
for (auto &kv : h) {
std::cerr << kv.first << ": " << kv.second.value << "\n";
}
std::cerr << std::endl;
}
void print_header(const response &res) {
std::cerr << "HTTP/2 " << res.status_code() << "\n";
print_header(res.header());
}
void print_header(const request &req) {
auto &uri = req.uri();
std::cerr << req.method() << " " << uri.scheme << "://" << uri.host
<< uri.path;
if (!uri.raw_query.empty()) {
std::cerr << "?" << uri.raw_query;
}
std::cerr << " HTTP/2\n";
print_header(req.header());
}
int main(int argc, char *argv[]) {
try {
if (argc < 2) {
std::cerr << "Usage: asio-cl URI" << std::endl;
return 1;
}
boost::system::error_code ec;
boost::asio::io_service io_service;
std::string uri = argv[1];
std::string scheme, host, service;
if (host_service_from_uri(ec, scheme, host, service, uri)) {
std::cerr << "error: bad URI: " << ec.message() << std::endl;
return 1;
}
boost::asio::ssl::context tls_ctx(boost::asio::ssl::context::sslv23);
tls_ctx.set_default_verify_paths();
// disabled to make development easier...
// tls_ctx.set_verify_mode(boost::asio::ssl::verify_peer);
configure_tls_context(ec, tls_ctx);
auto sess = scheme == "https" ? session(io_service, tls_ctx, host, service)
: session(io_service, host, service);
sess.on_connect([&sess, &uri](tcp::resolver::iterator endpoint_it) {
std::cerr << "connected to " << (*endpoint_it).endpoint() << std::endl;
boost::system::error_code ec;
auto req = sess.submit(ec, "GET", uri, {{"cookie", {"foo=bar", true}}});
if (ec) {
std::cerr << "error: " << ec.message() << std::endl;
return;
}
req->on_response([](const response &res) {
std::cerr << "response header was received" << std::endl;
print_header(res);
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([](uint32_t error_code) {
std::cerr << "request done with error_code=" << error_code << std::endl;
});
req->on_push([](const request &push_req) {
std::cerr << "push request was received" << std::endl;
print_header(push_req);
push_req.on_response([](const response &res) {
std::cerr << "push response header was received" << std::endl;
res.on_data([](const uint8_t *data, std::size_t len) {
std::cerr.write(reinterpret_cast<const char *>(data), len);
std::cerr << std::endl;
});
});
});
});
sess.on_error([](const boost::system::error_code &ec) {
std::cerr << "error: " << ec.message() << std::endl;
});
io_service.run();
} catch (std::exception &e) {
std::cerr << "exception: " << e.what() << "\n";
}
return 0;
}

View File

@ -1,149 +0,0 @@
/*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2014 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// We wrote this code based on the original code which has the
// following license:
//
// main.cpp
// ~~~~~~~~
//
// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include <iostream>
#include <string>
#include <nghttp2/asio_http2_server.h>
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server;
int main(int argc, char *argv[]) {
try {
// Check command line arguments.
if (argc < 4) {
std::cerr
<< "Usage: asio-sv <address> <port> <threads> [<private-key-file> "
<< "<cert-file>]\n";
return 1;
}
boost::system::error_code ec;
std::string addr = argv[1];
std::string port = argv[2];
std::size_t num_threads = std::stoi(argv[3]);
http2 server;
server.num_threads(num_threads);
server.handle("/", [](const request &req, const response &res) {
res.write_head(200, {{"foo", {"bar"}}});
res.end("hello, world\n");
});
server.handle("/secret/", [](const request &req, const response &res) {
res.write_head(200);
res.end("under construction!\n");
});
server.handle("/push", [](const request &req, const response &res) {
boost::system::error_code ec;
auto push = res.push(ec, "GET", "/push/1");
if (!ec) {
push->write_head(200);
push->end("server push FTW!\n");
}
res.write_head(200);
res.end("you'll receive server push!\n");
});
server.handle("/delay", [](const request &req, const response &res) {
res.write_head(200);
auto timer = std::make_shared<boost::asio::deadline_timer>(
res.io_service(), boost::posix_time::seconds(3));
auto closed = std::make_shared<bool>();
res.on_close([timer, closed](uint32_t error_code) {
timer->cancel();
*closed = true;
});
timer->async_wait([&res, closed](const boost::system::error_code &ec) {
if (ec || *closed) {
return;
}
res.end("finally!\n");
});
});
server.handle("/trailer", [](const request &req, const response &res) {
// send trailer part.
res.write_head(200, {{"trailers", {"digest"}}});
std::string body = "nghttp2 FTW!\n";
auto left = std::make_shared<size_t>(body.size());
res.end([&res, body, left](uint8_t *dst, std::size_t len,
uint32_t *data_flags) {
auto n = std::min(len, *left);
std::copy_n(body.c_str() + (body.size() - *left), n, dst);
*left -= n;
if (*left == 0) {
*data_flags |=
NGHTTP2_DATA_FLAG_EOF | NGHTTP2_DATA_FLAG_NO_END_STREAM;
// RFC 3230 Instance Digests in HTTP. The digest value is
// SHA-256 message digest of body.
res.write_trailer(
{{"digest",
{"SHA-256=qqXqskW7F3ueBSvmZRCiSwl2ym4HRO0M/pvQCBlSDis="}}});
}
return n;
});
});
if (argc >= 6) {
boost::asio::ssl::context tls(boost::asio::ssl::context::sslv23);
tls.use_private_key_file(argv[4], boost::asio::ssl::context::pem);
tls.use_certificate_chain_file(argv[5]);
configure_tls_context_easy(ec, tls);
if (server.listen_and_serve(ec, tls, addr, port)) {
std::cerr << "error: " << ec.message() << std::endl;
}
} else {
if (server.listen_and_serve(ec, addr, port)) {
std::cerr << "error: " << ec.message() << std::endl;
}
}
} catch (std::exception &e) {
std::cerr << "exception: " << e.what() << "\n";
}
return 0;
}

View File

@ -1,125 +0,0 @@
/*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2014 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// We wrote this code based on the original code which has the
// following license:
//
// main.cpp
// ~~~~~~~~
//
// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif // HAVE_UNISTD_H
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif // HAVE_FCNTL_H
#include <iostream>
#include <string>
#include <nghttp2/asio_http2_server.h>
using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server;
int main(int argc, char *argv[]) {
try {
// Check command line arguments.
if (argc < 5) {
std::cerr << "Usage: asio-sv2 <address> <port> <threads> <doc-root> "
<< "[<private-key-file> <cert-file>]\n";
return 1;
}
boost::system::error_code ec;
std::string addr = argv[1];
std::string port = argv[2];
std::size_t num_threads = std::stoi(argv[3]);
std::string docroot = argv[4];
http2 server;
server.num_threads(num_threads);
server.handle("/", [&docroot](const request &req, const response &res) {
auto path = percent_decode(req.uri().path);
if (!check_path(path)) {
res.write_head(404);
res.end();
return;
}
if (path == "/") {
path = "/index.html";
}
path = docroot + path;
auto fd = open(path.c_str(), O_RDONLY);
if (fd == -1) {
res.write_head(404);
res.end();
return;
}
auto header = header_map();
struct stat stbuf;
if (stat(path.c_str(), &stbuf) == 0) {
header.emplace("content-length",
header_value{std::to_string(stbuf.st_size)});
header.emplace("last-modified",
header_value{http_date(stbuf.st_mtime)});
}
res.write_head(200, std::move(header));
res.end(file_generator_from_fd(fd));
});
if (argc >= 7) {
boost::asio::ssl::context tls(boost::asio::ssl::context::sslv23);
tls.use_private_key_file(argv[5], boost::asio::ssl::context::pem);
tls.use_certificate_chain_file(argv[6]);
configure_tls_context_easy(ec, tls);
if (server.listen_and_serve(ec, tls, addr, port)) {
std::cerr << "error: " << ec.message() << std::endl;
}
} else {
if (server.listen_and_serve(ec, addr, port)) {
std::cerr << "error: " << ec.message() << std::endl;
}
}
} catch (std::exception &e) {
std::cerr << "exception: " << e.what() << "\n";
}
return 0;
}

160
fuzz/fuzz_frames.cc Normal file
View File

@ -0,0 +1,160 @@
#include <string>
#include <fuzzer/FuzzedDataProvider.h>
extern "C" {
#include <string.h>
#include "nghttp2_hd.h"
#include "nghttp2_frame.h"
#include "nghttp2_test_helper.h"
#define HEADERS_LENGTH 7
static nghttp2_nv fuzz_make_nv(std::string s1, std::string s2) {
nghttp2_nv nv;
uint8_t *n = (uint8_t *)malloc(s1.size());
memcpy(n, s1.c_str(), s1.size());
uint8_t *v = (uint8_t *)malloc(s2.size());
memcpy(v, s2.c_str(), s2.size());
nv.name = n;
nv.value = v;
nv.namelen = s1.size();
nv.valuelen = s2.size();
nv.flags = NGHTTP2_NV_FLAG_NONE;
return nv;
}
static void fuzz_free_nv(nghttp2_nv *nv) {
free(nv->name);
free(nv->value);
}
void check_frame_pack_headers(FuzzedDataProvider *data_provider) {
nghttp2_hd_deflater deflater;
nghttp2_hd_inflater inflater;
nghttp2_headers frame, oframe;
nghttp2_bufs bufs;
nghttp2_nv *nva;
nghttp2_priority_spec pri_spec;
size_t nvlen;
nva_out out;
size_t hdblocklen;
int rv;
nghttp2_mem *mem;
mem = nghttp2_mem_default();
frame_pack_bufs_init(&bufs);
nva_out_init(&out);
nghttp2_hd_deflate_init(&deflater, mem);
nghttp2_hd_inflate_init(&inflater, mem);
/* Create a set of headers seeded with data from the fuzzer */
nva = (nghttp2_nv *)mem->malloc(sizeof(nghttp2_nv) * HEADERS_LENGTH, NULL);
for (int i = 0; i < HEADERS_LENGTH; i++) {
nva[i] = fuzz_make_nv(data_provider->ConsumeRandomLengthString(30),
data_provider->ConsumeRandomLengthString(300));
}
nvlen = HEADERS_LENGTH;
nghttp2_priority_spec_default_init(&pri_spec);
nghttp2_frame_headers_init(
&frame, NGHTTP2_FLAG_END_STREAM | NGHTTP2_FLAG_END_HEADERS, 1000000007,
NGHTTP2_HCAT_REQUEST, &pri_spec, nva, nvlen);
/* Perform a set of operations with the fuzz data */
rv = nghttp2_frame_pack_headers(&bufs, &frame, &deflater);
if (rv == 0) {
unpack_framebuf((nghttp2_frame *)&oframe, &bufs);
inflate_hd(&inflater, &out, &bufs, NGHTTP2_FRAME_HDLEN, mem);
nva_out_reset(&out, mem);
nghttp2_bufs_reset(&bufs);
}
nghttp2_nv *nva2 = NULL;
rv = nghttp2_nv_array_copy(&nva2, nva, nvlen, mem);
if (rv == 0) {
nghttp2_nv_array_del(nva2, mem);
}
/* Cleanup */
for (int i = 0; i < HEADERS_LENGTH; i++) {
fuzz_free_nv(&nva[i]);
}
nghttp2_bufs_free(&bufs);
nghttp2_frame_headers_free(&frame, mem);
nghttp2_hd_inflate_free(&inflater);
nghttp2_hd_deflate_free(&deflater);
}
void check_frame_push_promise(FuzzedDataProvider *data_provider) {
nghttp2_hd_deflater deflater;
nghttp2_hd_inflater inflater;
nghttp2_push_promise frame, oframe;
nghttp2_bufs bufs;
nghttp2_nv *nva;
nghttp2_priority_spec pri_spec;
size_t nvlen;
nva_out out;
size_t hdblocklen;
int rv;
nghttp2_mem *mem;
mem = nghttp2_mem_default();
frame_pack_bufs_init(&bufs);
nva_out_init(&out);
nghttp2_hd_deflate_init(&deflater, mem);
nghttp2_hd_inflate_init(&inflater, mem);
/* Create a set of headers seeded with data from the fuzzer */
nva = (nghttp2_nv *)mem->malloc(sizeof(nghttp2_nv) * HEADERS_LENGTH, NULL);
for (int i = 0; i < HEADERS_LENGTH; i++) {
nva[i] = fuzz_make_nv(data_provider->ConsumeRandomLengthString(30),
data_provider->ConsumeRandomLengthString(300));
}
nvlen = HEADERS_LENGTH;
nghttp2_priority_spec_default_init(&pri_spec);
/* Perform a set of operations with the fuzz data */
nghttp2_frame_push_promise_init(&frame, NGHTTP2_FLAG_END_HEADERS, 1000000007,
(1U << 31) - 1, nva, nvlen);
rv = nghttp2_frame_pack_push_promise(&bufs, &frame, &deflater);
if (rv == 0) {
unpack_framebuf((nghttp2_frame *)&oframe, &bufs);
}
nghttp2_nv *nva2 = NULL;
rv = nghttp2_nv_array_copy(&nva2, nva, nvlen, mem);
if (rv == 0) {
nghttp2_nv_array_del(nva2, mem);
}
/* Cleanup */
for (int i = 0; i < HEADERS_LENGTH; i++) {
fuzz_free_nv(&nva[i]);
}
nghttp2_bufs_reset(&bufs);
nghttp2_bufs_free(&bufs);
nghttp2_frame_push_promise_free(&frame, mem);
nghttp2_hd_inflate_free(&inflater);
nghttp2_hd_deflate_free(&deflater);
}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
FuzzedDataProvider data_provider(data, size);
check_frame_pack_headers(&data_provider);
check_frame_push_promise(&data_provider);
return 0;
}
} // extern C

99
fuzz/fuzz_target_fdp.cc Normal file
View File

@ -0,0 +1,99 @@
#include <string>
#include <vector>
#include <fuzzer/FuzzedDataProvider.h>
#include <nghttp2/nghttp2.h>
namespace {
int on_frame_recv_callback(nghttp2_session *session, const nghttp2_frame *frame,
void *user_data) {
return 0;
}
} // namespace
namespace {
int on_begin_headers_callback(nghttp2_session *session,
const nghttp2_frame *frame, void *user_data) {
return 0;
}
} // namespace
namespace {
int on_header_callback2(nghttp2_session *session, const nghttp2_frame *frame,
nghttp2_rcbuf *name, nghttp2_rcbuf *value,
uint8_t flags, void *user_data) {
return 0;
}
} // namespace
namespace {
int before_frame_send_callback(nghttp2_session *session,
const nghttp2_frame *frame, void *user_data) {
return 0;
}
} // namespace
namespace {
int on_frame_send_callback(nghttp2_session *session, const nghttp2_frame *frame,
void *user_data) {
return 0;
}
} // namespace
namespace {
void send_pending(nghttp2_session *session) {
for (;;) {
const uint8_t *data;
auto n = nghttp2_session_mem_send(session, &data);
if (n == 0) {
return;
}
}
}
} // namespace
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
nghttp2_session *session;
nghttp2_session_callbacks *callbacks;
nghttp2_session_callbacks_new(&callbacks);
nghttp2_session_callbacks_set_on_frame_recv_callback(callbacks,
on_frame_recv_callback);
nghttp2_session_callbacks_set_on_begin_headers_callback(
callbacks, on_begin_headers_callback);
nghttp2_session_callbacks_set_on_header_callback2(callbacks,
on_header_callback2);
nghttp2_session_callbacks_set_before_frame_send_callback(
callbacks, before_frame_send_callback);
nghttp2_session_callbacks_set_on_frame_send_callback(callbacks,
on_frame_send_callback);
nghttp2_session_server_new(&session, callbacks, nullptr);
nghttp2_session_callbacks_del(callbacks);
FuzzedDataProvider data_provider(data, size);
/* Initialise a random iv */
nghttp2_settings_entry *iv;
int size_of_iv = data_provider.ConsumeIntegralInRange(1, 10);
iv = (nghttp2_settings_entry *)malloc(sizeof(nghttp2_settings_entry) *
size_of_iv);
for (int i = 0; i < size_of_iv; i++) {
iv[i].settings_id = data_provider.ConsumeIntegralInRange(0, 1000);
iv[i].value = data_provider.ConsumeIntegralInRange(0, 1000);
}
nghttp2_submit_settings(session, NGHTTP2_FLAG_NONE, iv, size_of_iv);
send_pending(session);
std::vector<uint8_t> d = data_provider.ConsumeRemainingBytes<uint8_t>();
nghttp2_session_mem_recv(session, d.data(), d.size());
send_pending(session);
nghttp2_session_del(session);
free(iv);
return 0;
}

19
go.mod
View File

@ -4,8 +4,23 @@ go 1.18
require (
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d
github.com/lucas-clemente/quic-go v0.30.0
github.com/tatsuhiro-t/go-nghttp2 v0.0.0-20150408091349-4742878d9c90
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
)
require golang.org/x/text v0.3.7 // indirect
require (
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/marten-seemann/qpack v0.3.0 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.3 // indirect
github.com/marten-seemann/qtls-go1-19 v0.1.1 // indirect
github.com/onsi/ginkgo/v2 v2.2.0 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.12 // indirect
)

78
go.sum Normal file
View File

@ -0,0 +1,78 @@
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d h1:pVrfxiGfwelyab6n21ZBkbkmbevaf+WvMIiR7sr97hw=
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/lucas-clemente/quic-go v0.30.0 h1:nwLW0h8ahVQ5EPTIM7uhl/stHqQDea15oRlYKZmw2O0=
github.com/lucas-clemente/quic-go v0.30.0/go.mod h1:ssOrRsOmdxa768Wr78vnh2B8JozgLsMzG/g+0qEC7uk=
github.com/marten-seemann/qpack v0.3.0 h1:UiWstOgT8+znlkDPOg2+3rIuYXJ2CnGDkGUXN6ki6hE=
github.com/marten-seemann/qpack v0.3.0/go.mod h1:cGfKPBiP4a9EQdxCwEwI/GEeWAsjSekBvx/X8mh58+g=
github.com/marten-seemann/qtls-go1-18 v0.1.3 h1:R4H2Ks8P6pAtUagjFty2p7BVHn3XiwDAl7TTQf5h7TI=
github.com/marten-seemann/qtls-go1-18 v0.1.3/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4=
github.com/marten-seemann/qtls-go1-19 v0.1.1 h1:mnbxeq3oEyQxQXwI4ReCgW9DPoPR94sNlqWoDZnjRIE=
github.com/marten-seemann/qtls-go1-19 v0.1.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI=
github.com/onsi/ginkgo/v2 v2.2.0 h1:3ZNA3L1c5FYDFTTxbFeVGGD8jYvjYauHD30YgLxVsNI=
github.com/onsi/ginkgo/v2 v2.2.0/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tatsuhiro-t/go-nghttp2 v0.0.0-20150408091349-4742878d9c90 h1:ccVm9C6f5YMcVv6t9MXahIDkqVvzD6vklkJTIE4D2nY=
github.com/tatsuhiro-t/go-nghttp2 v0.0.0-20150408091349-4742878d9c90/go.mod h1:YZhsh86DfZgAShPKeg1eBLVrmuQxWcR9H4TdpgNvSnw=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA=
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@ -24,6 +24,7 @@
GO_FILES = \
nghttpx_http1_test.go \
nghttpx_http2_test.go \
nghttpx_http3_test.go \
server_tester.go
EXTRA_DIST = \
@ -39,6 +40,12 @@ EXTRA_DIST = \
req-return.rb \
resp-return.rb
GO_TEST_TAGS =
if ENABLE_HTTP3
GO_TEST_TAGS += quic
endif # ENABLE_HTTP3
it:
for i in $(GO_FILES); do [ -e $(builddir)/$$i ] || cp $(srcdir)/$$i $(builddir); done
sh setenv go test -v
sh setenv go test -v --tags=${GO_TEST_TAGS}

View File

@ -1,6 +1,6 @@
package nghttp2
const (
buildDir = "@top_builddir@"
buildDir = "@top_builddir@"
sourceDir = "@top_srcdir@"
)

View File

@ -28,8 +28,7 @@ func TestH1H1PlainGET(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
want := 200
if got := res.status; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
}
@ -50,8 +49,7 @@ func TestH1H1PlainGETClose(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
want := 200
if got := res.status; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
}
@ -75,7 +73,7 @@ func TestH1H1InvalidMethod(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 501; got != want {
if got, want := res.status, http.StatusNotImplemented; got != want {
t.Errorf("status = %v; want %v", got, want)
}
}
@ -91,13 +89,8 @@ func TestH1H1MultipleRequestCL(t *testing.T) {
st := newServerTester(t, opts)
defer st.Close()
if _, err := io.WriteString(st.conn, fmt.Sprintf(`GET / HTTP/1.1
Host: %v
Test-Case: TestH1H1MultipleRequestCL
Content-Length: 0
Content-Length: 0
`, st.authority)); err != nil {
if _, err := io.WriteString(st.conn, fmt.Sprintf("GET / HTTP/1.1\r\nHost: %v\r\nTest-Case: TestH1H1MultipleRequestCL\r\nContent-Length: 0\r\nContent-Length: 0\r\n\r\n",
st.authority)); err != nil {
t.Fatalf("Error io.WriteString() = %v", err)
}
@ -106,8 +99,9 @@ Content-Length: 0
t.Fatalf("Error http.ReadResponse() = %v", err)
}
want := 400
if got := resp.StatusCode; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -149,7 +143,7 @@ func TestH1H1AffinityCookie(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
@ -177,7 +171,7 @@ func TestH1H1AffinityCookieTLS(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
@ -200,11 +194,14 @@ func TestH1H1GracefulShutdown(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
st.cmd.Process.Signal(syscall.SIGQUIT)
if err := st.cmd.Process.Signal(syscall.SIGQUIT); err != nil {
t.Fatalf("Error st.cmd.Process.Signal() = %v", err)
}
time.Sleep(150 * time.Millisecond)
res, err = st.http1(requestParam{
@ -214,7 +211,7 @@ func TestH1H1GracefulShutdown(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
@ -246,7 +243,7 @@ func TestH1H1HostRewrite(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
if got, want := res.header.Get("request-host"), st.backendHost; got != want {
@ -272,7 +269,10 @@ func TestH1H1BadHost(t *testing.T) {
if err != nil {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 400; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -295,7 +295,10 @@ func TestH1H1BadAuthority(t *testing.T) {
if err != nil {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 400; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -318,7 +321,10 @@ func TestH1H1BadScheme(t *testing.T) {
if err != nil {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 400; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -343,7 +349,9 @@ func TestH1H1HTTP10(t *testing.T) {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 200; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
if got, want := resp.Header.Get("request-host"), st.backendHost; got != want {
@ -372,7 +380,9 @@ func TestH1H1HTTP10NoHostRewrite(t *testing.T) {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 200; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
if got, want := resp.Header.Get("request-host"), st.backendHost; got != want {
@ -413,7 +423,7 @@ func TestH1H1RequestTrailer(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
}
@ -440,7 +450,7 @@ func TestH1H1HeaderFieldBufferPath(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 431; got != want {
if got, want := res.status, http.StatusRequestHeaderFieldsTooLarge; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -463,7 +473,7 @@ func TestH1H1HeaderFieldBuffer(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 431; got != want {
if got, want := res.status, http.StatusRequestHeaderFieldsTooLarge; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -491,7 +501,7 @@ func TestH1H1HeaderFields(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 431; got != want {
if got, want := res.status, http.StatusRequestHeaderFieldsTooLarge; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -500,20 +510,19 @@ func TestH1H1HeaderFields(t *testing.T) {
func TestH1H1Websocket(t *testing.T) {
opts := options{
handler: websocket.Handler(func(ws *websocket.Conn) {
io.Copy(ws, ws)
if _, err := io.Copy(ws, ws); err != nil {
t.Fatalf("Error io.Copy() = %v", err)
}
}).ServeHTTP,
}
st := newServerTester(t, opts)
defer st.Close()
content := []byte("hello world")
res, err := st.websocket(requestParam{
res := st.websocket(requestParam{
name: "TestH1H1Websocket",
body: content,
})
if err != nil {
t.Fatalf("Error st.websocket() = %v", err)
}
if got, want := res.body, content; !bytes.Equal(got, want) {
t.Errorf("echo: %q; want %q", got, want)
}
@ -540,7 +549,7 @@ func TestH1H1ReqPhaseSetHeader(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
}
@ -564,7 +573,7 @@ func TestH1H1ReqPhaseReturn(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 404; got != want {
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("status = %v; want %v", got, want)
}
@ -601,7 +610,7 @@ func TestH1H1RespPhaseSetHeader(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
@ -626,7 +635,7 @@ func TestH1H1RespPhaseReturn(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 404; got != want {
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("status = %v; want %v", got, want)
}
@ -663,7 +672,7 @@ func TestH1H1HTTPSRedirect(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 308; got != want {
if got, want := res.status, http.StatusPermanentRedirect; got != want {
t.Errorf("status = %v; want %v", got, want)
}
if got, want := res.header.Get("location"), "https://127.0.0.1/"; got != want {
@ -691,7 +700,7 @@ func TestH1H1HTTPSRedirectPort(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 308; got != want {
if got, want := res.status, http.StatusPermanentRedirect; got != want {
t.Errorf("status = %v; want %v", got, want)
}
if got, want := res.header.Get("location"), "https://127.0.0.1:8443/foo?bar"; got != want {
@ -712,7 +721,7 @@ func TestH1H1POSTRequests(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
@ -723,7 +732,7 @@ func TestH1H1POSTRequests(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
}
@ -774,8 +783,9 @@ func TestH1H2NoHost(t *testing.T) {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
want := 400
if got := resp.StatusCode; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -801,7 +811,9 @@ func TestH1H2HTTP10(t *testing.T) {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 200; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
if got, want := resp.Header.Get("request-host"), st.backendHost; got != want {
@ -831,7 +843,9 @@ func TestH1H2HTTP10NoHostRewrite(t *testing.T) {
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 200; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
if got, want := resp.Header.Get("request-host"), st.backendHost; got != want {
@ -864,7 +878,7 @@ func TestH1H2CrumbleCookie(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -974,7 +988,7 @@ func TestH1H2ReqPhaseReturn(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 404; got != want {
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("status = %v; want %v", got, want)
}
@ -1014,7 +1028,7 @@ func TestH1H2RespPhaseReturn(t *testing.T) {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 404; got != want {
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("status = %v; want %v", got, want)
}
@ -1058,7 +1072,7 @@ func TestH1H2TE(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -1088,7 +1102,7 @@ backend=127.0.0.1,3011
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
@ -1130,7 +1144,7 @@ backend=127.0.0.1,3011
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
@ -1172,7 +1186,7 @@ backend=127.0.0.1,3011
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 405; got != want {
if got, want := res.status, http.StatusMethodNotAllowed; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
@ -1209,7 +1223,7 @@ func TestH1APIConfigrevision(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want = %v", got, want)
}
@ -1256,7 +1270,7 @@ backend=127.0.0.1,3011
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 404; got != want {
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
@ -1292,7 +1306,7 @@ func TestH1Healthmon(t *testing.T) {
if err != nil {
t.Fatalf("Error st.http1() = %v", err)
}
if got, want := res.status, 200; got != want {
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
}
@ -1309,12 +1323,8 @@ func TestH1ResponseBeforeRequestEnd(t *testing.T) {
st := newServerTester(t, opts)
defer st.Close()
if _, err := io.WriteString(st.conn, fmt.Sprintf(`POST / HTTP/1.1
Host: %v
Test-Case: TestH1ResponseBeforeRequestEnd
Content-Length: 1000000
`, st.authority)); err != nil {
if _, err := io.WriteString(st.conn, fmt.Sprintf("POST / HTTP/1.1\r\nHost: %v\r\nTest-Case: TestH1ResponseBeforeRequestEnd\r\nContent-Length: 1000000\r\n\r\n",
st.authority)); err != nil {
t.Fatalf("Error io.WriteString() = %v", err)
}
@ -1323,7 +1333,9 @@ Content-Length: 1000000
t.Fatalf("Error http.ReadResponse() = %v", err)
}
if got, want := resp.StatusCode, 404; got != want {
defer resp.Body.Close()
if got, want := resp.StatusCode, http.StatusNotFound; got != want {
t.Errorf("status: %v; want %v", got, want)
}
}
@ -1344,7 +1356,9 @@ func TestH1H1ChunkedEndsPrematurely(t *testing.T) {
return
}
defer conn.Close()
bufrw.WriteString("HTTP/1.1 200\r\nTransfer-Encoding: chunked\r\n\r\n")
if _, err := bufrw.WriteString("HTTP/1.1 200\r\nTransfer-Encoding: chunked\r\n\r\n"); err != nil {
t.Fatalf("Error bufrw.WriteString() = %v", err)
}
bufrw.Flush()
},
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,393 @@
//go:build quic
package nghttp2
import (
"bytes"
"crypto/rand"
"io"
"net/http"
"regexp"
"testing"
"golang.org/x/net/http2/hpack"
)
// TestH3H1PlainGET tests whether simple HTTP/3 GET request works.
func TestH3H1PlainGET(t *testing.T) {
st := newServerTester(t, options{
quic: true,
})
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H1PlainGET",
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
}
// TestH3H1RequestBody tests HTTP/3 request with body works.
func TestH3H1RequestBody(t *testing.T) {
body := make([]byte, 3333)
_, err := rand.Read(body)
if err != nil {
t.Fatalf("Unable to create request body: %v", err)
}
opts := options{
handler: func(w http.ResponseWriter, r *http.Request) {
buf := make([]byte, 4096)
buflen := 0
p := buf
for {
if len(p) == 0 {
t.Fatal("Request body is too large")
}
n, err := r.Body.Read(p)
p = p[n:]
buflen += n
if err != nil {
if err == io.EOF {
break
}
t.Fatalf("r.Body.Read() = %v", err)
}
}
buf = buf[:buflen]
if got, want := buf, body; !bytes.Equal(got, want) {
t.Fatalf("buf = %v; want %v", got, want)
}
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H1RequestBody",
body: body,
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
}
// TestH3H1GenerateVia tests that server generates Via header field to
// and from backend server.
func TestH3H1GenerateVia(t *testing.T) {
opts := options{
handler: func(w http.ResponseWriter, r *http.Request) {
if got, want := r.Header.Get("Via"), "3 nghttpx"; got != want {
t.Errorf("Via: %v; want %v", got, want)
}
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H1GenerateVia",
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.header.Get("Via"), "1.1 nghttpx"; got != want {
t.Errorf("Via: %v; want %v", got, want)
}
}
// TestH3H1AppendVia tests that server adds value to existing Via
// header field to and from backend server.
func TestH3H1AppendVia(t *testing.T) {
opts := options{
handler: func(w http.ResponseWriter, r *http.Request) {
if got, want := r.Header.Get("Via"), "foo, 3 nghttpx"; got != want {
t.Errorf("Via: %v; want %v", got, want)
}
w.Header().Add("Via", "bar")
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H1AppendVia",
header: []hpack.HeaderField{
pair("via", "foo"),
},
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.header.Get("Via"), "bar, 1.1 nghttpx"; got != want {
t.Errorf("Via: %v; want %v", got, want)
}
}
// TestH3H1NoVia tests that server does not add value to existing Via
// header field to and from backend server.
func TestH3H1NoVia(t *testing.T) {
opts := options{
args: []string{"--no-via"},
handler: func(w http.ResponseWriter, r *http.Request) {
if got, want := r.Header.Get("Via"), "foo"; got != want {
t.Errorf("Via: %v; want %v", got, want)
}
w.Header().Add("Via", "bar")
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H1NoVia",
header: []hpack.HeaderField{
pair("via", "foo"),
},
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.header.Get("Via"), "bar"; got != want {
t.Errorf("Via: %v; want %v", got, want)
}
}
// TestH3H1BadResponseCL tests that server returns error when
// content-length response header field value does not match its
// response body size.
func TestH3H1BadResponseCL(t *testing.T) {
opts := options{
handler: func(w http.ResponseWriter, r *http.Request) {
// we set content-length: 1024, but only send 3 bytes.
w.Header().Add("Content-Length", "1024")
if _, err := w.Write([]byte("foo")); err != nil {
t.Fatalf("Error w.Write() = %v", err)
}
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
_, err := st.http3(requestParam{
name: "TestH3H1BadResponseCL",
})
if err == nil {
t.Fatal("st.http3() should fail")
}
}
// TestH3H1HTTPSRedirect tests that HTTPS redirect should not happen
// with HTTP/3.
func TestH3H1HTTPSRedirect(t *testing.T) {
opts := options{
args: []string{"--redirect-if-not-tls"},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H1HTTPSRedirect",
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
}
// TestH3H1AffinityCookieTLS tests that affinity cookie is sent back
// in https.
func TestH3H1AffinityCookieTLS(t *testing.T) {
opts := options{
args: []string{"--affinity-cookie"},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H1AffinityCookieTLS",
scheme: "https",
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.status, http.StatusOK; got != want {
t.Errorf("status = %v; want %v", got, want)
}
const pattern = `affinity=[0-9a-f]{8}; Path=/foo/bar; Secure`
validCookie := regexp.MustCompile(pattern)
if got := res.header.Get("Set-Cookie"); !validCookie.MatchString(got) {
t.Errorf("Set-Cookie: %v; want pattern %v", got, pattern)
}
}
// TestH3H2ReqPhaseReturn tests mruby request phase hook returns
// custom response.
func TestH3H2ReqPhaseReturn(t *testing.T) {
opts := options{
args: []string{
"--http2-bridge",
"--mruby-file=" + testDir + "/req-return.rb",
},
handler: func(w http.ResponseWriter, r *http.Request) {
t.Fatalf("request should not be forwarded")
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H2ReqPhaseReturn",
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("status = %v; want %v", got, want)
}
hdtests := []struct {
k, v string
}{
{"content-length", "20"},
{"from", "mruby"},
}
for _, tt := range hdtests {
if got, want := res.header.Get(tt.k), tt.v; got != want {
t.Errorf("%v = %v; want %v", tt.k, got, want)
}
}
if got, want := string(res.body), "Hello World from req"; got != want {
t.Errorf("body = %v; want %v", got, want)
}
}
// TestH3H2RespPhaseReturn tests mruby response phase hook returns
// custom response.
func TestH3H2RespPhaseReturn(t *testing.T) {
opts := options{
args: []string{
"--http2-bridge",
"--mruby-file=" + testDir + "/resp-return.rb",
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3H2RespPhaseReturn",
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("status = %v; want %v", got, want)
}
hdtests := []struct {
k, v string
}{
{"content-length", "21"},
{"from", "mruby"},
}
for _, tt := range hdtests {
if got, want := res.header.Get(tt.k), tt.v; got != want {
t.Errorf("%v = %v; want %v", tt.k, got, want)
}
}
if got, want := string(res.body), "Hello World from resp"; got != want {
t.Errorf("body = %v; want %v", got, want)
}
}
// TestH3ResponseBeforeRequestEnd tests the situation where response
// ends before request body finishes.
func TestH3ResponseBeforeRequestEnd(t *testing.T) {
opts := options{
args: []string{"--mruby-file=" + testDir + "/req-return.rb"},
handler: func(w http.ResponseWriter, r *http.Request) {
t.Fatal("request should not be forwarded")
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
res, err := st.http3(requestParam{
name: "TestH3ResponseBeforeRequestEnd",
noEndStream: true,
})
if err != nil {
t.Fatalf("Error st.http3() = %v", err)
}
if got, want := res.status, http.StatusNotFound; got != want {
t.Errorf("res.status: %v; want %v", got, want)
}
}
// TestH3H1ChunkedEndsPrematurely tests that a stream is reset if the
// backend chunked encoded response ends prematurely.
func TestH3H1ChunkedEndsPrematurely(t *testing.T) {
opts := options{
handler: func(w http.ResponseWriter, r *http.Request) {
hj, ok := w.(http.Hijacker)
if !ok {
http.Error(w, "Could not hijack the connection", http.StatusInternalServerError)
return
}
conn, bufrw, err := hj.Hijack()
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer conn.Close()
if _, err := bufrw.WriteString("HTTP/1.1 200\r\nTransfer-Encoding: chunked\r\n\r\n"); err != nil {
t.Fatalf("Error bufrw.WriteString() = %v", err)
}
bufrw.Flush()
},
quic: true,
}
st := newServerTester(t, opts)
defer st.Close()
_, err := st.http3(requestParam{
name: "TestH3H1ChunkedEndsPrematurely",
})
if err == nil {
t.Fatal("st.http3() should fail")
}
}

View File

@ -3,6 +3,7 @@ package nghttp2
import (
"bufio"
"bytes"
"context"
"crypto/tls"
"encoding/binary"
"errors"
@ -21,6 +22,7 @@ import (
"testing"
"time"
"github.com/lucas-clemente/quic-go/http3"
"github.com/tatsuhiro-t/go-nghttp2"
"golang.org/x/net/http2"
"golang.org/x/net/http2/hpack"
@ -42,7 +44,6 @@ func pair(name, value string) hpack.HeaderField {
}
type serverTester struct {
args []string // command-line arguments
cmd *exec.Cmd // test frontend server process, which is test subject
url string // test frontend server URL
t *testing.T
@ -76,10 +77,21 @@ type options struct {
// tlsConfig is the client side TLS configuration that is used
// when tls is true.
tlsConfig *tls.Config
// tcpData is additional data that are written to connection
// before TLS handshake starts. This field is ignored if tls
// is false.
tcpData []byte
// quic, if set to true, sets up QUIC frontend connection.
// quic implies tls = true.
quic bool
}
// newServerTester creates test context.
func newServerTester(t *testing.T, opts options) *serverTester {
if opts.quic {
opts.tls = true
}
if opts.handler == nil {
opts.handler = noopHandler
}
@ -178,6 +190,12 @@ func newServerTester(t *testing.T, opts options) *serverTester {
args = append(args, fmt.Sprintf("-f127.0.0.1,%v%v%v", serverPort, noTLS, proxyProto), b,
"--errorlog-file="+logDir+"/log.txt", "-LINFO")
if opts.quic {
args = append(args,
fmt.Sprintf("-f127.0.0.1,%v;quic", serverPort),
"--no-quic-bpf")
}
authority := fmt.Sprintf("127.0.0.1:%v", opts.connectPort)
st := &serverTester{
@ -204,9 +222,15 @@ func newServerTester(t *testing.T, opts options) *serverTester {
for {
time.Sleep(50 * time.Millisecond)
var conn net.Conn
var err error
if opts.tls {
conn, err := net.Dial("tcp", authority)
if err == nil && opts.tls {
if len(opts.tcpData) > 0 {
if _, err := conn.Write(opts.tcpData); err != nil {
st.Close()
st.t.Fatal("Error writing TCP data")
}
}
var tlsConfig *tls.Config
if opts.tlsConfig == nil {
tlsConfig = new(tls.Config)
@ -219,26 +243,20 @@ func newServerTester(t *testing.T, opts options) *serverTester {
} else {
tlsConfig.NextProtos = []string{"h2"}
}
conn, err = tls.Dial("tcp", authority, tlsConfig)
} else {
conn, err = net.Dial("tcp", authority)
tlsConn := tls.Client(conn, tlsConfig)
err = tlsConn.Handshake()
if err == nil {
conn = tlsConn
}
}
if err != nil {
retry += 1
retry++
if retry >= 100 {
st.Close()
st.t.Fatalf("Error server is not responding too long; server command-line arguments may be invalid")
}
continue
}
if opts.tls {
tlsConn := conn.(*tls.Conn)
cs := tlsConn.ConnectionState()
if !cs.NegotiatedProtocolIsMutual {
st.Close()
st.t.Fatalf("Error negotiated next protocol is not mutual")
}
}
st.conn = conn
break
}
@ -259,16 +277,22 @@ func (st *serverTester) Close() {
if st.cmd != nil {
done := make(chan struct{})
go func() {
st.cmd.Wait()
if err := st.cmd.Wait(); err != nil {
st.t.Errorf("Error st.cmd.Wait() = %v", err)
}
close(done)
}()
st.cmd.Process.Signal(syscall.SIGQUIT)
if err := st.cmd.Process.Signal(syscall.SIGQUIT); err != nil {
st.t.Errorf("Error st.cmd.Process.Signal() = %v", err)
}
select {
case <-done:
case <-time.After(10 * time.Second):
st.cmd.Process.Kill()
if err := st.cmd.Process.Kill(); err != nil {
st.t.Errorf("Error st.cmd.Process.Kill() = %v", err)
}
<-done
}
}
@ -331,7 +355,7 @@ func (cbr *chunkedBodyReader) Read(p []byte) (n int, err error) {
return cbr.body.Read(p)
}
func (st *serverTester) websocket(rp requestParam) (*serverResponse, error) {
func (st *serverTester) websocket(rp requestParam) *serverResponse {
urlstring := st.url + "/echo"
config, err := websocket.NewConfig(urlstring, st.url)
@ -363,6 +387,81 @@ func (st *serverTester) websocket(rp requestParam) (*serverResponse, error) {
body: msg[:n],
}
return res
}
func (st *serverTester) http3(rp requestParam) (*serverResponse, error) {
rt := &http3.RoundTripper{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
}
defer rt.Close()
c := &http.Client{
Transport: rt,
}
method := "GET"
if rp.method != "" {
method = rp.method
}
var body io.Reader
if rp.body != nil {
body = bytes.NewBuffer(rp.body)
}
reqURL := st.url
if rp.path != "" {
u, err := url.Parse(st.url)
if err != nil {
st.t.Fatalf("Error parsing URL from st.url %v: %v", st.url, err)
}
u.Path = ""
u.RawQuery = ""
reqURL = u.String() + rp.path
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
req, err := http.NewRequestWithContext(ctx, method, reqURL, body)
if err != nil {
return nil, err
}
for _, h := range rp.header {
req.Header.Add(h.Name, h.Value)
}
req.Header.Add("Test-Case", rp.name)
// TODO http3 package does not support trailer at the time of
// this writing.
resp, err := c.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
res := &serverResponse{
status: resp.StatusCode,
header: resp.Header,
body: respBody,
connClose: resp.Close,
}
return res, nil
}
@ -397,7 +496,10 @@ func (st *serverTester) http1(rp requestParam) (*serverResponse, error) {
reqURL = u.String() + rp.path
}
req, err := http.NewRequest(method, reqURL, body)
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
req, err := http.NewRequestWithContext(ctx, method, reqURL, body)
if err != nil {
return nil, err
}
@ -655,7 +757,9 @@ func cloneHeader(h http.Header) http.Header {
}
func noopHandler(w http.ResponseWriter, r *http.Request) {
io.ReadAll(r.Body)
if _, err := io.ReadAll(r.Body); err != nil {
http.Error(w, fmt.Sprintf("Error io.ReadAll() = %v", err), http.StatusInternalServerError)
}
}
type APIResponse struct {
@ -695,9 +799,13 @@ const (
proxyProtocolV2ProtocolDgram proxyProtocolV2Protocol = 0x2
)
func writeProxyProtocolV2(w io.Writer, hdr proxyProtocolV2) {
w.Write([]byte{0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A})
w.Write([]byte{byte(0x20 | hdr.command)})
func writeProxyProtocolV2(w io.Writer, hdr proxyProtocolV2) error {
if _, err := w.Write([]byte{0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A}); err != nil {
return err
}
if _, err := w.Write([]byte{byte(0x20 | hdr.command)}); err != nil {
return err
}
switch srcAddr := hdr.sourceAddress.(type) {
case *net.TCPAddr:
@ -712,13 +820,25 @@ func writeProxyProtocolV2(w io.Writer, hdr proxyProtocolV2) {
fam = byte(proxyProtocolV2FamilyInet6 << 4)
}
fam |= byte(proxyProtocolV2ProtocolStream)
w.Write([]byte{fam})
if _, err := w.Write([]byte{fam}); err != nil {
return err
}
length := uint16(len(srcAddr.IP)*2 + 4 + len(hdr.additionalData))
binary.Write(w, binary.BigEndian, length)
w.Write(srcAddr.IP)
w.Write(dstAddr.IP)
binary.Write(w, binary.BigEndian, uint16(srcAddr.Port))
binary.Write(w, binary.BigEndian, uint16(dstAddr.Port))
if err := binary.Write(w, binary.BigEndian, length); err != nil {
return err
}
if _, err := w.Write(srcAddr.IP); err != nil {
return err
}
if _, err := w.Write(dstAddr.IP); err != nil {
return err
}
if err := binary.Write(w, binary.BigEndian, uint16(srcAddr.Port)); err != nil {
return err
}
if err := binary.Write(w, binary.BigEndian, uint16(dstAddr.Port)); err != nil {
return err
}
case *net.UnixAddr:
dstAddr := hdr.destinationAddress.(*net.UnixAddr)
if len(srcAddr.Name) > 108 {
@ -736,20 +856,40 @@ func writeProxyProtocolV2(w io.Writer, hdr proxyProtocolV2) {
default:
fam |= byte(proxyProtocolV2ProtocolUnspec)
}
w.Write([]byte{fam})
if _, err := w.Write([]byte{fam}); err != nil {
return err
}
length := uint16(216 + len(hdr.additionalData))
binary.Write(w, binary.BigEndian, length)
if err := binary.Write(w, binary.BigEndian, length); err != nil {
return err
}
zeros := make([]byte, 108)
w.Write([]byte(srcAddr.Name))
w.Write(zeros[:108-len(srcAddr.Name)])
w.Write([]byte(dstAddr.Name))
w.Write(zeros[:108-len(dstAddr.Name)])
if _, err := w.Write([]byte(srcAddr.Name)); err != nil {
return err
}
if _, err := w.Write(zeros[:108-len(srcAddr.Name)]); err != nil {
return err
}
if _, err := w.Write([]byte(dstAddr.Name)); err != nil {
return err
}
if _, err := w.Write(zeros[:108-len(dstAddr.Name)]); err != nil {
return err
}
default:
fam := byte(proxyProtocolV2FamilyUnspec<<4) | byte(proxyProtocolV2ProtocolUnspec)
w.Write([]byte{fam})
if _, err := w.Write([]byte{fam}); err != nil {
return err
}
length := uint16(len(hdr.additionalData))
binary.Write(w, binary.BigEndian, length)
if err := binary.Write(w, binary.BigEndian, length); err != nil {
return err
}
}
w.Write(hdr.additionalData)
if _, err := w.Write(hdr.additionalData); err != nil {
return err
}
return nil
}

View File

@ -6,15 +6,8 @@
# The MIT License apply.
#
#
# Choose your weapons:
# Set 'USE_CYTHON=1' to build and install the 'nghttp2.pyd' Python extension.
#
THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
USE_CYTHON := 0
#USE_CYTHON := 1
_VERSION := $(shell grep AC_INIT ../configure.ac | cut -d'[' -f3 | sed -e 's/-DEV//g' -e 's/], //g')
_VERSION := $(subst ., ,$(_VERSION))
VER_MAJOR := $(word 1,$(_VERSION))
@ -102,7 +95,7 @@ NGHTTP2_OBJ_D := $(addprefix $(OBJ_DIR)/d_, $(notdir $(NGHTTP2_SRC:.c=.obj)))
clean_nghttp2_pyd_0 clean_nghttp2_pyd_1
all: intro includes/nghttp2/nghttp2ver.h $(OBJ_DIR) $(TARGETS) build_nghttp2_pyd_$(USE_CYTHON)
all: intro includes/nghttp2/nghttp2ver.h $(OBJ_DIR) $(TARGETS)
@echo 'Welcome to NgHTTP2 (release + debug).'
@echo 'Do a "make -f Makefile.MSVC install" at own risk!'
@ -121,7 +114,7 @@ $(OBJ_DIR):
install: includes/nghttp2/nghttp2.h includes/nghttp2/nghttp2ver.h \
$(TARGETS) \
copy_headers_and_libs install_nghttp2_pyd_$(USE_CYTHON)
copy_headers_and_libs
#
# This MUST be done before using the 'install_nghttp2_pyd_1' rule.
@ -160,31 +153,6 @@ $(DLL_D): $(NGHTTP2_OBJ_D) $(OBJ_DIR)/d_nghttp2.res
WIN_OBJDIR:=$(shell cygpath -w $(abspath $(OBJ_DIR)))
WIN_OBJDIR:=$(subst \,/,$(WIN_OBJDIR))
../python/setup.py: ../python/setup.py.in $(THIS_MAKEFILE)
cd ../python ; \
echo '# $(GENERATED). DO NOT EDIT.' > setup.py ; \
sed -e 's/@top_srcdir@/../' \
-e 's%@top_builddir@%$(WIN_OBJDIR)%' \
-e 's/@PACKAGE_VERSION@/$(VERSION)/' setup.py.in >> setup.py ;
build_nghttp2_pyd_0: ;
build_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
cd ../python ; \
python setup.py build_ext -i -f bdist_wininst
install_nghttp2_pyd_0: ;
install_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
cd ../python ; \
pip install .
clean_nghttp2_pyd_0: ;
clean_nghttp2_pyd_1:
cd ../python ; \
rm -fR build dist
$(OBJ_DIR)/r_%.obj: %.c $(THIS_MAKEFILE)
$(CC) $(CFLAGS_R) $(CFLAGS) -Fo$@ -c $<
@echo
@ -262,7 +230,7 @@ clean:
rm -f $(OBJ_DIR)/* includes/nghttp2/nghttp2ver.h
@echo
vclean realclean: clean clean_nghttp2_pyd_$(USE_CYTHON)
vclean realclean: clean
- rm -rf $(OBJ_DIR)
- rm -f .depend.MSVC

View File

@ -1430,12 +1430,6 @@ typedef ssize_t (*nghttp2_recv_callback)(nghttp2_session *session, uint8_t *buf,
* respectively. The header name/value pairs are emitted via
* :type:`nghttp2_on_header_callback`.
*
* For HEADERS, PUSH_PROMISE and DATA frames, this callback may be
* called after stream is closed (see
* :type:`nghttp2_on_stream_close_callback`). The application should
* check that stream is still alive using its own stream management or
* :func:`nghttp2_session_get_stream_user_data()`.
*
* Only HEADERS and DATA frame can signal the end of incoming data.
* If ``frame->hd.flags & NGHTTP2_FLAG_END_STREAM`` is nonzero, the
* |frame| is the last frame from the remote peer in this stream.
@ -2750,6 +2744,18 @@ NGHTTP2_EXTERN void
nghttp2_option_set_server_fallback_rfc7540_priorities(nghttp2_option *option,
int val);
/**
* @function
*
* This option, if set to nonzero, turns off RFC 9113 leading and
* trailing white spaces validation against HTTP field value. Some
* important fields, such as HTTP/2 pseudo header fields, are
* validated more strictly and this option does not apply to them.
*/
NGHTTP2_EXTERN void
nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation(
nghttp2_option *option, int val);
/**
* @function
*
@ -5046,9 +5052,23 @@ NGHTTP2_EXTERN int nghttp2_check_header_name(const uint8_t *name, size_t len);
* Returns nonzero if HTTP header field value |value| of length |len|
* is valid according to
* http://tools.ietf.org/html/rfc7230#section-3.2
*
* This function is considered obsolete, and application should
* consider to use `nghttp2_check_header_value_rfc9113()` instead.
*/
NGHTTP2_EXTERN int nghttp2_check_header_value(const uint8_t *value, size_t len);
/**
* @function
*
* Returns nonzero if HTTP header field value |value| of length |len|
* is valid according to
* http://tools.ietf.org/html/rfc7230#section-3.2, plus
* https://datatracker.ietf.org/doc/html/rfc9113#section-8.2.1
*/
NGHTTP2_EXTERN int nghttp2_check_header_value_rfc9113(const uint8_t *value,
size_t len);
/**
* @function
*

View File

@ -507,6 +507,19 @@ int nghttp2_check_header_value(const uint8_t *value, size_t len) {
return 1;
}
int nghttp2_check_header_value_rfc9113(const uint8_t *value, size_t len) {
if (len == 0) {
return 1;
}
if (*value == ' ' || *value == '\t' || *(value + len - 1) == ' ' ||
*(value + len - 1) == '\t') {
return 0;
}
return nghttp2_check_header_value(value, len);
}
/* Generated by genmethodchartbl.py */
static char VALID_METHOD_CHARS[] = {
0 /* NUL */, 0 /* SOH */, 0 /* STX */, 0 /* ETX */,

View File

@ -73,22 +73,9 @@ static int64_t parse_uint(const uint8_t *s, size_t len) {
return n;
}
static int lws(const uint8_t *s, size_t n) {
size_t i;
for (i = 0; i < n; ++i) {
if (s[i] != ' ' && s[i] != '\t') {
return 0;
}
}
return 1;
}
static int check_pseudo_header(nghttp2_stream *stream, const nghttp2_hd_nv *nv,
uint32_t flag) {
if (stream->http_flags & flag) {
return 0;
}
if (lws(nv->value->base, nv->value->len)) {
if ((stream->http_flags & flag) || nv->value->len == 0) {
return 0;
}
stream->http_flags = stream->http_flags | flag;
@ -349,6 +336,16 @@ static int check_scheme(const uint8_t *value, size_t len) {
return 1;
}
static int lws(const uint8_t *s, size_t n) {
size_t i;
for (i = 0; i < n; ++i) {
if (s[i] != ' ' && s[i] != '\t') {
return 0;
}
}
return 1;
}
int nghttp2_http_on_header(nghttp2_session *session, nghttp2_stream *stream,
nghttp2_frame *frame, nghttp2_hd_nv *nv,
int trailer) {
@ -391,15 +388,35 @@ int nghttp2_http_on_header(nghttp2_session *session, nghttp2_stream *stream,
case NGHTTP2_TOKEN_HOST:
if (session->server || frame->hd.type == NGHTTP2_PUSH_PROMISE) {
rv = nghttp2_check_authority(nv->value->base, nv->value->len);
} else {
} else if (
stream->flags &
NGHTTP2_STREAM_FLAG_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION) {
rv = nghttp2_check_header_value(nv->value->base, nv->value->len);
} else {
rv = nghttp2_check_header_value_rfc9113(nv->value->base, nv->value->len);
}
break;
case NGHTTP2_TOKEN__SCHEME:
rv = check_scheme(nv->value->base, nv->value->len);
break;
case NGHTTP2_TOKEN__PROTOCOL:
/* Check the value consists of just white spaces, which was done
in check_pseudo_header before
nghttp2_check_header_value_rfc9113 has been introduced. */
if ((stream->flags &
NGHTTP2_STREAM_FLAG_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION) &&
lws(nv->value->base, nv->value->len)) {
rv = 0;
break;
}
/* fall through */
default:
rv = nghttp2_check_header_value(nv->value->base, nv->value->len);
if (stream->flags &
NGHTTP2_STREAM_FLAG_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION) {
rv = nghttp2_check_header_value(nv->value->base, nv->value->len);
} else {
rv = nghttp2_check_header_value_rfc9113(nv->value->base, nv->value->len);
}
}
if (rv == 0) {

View File

@ -53,7 +53,7 @@
STIN uint32_t htonl(uint32_t hostlong) {
uint32_t res;
unsigned char *p = (unsigned char *)&res;
*p++ = hostlong >> 24;
*p++ = (unsigned char)(hostlong >> 24);
*p++ = (hostlong >> 16) & 0xffu;
*p++ = (hostlong >> 8) & 0xffu;
*p = hostlong & 0xffu;
@ -63,7 +63,7 @@ STIN uint32_t htonl(uint32_t hostlong) {
STIN uint16_t htons(uint16_t hostshort) {
uint16_t res;
unsigned char *p = (unsigned char *)&res;
*p++ = hostshort >> 8;
*p++ = (unsigned char)(hostshort >> 8);
*p = hostshort & 0xffu;
return res;
}
@ -71,9 +71,9 @@ STIN uint16_t htons(uint16_t hostshort) {
STIN uint32_t ntohl(uint32_t netlong) {
uint32_t res;
unsigned char *p = (unsigned char *)&netlong;
res = *p++ << 24;
res += *p++ << 16;
res += *p++ << 8;
res = (uint32_t)(*p++ << 24);
res += (uint32_t)(*p++ << 16);
res += (uint32_t)(*p++ << 8);
res += *p;
return res;
}
@ -81,7 +81,7 @@ STIN uint32_t ntohl(uint32_t netlong) {
STIN uint16_t ntohs(uint16_t netshort) {
uint16_t res;
unsigned char *p = (unsigned char *)&netshort;
res = *p++ << 8;
res = (uint16_t)(*p++ << 8);
res += *p;
return res;
}

View File

@ -136,3 +136,10 @@ void nghttp2_option_set_server_fallback_rfc7540_priorities(
option->opt_set_mask |= NGHTTP2_OPT_SERVER_FALLBACK_RFC7540_PRIORITIES;
option->server_fallback_rfc7540_priorities = val;
}
void nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation(
nghttp2_option *option, int val) {
option->opt_set_mask |=
NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION;
option->no_rfc9113_leading_and_trailing_ws_validation = val;
}

View File

@ -69,6 +69,7 @@ typedef enum {
NGHTTP2_OPT_MAX_OUTBOUND_ACK = 1 << 11,
NGHTTP2_OPT_MAX_SETTINGS = 1 << 12,
NGHTTP2_OPT_SERVER_FALLBACK_RFC7540_PRIORITIES = 1 << 13,
NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION = 1 << 14,
} nghttp2_option_flag;
/**
@ -132,6 +133,10 @@ struct nghttp2_option {
* NGHTTP2_OPT_SERVER_FALLBACK_RFC7540_PRIORITIES
*/
int server_fallback_rfc7540_priorities;
/**
* NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION
*/
int no_rfc9113_leading_and_trailing_ws_validation;
/**
* NGHTTP2_OPT_USER_RECV_EXT_TYPES
*/

View File

@ -566,6 +566,13 @@ static int session_new(nghttp2_session **session_ptr,
(*session_ptr)->opt_flags |=
NGHTTP2_OPTMASK_SERVER_FALLBACK_RFC7540_PRIORITIES;
}
if ((option->opt_set_mask &
NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION) &&
option->no_rfc9113_leading_and_trailing_ws_validation) {
(*session_ptr)->opt_flags |=
NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION;
}
}
rv = nghttp2_hd_deflate_init2(&(*session_ptr)->hd_deflater,
@ -1296,6 +1303,11 @@ nghttp2_stream *nghttp2_session_open_stream(nghttp2_session *session,
mem = &session->mem;
stream = nghttp2_session_get_stream_raw(session, stream_id);
if (session->opt_flags &
NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION) {
flags |= NGHTTP2_STREAM_FLAG_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION;
}
if (stream) {
assert(stream->state == NGHTTP2_STREAM_IDLE);
assert((stream->flags & NGHTTP2_STREAM_FLAG_NO_RFC7540_PRIORITIES) ||

View File

@ -53,7 +53,8 @@ typedef enum {
NGHTTP2_OPTMASK_NO_HTTP_MESSAGING = 1 << 2,
NGHTTP2_OPTMASK_NO_AUTO_PING_ACK = 1 << 3,
NGHTTP2_OPTMASK_NO_CLOSED_STREAMS = 1 << 4,
NGHTTP2_OPTMASK_SERVER_FALLBACK_RFC7540_PRIORITIES = 1 << 5
NGHTTP2_OPTMASK_SERVER_FALLBACK_RFC7540_PRIORITIES = 1 << 5,
NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION = 1 << 6,
} nghttp2_optmask;
/*

View File

@ -96,6 +96,9 @@ typedef enum {
NGHTTP2_STREAM_FLAG_NO_RFC7540_PRIORITIES = 0x10,
/* Ignore client RFC 9218 priority signal. */
NGHTTP2_STREAM_FLAG_IGNORE_CLIENT_PRIORITIES = 0x20,
/* Indicates that RFC 9113 leading and trailing white spaces
validation against a field value is not performed. */
NGHTTP2_STREAM_FLAG_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION = 0x40,
} nghttp2_stream_flag;
/* HTTP related flags to enforce HTTP semantics */

Some files were not shown because too many files have changed in this diff Show More