Compare commits

..

2931 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
fb0bd22979 Update manual pages 2021-02-02 19:34:21 +09:00
Tatsuhiro Tsujikawa
3dc6c0afa2 Bump version number to 1.43.0 2021-02-02 19:28:14 +09:00
Tatsuhiro Tsujikawa
e8762781a7 Update AUTHORS 2021-02-02 19:26:08 +09:00
Tatsuhiro Tsujikawa
2bf841e22a workflow: Build with UBSAN enabled 2021-01-17 17:41:01 +09:00
Tatsuhiro Tsujikawa
7ebab98e91 Merge pull request #1548 from nghttp2/py3-bindings
Py3 bindings
2020-12-29 19:09:35 +09:00
Tatsuhiro Tsujikawa
23fc6cc900 Bump Linux runner OS to ubuntu 20.04 2020-12-29 18:33:50 +09:00
Tatsuhiro Tsujikawa
2e35cdea6c Update doc 2020-12-29 18:27:07 +09:00
Tatsuhiro Tsujikawa
22af8e782b Require python3 for python bindings 2020-12-29 18:24:41 +09:00
Tatsuhiro Tsujikawa
c88e910009 Update ax_python_devel.m4 2020-12-29 18:24:41 +09:00
Tatsuhiro Tsujikawa
43ba312593 Merge pull request #1547 from nghttp2/sphinx-v3.3
Sphinx v3.3
2020-12-29 18:15:35 +09:00
Tatsuhiro Tsujikawa
3c17299a92 Update enum references 2020-12-29 17:47:57 +09:00
Tatsuhiro Tsujikawa
a7ecff657c Make doc generation work with sphinx v3.3 2020-12-29 17:47:57 +09:00
Tatsuhiro Tsujikawa
79a4f789a1 Merge pull request #1546 from nghttp2/py3-scripts
Python3 development scripts
2020-12-29 17:47:04 +09:00
Tatsuhiro Tsujikawa
28ba0b37e1 Update document reference 2020-12-29 17:35:55 +09:00
Tatsuhiro Tsujikawa
6b7ade9f3f Require python3 for python scripts 2020-12-29 17:35:55 +09:00
Tatsuhiro Tsujikawa
465367294f Bump clang-format to 10 2020-12-28 11:45:44 +09:00
Tatsuhiro Tsujikawa
563c117303 Merge pull request #1544 from nghttp2/nghttpx-clear-mcpool
nghttpx: Make sure that Pool gets cleared when all buffers are returned
2020-12-16 23:50:39 +09:00
Tatsuhiro Tsujikawa
1c04ca8032 Merge pull request #1540 from tavrez/patch-1
Added new nghttp2_ksl.c to Windows makefile
2020-12-16 23:31:33 +09:00
Tatsuhiro Tsujikawa
d32e20bcaa nghttpx: Make sure that Pool gets cleared when all buffers are returned 2020-12-16 23:27:58 +09:00
Tatsuhiro Tsujikawa
8b8ba6b0a6 Merge pull request #1542 from nghttp2/nghttpx-check-sigalg
nghttpx: Choose ECDSA cert if compatible signature algorithm available
2020-12-14 23:00:52 +09:00
Tatsuhiro Tsujikawa
81fb015391 nghttpx: Choose ECDSA cert if compatible signature algorithm available 2020-12-13 23:40:43 +09:00
Reza Tavakoli
d8c71d5fdb Added new nghttp2_ksl.c to Windows makefile 2020-12-02 17:38:03 +03:30
Tatsuhiro Tsujikawa
fb5b5aef0a Merge pull request #1537 from nghttp2/nghttpx-allow-colon-in-pattern
nghttpx: Add workaround to include ':' in backend pattern
2020-11-27 23:35:27 +09:00
Tatsuhiro Tsujikawa
6787423edc nghttpx: Add workaround to include ':' in backend pattern 2020-11-27 22:15:46 +09:00
Tatsuhiro Tsujikawa
ffcdf5dfbc Merge pull request #1533 from LorenzNickel/patch-1
Fix typo in security.rst
2020-11-24 00:51:14 +09:00
Lorenz Nickel
0cdb173846 Fix typo in security.rst 2020-11-23 16:39:49 +01:00
Tatsuhiro Tsujikawa
c9d5472ffb Bump version number to 1.43.0-DEV 2020-11-23 23:54:19 +09:00
Tatsuhiro Tsujikawa
15bd71ed94 Update manual pages 2020-11-23 23:38:21 +09:00
Tatsuhiro Tsujikawa
a76b7a37fd Bump version number to 1.42.0, LT revision to 34:1:20 2020-11-23 23:22:49 +09:00
Tatsuhiro Tsujikawa
5cdf9ce19b Update AUTHORS 2020-11-23 23:19:58 +09:00
Tatsuhiro Tsujikawa
0fba09246b Build with GitHub Actions 2020-11-16 21:22:03 +09:00
Tatsuhiro Tsujikawa
444fd8180d Bump llhttp to 2.2.0 2020-11-15 11:42:25 +09:00
Tatsuhiro Tsujikawa
f6b875e09d Add missing cmake/FindSystemd.cmake to dist 2020-11-15 11:25:33 +09:00
Tatsuhiro Tsujikawa
694c0a4fb3 cmake: Remove spdylay 2020-11-15 11:23:12 +09:00
Tatsuhiro Tsujikawa
da7959c2e8 nghttpx: Deal with the case when h2 backend is retired before it is initialized 2020-11-15 11:19:07 +09:00
Tatsuhiro Tsujikawa
2e44f23b05 Another mruby build fix 2020-09-24 23:30:41 +09:00
Tatsuhiro Tsujikawa
f5351bee25 Fix make clean on mruby 2020-09-24 23:18:35 +09:00
Tatsuhiro Tsujikawa
a1999ab2a5 Bump llhttp to 2.1.3 2020-09-24 23:13:00 +09:00
Tatsuhiro Tsujikawa
1bccccc174 Merge pull request #1511 from nghttp2/nghttpx-accesslog-path-without-query
nghttpx: Add accesslog variables to record request path without query
2020-09-24 22:56:30 +09:00
Tatsuhiro Tsujikawa
4e3c61ef4d nghttpx: Add accesslog variables to record request path without query
This commit the following variables to construct request line without
including query component:

* $method
* $path
* $path_without_query
* $protocol_version
2020-09-19 23:58:37 +09:00
Tatsuhiro Tsujikawa
7b4de401d2 nghttpx: Check worker wide blocker before creating new downstream connection 2020-09-19 23:22:14 +09:00
Tatsuhiro Tsujikawa
1570d5f694 Bump llhttp to 2.1.1 2020-09-03 19:33:09 +09:00
Tatsuhiro Tsujikawa
181a007a34 Fix mruby build
Copy build_config.rb to build directory because now
build_config.rb.lock is created along side it.

Define toolchain depending on CC environment variable.
2020-09-02 23:36:44 +09:00
Tatsuhiro Tsujikawa
7df73a5d90 nghttpx: mrb_run was removed 2020-09-02 22:12:45 +09:00
Tatsuhiro Tsujikawa
b00fa5567c Bump mruby to 2.1.2 2020-09-02 22:03:14 +09:00
Tatsuhiro Tsujikawa
4ecdc2903d Amend 7a57b039a6 2020-07-26 15:31:54 +09:00
Tatsuhiro Tsujikawa
7a57b039a6 Fix cmake build 2020-07-26 15:19:19 +09:00
Tatsuhiro Tsujikawa
1ce628529b nghttp2_map backed by nghttp2_ksl 2020-07-26 15:13:43 +09:00
Tatsuhiro Tsujikawa
6089353d52 Fix EXTRA_DIST 2020-07-24 20:37:16 +09:00
Tatsuhiro Tsujikawa
db45fb483c Fix sphinx warnings
This commit fixes the following warning:

RemovedInSphinx30Warning: sphinx.locale.l_() is deprecated.  Please use `_()` instead.
2020-07-24 20:23:57 +09:00
Tatsuhiro Tsujikawa
4272dcac1d Update sphinx_rtd_theme 2020-07-24 20:18:59 +09:00
Tatsuhiro Tsujikawa
32ac8bdf79 Add security process document 2020-07-24 20:14:07 +09:00
Tatsuhiro Tsujikawa
7f92b1e0e8 Merge pull request #1489 from tomaskrizek/doc-session-send
doc: nghttp2_session_send is also affected by max concurrent streams
2020-07-19 12:14:53 +09:00
Tatsuhiro Tsujikawa
d5550e946d Amend f1d8547b29
Better handling of tls and early data buffer
2020-07-14 19:47:08 +09:00
Tatsuhiro Tsujikawa
62411f5a6e nghttpx: Set client_handler to special frontend objects 2020-07-14 01:13:29 +09:00
Tatsuhiro Tsujikawa
e9465f0ee5 Revert "nghttpx: Fix ubsan error"
This reverts commit 14dfeee4ed.
2020-07-14 01:13:29 +09:00
Tatsuhiro Tsujikawa
14dfeee4ed nghttpx: Fix ubsan error 2020-07-14 00:12:07 +09:00
Tatsuhiro Tsujikawa
f1d8547b29 nghttpx: Fix stall when TLS follows after proxy protocol
This fixes that nghttpx stalls when TLS handshake and data follow
after proxy protocol header and no extra read notification is
triggered (e.g., just small 1 HTTP request).
2020-07-13 23:39:17 +09:00
Tatsuhiro Tsujikawa
7b46edb483 Merge pull request #1477 from nghttp2/ignore-rst-stream-to-idle-stream
Don't send RST_STREAM to idle stream
2020-06-28 11:50:59 +09:00
Tomas Krizek
5497a1dfa7 doc: nghttp2_session_send is also affected by max concurrent streams
Further clarify the function also takes into account maximum concurrent
streams.

Closes #691
Closes #817
2020-06-19 17:22:55 +02:00
Tatsuhiro Tsujikawa
c8bf8c6521 Don't send RST_STREAM to idle stream 2020-06-18 11:59:06 +09:00
Tatsuhiro Tsujikawa
b6b135c060 Merge pull request #1488 from tomaskrizek/doc-session-send-flow-control
doc: clarify flow control behaviour for nghttp2_session_send()
2020-06-18 11:57:51 +09:00
Tomas Krizek
f76ac19627 doc: clarify flow control behaviour for nghttp2_session_send()
The previous wording implied that if send_callback doesn't return
NGHTTP2_ERR_WOULDBLOCK, this function would always send all
submitted requests / data. This is not the case, since flow control can
cause some data to remain queued until WINDOW_UPDATE is received.
2020-06-17 17:19:30 +02:00
Tatsuhiro Tsujikawa
abe80e371e nghttpx: Fix logging integer 2020-06-10 20:56:33 +09:00
Tatsuhiro Tsujikawa
1ecc7940b8 Fix compile error with gcc 2020-06-06 00:48:33 +09:00
Tatsuhiro Tsujikawa
ab11b2bba5 clang-format 2020-06-05 23:16:01 +09:00
Tatsuhiro Tsujikawa
6d7f1256de Merge branch 'asraa-fix-ubsan' 2020-06-05 23:13:34 +09:00
Tatsuhiro Tsujikawa
cf094bd56b Fix ubsan applying zero offset to null pointer occurred in unit test 2020-06-05 23:13:08 +09:00
Asra Ali
78a56cf66f fix ubsan errors
Signed-off-by: Asra Ali <asraa@google.com>
2020-06-05 23:13:08 +09:00
Tatsuhiro Tsujikawa
ec084acdba Bump version number to 1.42.0-DEV 2020-06-02 21:21:13 +09:00
Tatsuhiro Tsujikawa
8f7b008b15 Update bash_completion 2020-06-02 21:05:34 +09:00
Tatsuhiro Tsujikawa
83086ba91a Update manual pages 2020-06-02 21:04:57 +09:00
Tatsuhiro Tsujikawa
c3b4662563 Merge pull request from GHSA-q5wr-xfw9-q7xr
Implement max settings option
2020-06-02 20:58:21 +09:00
Tatsuhiro Tsujikawa
3eecc2ca45 Bump version number to v1.41.0, LT revision to 34:0:20 2020-06-02 19:09:08 +09:00
Tatsuhiro Tsujikawa
881c060d8c Update AUTHORS 2020-06-02 19:09:08 +09:00
James M Snell
f8da73bd04 Earlier check for settings flood 2020-05-05 11:55:38 -07:00
James M Snell
336a98feb0 Implement max settings option 2020-05-05 11:55:32 -07:00
Tatsuhiro Tsujikawa
ef41583614 Revert "Add missing connection error handling"
This reverts commit b7d1610141.
2020-04-22 21:26:23 +09:00
Tatsuhiro Tsujikawa
979e6c5325 Merge pull request #1459 from nghttp2/proxyprotov2
nghttpx: Add PROXY protocol version 2
2020-04-21 22:30:31 +09:00
Tatsuhiro Tsujikawa
b7d1610141 Add missing connection error handling 2020-04-21 22:11:19 +09:00
Tatsuhiro Tsujikawa
cd53bd81bf Merge pull request #1460 from gportay/patch-1
Fix doc
2020-04-18 19:24:50 +09:00
Gaël PORTAY
e5625b8cf0 Fix doc 2020-04-18 05:50:51 -04:00
Tatsuhiro Tsujikawa
c663349f24 integration: Add PROXY protocol v2 tests 2020-04-18 17:23:49 +09:00
Tatsuhiro Tsujikawa
854e9fe395 nghttpx: Always call init_forwarded_for
Always call init_forwarded_for to get the default when source address
in PROXY protocol is ignored.  This ensures that forwarded header
field has the same value as x-forwarded-for.
2020-04-18 17:16:45 +09:00
Tatsuhiro Tsujikawa
c60ea227cc Update doc 2020-04-18 17:16:30 +09:00
Tatsuhiro Tsujikawa
49cd8e6e73 nghttpx: Add PROXY-protocol v2 support 2020-04-18 17:16:30 +09:00
Tatsuhiro Tsujikawa
3b17a659f6 Merge pull request #1453 from Leo-Neat/master
Add CIFuzz
2020-03-31 18:48:52 +09:00
Tatsuhiro Tsujikawa
600fcdf52d Merge pull request #1455 from xjtian/long_serials
Fix get_x509_serial for long serial numbers
2020-03-31 18:47:53 +09:00
Jacky Tian
4922bb41d6 static_cast size parameter in StringRef constructor to size_t 2020-03-31 00:54:08 -07:00
Jacky Tian
aad8697575 Fix get_x509_serial for long serial numbers 2020-03-31 00:19:06 -07:00
Leo Neat
dc7a7df61c Adding CIFuzz 2020-03-18 10:12:29 -07:00
Tatsuhiro Tsujikawa
b3f85e2daa Merge pull request #1444 from nghttp2/fix-recv-window-flow-control-issue
Fix receiving stream data stall
2020-02-20 11:22:18 +09:00
Tatsuhiro Tsujikawa
ffb49c6c58 Merge pull request #1435 from geoffhill/master
Enable session_create_idle_stream test, fix errors
2020-02-20 10:53:12 +09:00
Tatsuhiro Tsujikawa
2ec585518e Fix receiving stream data stall
Previously, if automatic window update is enabled (which is default),
after window size is set to 0 by
nghttp2_session_set_local_window_size, once the receiving window is
exhausted, even after window size is increased by
nghttp2_session_set_local_window_size, no more data cannot be
received.  This is because nghttp2_session_set_local_window_size does
not submit WINDOW_UPDATE.  It is only triggered when new data arrives
but since window is filled up, no more data cannot be received, thus
dead lock happens.

This commit fixes this issue.  nghttp2_session_set_local_window_size
submits WINDOW_UPDATE if necessary.

https://github.com/curl/curl/issues/4939
2020-02-20 10:40:38 +09:00
Tatsuhiro Tsujikawa
459df42b8b Merge pull request #1442 from nghttp2/upgrade-llhttp
Bump llhttp to 2.0.4
2020-02-11 23:26:41 +09:00
Tatsuhiro Tsujikawa
a4c1fed513 Bump llhttp to 2.0.4 2020-02-11 23:05:53 +09:00
Geoff Hill
866eadb5de Enable session_create_idle_stream test, fix errors
Add the currently-unused `test_nghttp2_session_create_idle_stream()`
function to the test suite definition.

Modify the test in two places to make it pass:

  * Use stream ID=10 as the priority stream ID to test automatic creation
    of streams for priority specs. The code below checks against stream
    ID=10 so I assume this was a typo in the test.

  * Set the `last_sent_stream_id` instead of the `next_stream_id` to test
    that idle streams cannot be created with smaller numbers than the
    most-recently-seen stream ID. Looking at the validation path in
    `session_detect_idle_stream()`, I think this was another test typo.
2020-01-23 17:29:19 -08:00
Tatsuhiro Tsujikawa
5e13274b7c Fix typo 2019-12-21 11:39:05 +09:00
Tatsuhiro Tsujikawa
e0d7f7de5e h2load: Allow port in --connect-to 2019-12-21 11:39:05 +09:00
lucas
df575f968f h2load: add --connect-to option 2019-12-21 11:39:05 +09:00
Tatsuhiro Tsujikawa
1fff737955 clang-format-9 2019-12-18 14:25:32 +09:00
Tatsuhiro Tsujikawa
b40c6c862f Merge pull request #1418 from vszakats/patch-1
lib/CMakeLists.txt: Make hard-coded static lib suffix optional
2019-12-08 11:09:59 +09:00
Viktor Szakats
9bc2c75e38 lib/CMakeLists.txt: Make hard-coded static lib suffix optional
It can be set via the `STATIC_LIB_SUFFIX` variable.

This fixes every existing dependent project that relied on the name
having no suffix and thus capable of using either a static or shared
flavour depending on which one is present on this or how the linker
is configured.

Ref: https://github.com/nghttp2/nghttp2/pull/1394
2019-11-15 20:53:50 +00:00
Tatsuhiro Tsujikawa
2d5f76594a Bump up version number to 1.41.0-DEV 2019-11-15 23:34:33 +09:00
Tatsuhiro Tsujikawa
cc05c5fe8c Update manual pages 2019-11-15 23:03:14 +09:00
Tatsuhiro Tsujikawa
66d7b194d4 Update AUTHORS 2019-11-15 22:54:56 +09:00
Tatsuhiro Tsujikawa
41060943bd Bump up version number to 1.40.0, LT revision to 33:0:19 2019-11-15 22:53:05 +09:00
Tatsuhiro Tsujikawa
5ae9bb8925 Fail fast if huffman decoding context is in failure state 2019-11-09 17:18:11 +09:00
Tatsuhiro Tsujikawa
bb519154fe Merge pull request #1413 from nghttp2/check-authority
Add nghttp2_check_authority as public API
2019-11-02 10:53:33 +09:00
Tatsuhiro Tsujikawa
77f5487a58 Add nghttp2_check_authority as public API 2019-11-02 00:33:59 +09:00
Tatsuhiro Tsujikawa
db9a8f6efe Merge pull request #1409 from nghttp2/fix-wrong-stream-close-error-code
Fix the bug that stream is closed with wrong error code
2019-10-29 21:24:57 +09:00
Tatsuhiro Tsujikawa
6f28a69b7d Merge pull request #1411 from richard78917/fix_warning
priority_spec::valid(): remove const qualifier from return value
2019-10-29 21:24:34 +09:00
Tatsuhiro Tsujikawa
6ce4835eea Fix the bug that stream is closed with wrong error code
This commit fixes the bug that stream is closed with wrong error code
(0).  This happens when STREAM or DATA frame with END_STREAM flag set
is received and it violates HTTP messaging rule (i.e., content-length
does not match) and the other side of stream has been closed.  In this
case, nghttp2_on_stream_close_callback should be called with nonzero
error code, but previously it is called with 0 (NO_ERROR).
2019-10-29 21:04:52 +09:00
Richard Wolfert
29042f1c95 priority_spec::valid(): remove const qualifier from return value
gcc generates warning:
* type qualifiers ignored on function return type [-Wignored-qualifiers]
2019-10-29 11:28:26 +01:00
Tatsuhiro Tsujikawa
d08c43951f Merge pull request #1405 from nghttp2/huffman
Faster Huffman encoding/decoding
2019-10-12 18:48:21 +09:00
Tatsuhiro Tsujikawa
5d6964cf81 Faster huffman decoding 2019-10-12 14:30:31 +09:00
Tatsuhiro Tsujikawa
0d855bfc1b Faster huffman encoding 2019-10-12 14:30:31 +09:00
Tatsuhiro Tsujikawa
6f967c6ef3 Fix errors reported by coverity scan 2019-09-21 13:45:20 +09:00
Tatsuhiro Tsujikawa
b8a43db84c Merge pull request #1394 from wrowe/fix-static-libname
Avoid filename collision of static and dynamic lib
2019-09-21 10:45:45 +09:00
Tatsuhiro Tsujikawa
70b62c1a32 Merge pull request #1393 from wrowe/fix-static-msvcrt
Add new flag ENABLE_STATIC_CRT for Windows
2019-09-21 10:45:11 +09:00
William A Rowe Jr
28b1f0b90f Avoid filename collision of static and dynamic lib
Renames the output of the ENABLE_STATIC_LIB library/archive output
to nghttp2_static.lib/.a to avoid filenames colliding with the output
name for ENABLE_SHARED_LIB library/archive, when both are enabled.

Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>
2019-09-16 08:48:35 -07:00
Tatsuhiro Tsujikawa
1dd966f189 Merge branch 'fix-nghttpx-mruby' 2019-09-17 00:42:04 +09:00
Tatsuhiro Tsujikawa
fe8946ddc7 nghttpx: Fix bug that mruby is incorrectly shared between backends
Previously, mruby context is wrongly shared by multiple patterns if
the underlying SharedDownstreamAddr is shared by multiple
DownstreamAddrGroups.  This commit fixes it.
2019-09-16 22:25:06 +09:00
William A Rowe Jr
72b71a6ba3 Add new flag ENABLE_STATIC_CRT for Windows
This change adds the CMake option;

  ENABLE_STATIC_CRT  Build libnghttp2 against the MS LIBCMT[d]

This avoids linking to msvcrt.lib for binaries to compile (/MT[d])
and link against the static C Runtime libcrt.lib, and
avoiding the msvcrt[d].dll dependency.

Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>
2019-09-14 16:23:16 -07:00
Tatsuhiro Tsujikawa
f8933fe504 nghttpx: Reconnect h1 backend if it lost connection before sending headers
This is the second attempt.  The first attempt was
8a59ce6d37 and it failed.
2019-09-07 18:20:24 +09:00
Tatsuhiro Tsujikawa
89c33d690f Update neverbleed 2019-09-07 00:19:59 +09:00
Tatsuhiro Tsujikawa
7079dc5e75 Update neverbleed to fix memory leak 2019-09-06 23:58:22 +09:00
Tatsuhiro Tsujikawa
5080db84e2 Revert "nghttpx: Reconnect h1 backend if it lost connection before sending headers"
This reverts commit 8a59ce6d37.
2019-09-06 22:01:03 +09:00
Tatsuhiro Tsujikawa
053c7ac588 nghttpx: Returns 408 if backend timed out before sending headers 2019-09-03 00:29:01 +09:00
Tatsuhiro Tsujikawa
8a59ce6d37 nghttpx: Reconnect h1 backend if it lost connection before sending headers 2019-09-03 00:28:21 +09:00
Tatsuhiro Tsujikawa
f2fde180cd Remove redundant null check before delete
Reported in https://github.com/nghttp2/nghttp2/issues/1384
2019-08-19 22:27:32 +09:00
Tatsuhiro Tsujikawa
95efb3e19d Don't read too greedily 2019-08-14 11:44:28 +09:00
Tatsuhiro Tsujikawa
0a6ce87c22 Add nghttp2_option_set_max_outbound_ack 2019-08-14 11:43:55 +09:00
Tatsuhiro Tsujikawa
2aa79fa91d Bump up LT revision to 32:0:18 2019-08-14 08:46:43 +09:00
Tatsuhiro Tsujikawa
3980678d24 Merge branch 'nghttpx-fix-request-stall' 2019-08-06 21:28:45 +09:00
Tatsuhiro Tsujikawa
319d5ab1c6 nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full.
2019-08-06 20:50:29 +09:00
Tatsuhiro Tsujikawa
448bbbc38c integration-tests: gofmt 2019-08-06 20:44:15 +09:00
Tatsuhiro Tsujikawa
e575a2aad9 Merge pull request #1377 from Aldrog/cmake_systemd
Support building nghttpx with systemd using cmake
2019-08-01 09:27:54 +09:00
Andrew Penkrat
4f7aedc9d2 cmake: Support building nghttpx with systemd 2019-07-29 13:55:05 +03:00
Tatsuhiro Tsujikawa
7a5908933e Fix clang-8 warning 2019-06-22 17:44:16 +09:00
Tatsuhiro Tsujikawa
ee44313445 Fix FPE with default backend 2019-06-11 23:15:01 +09:00
Tatsuhiro Tsujikawa
abef9b90ef Fix log-level is not set with cmd-line or configuration file 2019-06-11 23:13:43 +09:00
Tatsuhiro Tsujikawa
12a999f0b8 Bump up version number to 1.40.0-DEV 2019-06-11 22:10:05 +09:00
Tatsuhiro Tsujikawa
acfb360770 Update manual pages 2019-06-11 21:22:20 +09:00
Tatsuhiro Tsujikawa
bdfd14c2b7 Bump up version number to 1.39.0, LT revision to 31:4:17 2019-06-11 21:19:05 +09:00
Tatsuhiro Tsujikawa
cddc09feaa Update AUTHORS 2019-06-11 21:16:17 +09:00
Tatsuhiro Tsujikawa
3c3b6ae8ca Add missing colon 2019-06-10 19:18:10 +09:00
Tatsuhiro Tsujikawa
2f83aa9e1b Fix multi-line text travis issue 2019-06-10 18:58:47 +09:00
Tatsuhiro Tsujikawa
fc591d0cd6 Run nghttpx integration test with cmake build
Run nghttpx integration test with cmake build.  Autotools build erases
artifacts for packaging tests, so we cannot run nghttpx integration
test with autotools build at the moment.

Relay on go modules to download dependencies.
2019-06-08 00:34:27 +09:00
Tatsuhiro Tsujikawa
9a17c3efc6 travis: use multi-line text 2019-06-08 00:23:17 +09:00
Tatsuhiro Tsujikawa
b7220f075c cmake: Remove SPDY related files 2019-06-08 00:23:17 +09:00
Tatsuhiro Tsujikawa
a1556fd11f Merge pull request #1356 from nghttp2/fix-log-level-on-reload
nghttpx: Fix unchanged log level on configuration reload
2019-06-07 23:36:49 +09:00
Tatsuhiro Tsujikawa
77f1c872b1 nghttpx: Fix unchanged log level on configuration reload
Previously, if log-level is not mentioned in configuration file and
reload happens, the log level was not set to the default value NOTICE.
Instead, the log level stayed the same.  This commit fixes this bug.
2019-06-05 21:17:23 +09:00
Tatsuhiro Tsujikawa
49ce44e1f5 Merge pull request #1352 from nghttp2/travis-osx
Travis osx
2019-05-30 23:58:35 +09:00
Tatsuhiro Tsujikawa
f54b3ffc0e Fix libxml2 CFLAGS output 2019-05-30 23:22:44 +09:00
Tatsuhiro Tsujikawa
b0f5e5cc79 Implement daemon() using fork() for OSX 2019-05-30 23:22:44 +09:00
Tatsuhiro Tsujikawa
8d6ecd66cc Enable osx build on travis 2019-05-29 00:28:39 +09:00
Tatsuhiro Tsujikawa
f82fb52187 Update doc 2019-05-18 10:31:47 +09:00
Tatsuhiro Tsujikawa
2e1975ddf6 clang-format-8 2019-05-18 10:28:35 +09:00
Tatsuhiro Tsujikawa
97ce392bcc Merge pull request #1347 from nghttp2/nghttpx-ignore-cl-te-on-upgrade
Ignore Content-Length and Transfer-Encoding in 200 response to CONNECT request
2019-05-17 23:34:34 +09:00
Tatsuhiro Tsujikawa
afefbda518 Ignore content-length in 200 response to CONNECT request 2019-05-17 23:00:32 +09:00
Tatsuhiro Tsujikawa
4fca2502d8 nghttpx: Ignore Content-Length and Transfer-Encoding in 1xx or 200 to CONNECT
A well known server sends content-length: 0 in 101 response.  RFC 7230
says Content-Length or Transfer-Encoding in 200 response to CONNECT
request: https://tools.ietf.org/html/rfc7230#section-3.3.3
2019-05-17 22:58:26 +09:00
Tatsuhiro Tsujikawa
6975c336fc Update llhttp to 1.1.3 2019-05-07 22:40:06 +09:00
Tatsuhiro Tsujikawa
0288093caf Fix llhttp_get_error_pos usage
It returns NULL if return value is HPE_OK.
2019-04-21 00:07:11 +09:00
Tatsuhiro Tsujikawa
a3a034813b Merge pull request #1340 from nghttp2/nghttpx-llhttp
Replace http-parser with llhttp
2019-04-20 22:07:14 +09:00
Tatsuhiro Tsujikawa
c64d2573dc Replace http-parser with llhttp
llhttp does not include URL parser.  We extracted URL parser code from
http-parser and put it under third-party/url-parser.

llhttp bd3d224eb8cdc92c6fc8f508d7bbe0ba266e8e92
2019-04-20 18:42:30 +09:00
Tatsuhiro Tsujikawa
f028cc4392 clang-format 2019-04-18 23:37:48 +09:00
Tatsuhiro Tsujikawa
302e37460f Merge pull request #1337 from nghttp2/upgrade-mruby
Upgrade mruby
2019-04-18 23:37:18 +09:00
Tatsuhiro Tsujikawa
3cdbc5f525 Merge pull request #1335 from adamgolebiowski/boost-1.70
asio: support boost-1.70
2019-04-18 23:32:19 +09:00
Tatsuhiro Tsujikawa
a69251864b Fix mruby build error
mruby minirake does not like CXX="clang++-7 -std=c++14" because it
expects CXX to be an executable.  To workaround this, split CXX so
that CXX becomes a single word and move the rest of words to CXXFLAGS.
2019-04-18 23:04:33 +09:00
Tatsuhiro Tsujikawa
45d63d2006 Upgrade mruby to 2.0.1 2019-04-18 22:45:02 +09:00
Adam Gołębiowski
cbba1ebf8f asio: support boost-1.70
In boost 1.70, deprecated get_io_context() has finally been removed.
Introduce GET_IO_SERVICE macro that based on boost version uses
old get_io_service() interface (boost < 1.70), or get_executor().context()
for boost 1.70+.

Commit based idea seen in monero-project/monero@17769db946
2019-04-18 12:35:54 +02:00
Tatsuhiro Tsujikawa
e86d1378da Bump up version number to 1.39.0-DEV 2019-04-18 15:12:39 +09:00
Tatsuhiro Tsujikawa
4a9d200554 Update manual pages 2019-04-18 15:08:36 +09:00
Tatsuhiro Tsujikawa
acf6a9229d Bump up version number to 1.38.0, LT revision to 31:3:17 2019-04-18 14:57:20 +09:00
Tatsuhiro Tsujikawa
4ff4582132 Update AUTHORS 2019-04-18 14:55:09 +09:00
Tatsuhiro Tsujikawa
42dce01ec1 Merge branch 'nghttpx-fix-backend-selection-on-retry' 2019-04-16 22:38:55 +09:00
Tatsuhiro Tsujikawa
a35059e3f1 nghttpx: Fix bug that altered authority and path affect backend selection
Fix bug that altered authority and path by per-pattern mruby script
affect backend selection on retry.
2019-04-16 22:18:30 +09:00
Tatsuhiro Tsujikawa
5a30fafdda Merge branch 'nghttpx-fix-chunked-request-stall' 2019-04-16 00:26:18 +09:00
Tatsuhiro Tsujikawa
dce91ad37c Merge branch 'nghttpx-dont-log-authorization' 2019-04-16 00:26:12 +09:00
Tatsuhiro Tsujikawa
2cff8b43cf nghttpx: Fix bug that chunked request stalls 2019-04-15 23:58:30 +09:00
Tatsuhiro Tsujikawa
be96654d56 nghttpx: Don't log authorization request header field value with -LINFO 2019-04-15 22:59:26 +09:00
Tatsuhiro Tsujikawa
ce962c3fdf Merge branch 'update-http-parser' 2019-04-15 22:33:14 +09:00
Tatsuhiro Tsujikawa
f931504e1c Update http-parser to v2.9.1
http-parser c5c45636b85e7598223adede6ba2d8cb8fe03ebe
2019-04-15 22:23:03 +09:00
Tatsuhiro Tsujikawa
d978f351da Fix bug that on_header callback is still called after stream is closed 2019-04-11 10:17:01 +09:00
Tatsuhiro Tsujikawa
ec519f22dc Merge pull request #1270 from baitisj/master
Fix for compilation against modern LibreSSL
2019-03-13 20:52:50 +09:00
Tatsuhiro Tsujikawa
e8b213e367 Bump up version number to 1.38.0-DEV 2019-03-08 21:26:37 +09:00
Tatsuhiro Tsujikawa
cfb47d30a5 Take into account larger frame size for prioritization
Larger frame size just destroys multiplexing and prioritization does
not work.
2019-03-08 00:23:02 +09:00
Tatsuhiro Tsujikawa
dbbe4e017a Remove unused field 2019-03-08 00:22:45 +09:00
Tatsuhiro Tsujikawa
371bc3a8f7 clang-format 2019-03-08 00:19:34 +09:00
Tatsuhiro Tsujikawa
5e7889c5ef Update manual pages 2019-03-07 23:22:06 +09:00
Tatsuhiro Tsujikawa
b1b2ad5017 Bump up version number to 1.37.0, LT revision to 31:2:17 2019-03-07 23:18:49 +09:00
Tatsuhiro Tsujikawa
e043ca83c5 Update AUTHORS 2019-03-07 23:16:58 +09:00
Tatsuhiro Tsujikawa
c2434dfbbc Simplify stream_less 2019-03-04 23:30:03 +09:00
Tatsuhiro Tsujikawa
816ad2102f Reuse name when indexing header by referencing dynamic table 2019-03-04 23:30:03 +09:00
Tatsuhiro Tsujikawa
f5feb16ef4 Merge pull request #1295 from bratkartoffel/fix-compile-boringssl
Fix compilation with boringssl
2019-02-20 00:13:00 +09:00
Tatsuhiro Tsujikawa
adf09f2124 Merge pull request #1303 from donny-dont/fix-shared-install
Explicitly set install location when building shared libs
2019-02-20 00:10:50 +09:00
Don
2591960e2f Explicitly set install location when building shared libs 2019-02-06 10:26:30 -08:00
Tatsuhiro Tsujikawa
d93842db3e nghttpx: Fix backend stall if header and request body are sent in 2 packets 2019-01-23 17:57:12 +09:00
Tatsuhiro Tsujikawa
8dc2b263ba nghttpx: Use std::priority_queue 2019-01-22 00:01:17 +09:00
Tatsuhiro Tsujikawa
8d842701b5 Update manual pages 2019-01-21 23:05:09 +09:00
Tatsuhiro Tsujikawa
de85b0fda5 Update README 2019-01-21 23:03:10 +09:00
Tatsuhiro Tsujikawa
5d6beed590 Merge branch 'nghttpx-backend-weight' 2019-01-21 22:59:39 +09:00
Tatsuhiro Tsujikawa
1ff9de4c87 nghttpx: Backend address selection with weight 2019-01-21 22:23:19 +09:00
Simon Frankenberger
34482ed4df Fix compilation with boringssl 2019-01-18 20:12:57 +01:00
Tatsuhiro Tsujikawa
9b6ced66f3 Bump up version number to 1.37.0-DEV 2019-01-18 23:22:47 +09:00
Tatsuhiro Tsujikawa
e7e8ee5fe6 Update bash_completion 2019-01-18 21:21:12 +09:00
Tatsuhiro Tsujikawa
b3b4e33535 Update manual pages 2019-01-18 21:20:47 +09:00
Tatsuhiro Tsujikawa
bd93d90a89 Don't treat text as option if it matches -[0-9]
-[0-9] is valid option, but we don't use them so far and don't want to
 mark integer -1 as option.
2019-01-18 21:18:18 +09:00
Tatsuhiro Tsujikawa
ea69c84b33 Bump up version number to 1.36.0 2019-01-18 21:12:46 +09:00
Tatsuhiro Tsujikawa
783b649bb1 Update AUTHORS 2019-01-18 21:10:49 +09:00
Tatsuhiro Tsujikawa
eb21e6f8f7 Merge branch 'update-http-parser' 2019-01-17 23:35:50 +09:00
Tatsuhiro Tsujikawa
ab2aa5672b Fix test failure
Now http_parser_parse_url returns nonzero if empty URI is given.
2019-01-17 23:16:49 +09:00
Tatsuhiro Tsujikawa
ff87a54202 Use http-parser 0d0a24e19eb5ba232d2ea8859aba2a7cc6c42bc4 2019-01-17 23:08:27 +09:00
Tatsuhiro Tsujikawa
439dbce679 Merge branch 'nghttpx-h1-connection-pool-per-addr' 2019-01-14 22:29:20 +09:00
Tatsuhiro Tsujikawa
e9c9838cdc nghttpx: Pool h1 backend connection per address
Pool HTTP/1.1 backend connection per address and reuse it only when
the next round robin index refers to this address.  Previously if
there is a pooled connection, there is no round robin selection.
2019-01-14 22:20:58 +09:00
Tatsuhiro Tsujikawa
803d4ba948 Merge branch 'nghttpx-randomize-roundrobin-order' 2019-01-14 22:17:12 +09:00
Tatsuhiro Tsujikawa
732245e562 make clang-format 2019-01-12 00:11:31 +09:00
Tatsuhiro Tsujikawa
9e8d5433e7 Use clang-format-7 2019-01-12 00:11:19 +09:00
Tatsuhiro Tsujikawa
fdcdb21c38 nghttpx: Randomize backend address round robin order per thread 2019-01-11 22:36:45 +09:00
Tatsuhiro Tsujikawa
11d0533cfc nghttpx: Ensure that cert serial does not exceed 20 bytes 2019-01-05 10:03:44 +09:00
Tatsuhiro Tsujikawa
dbb5f00d68 Merge pull request #1287 from rckclmbr/fix_serial_size
Fix getting long serial numbers for openssl < 1.1
2019-01-05 09:48:36 +09:00
Tatsuhiro Tsujikawa
9cc412e2fd Merge pull request #1285 from staticinvocation/master
Add a CMake option to disable shared library
2019-01-05 09:40:54 +09:00
Josh Braegger
5b2efc0a12 Fix getting long serial numbers for openssl < 1.1
From https://www.ietf.org/rfc/rfc5280.txt

> As noted in Section 4.1.2.2, serial numbers can be expected to
> contain long integers.  Certificate users MUST be able to handle
> serialNumber values up to 20 octets in length.  Conforming CAs MUST
> NOT use serialNumber values longer than 20 octets.

Without this, nghttpx will fatal.

    jbraeg$ openssl x509 -in ~/test_certs/client.crt -serial -noout
    serial=E0CFDFC7CEA10DF8AAF715C37FAEB410

    jbraeg$ curl -k --key ~/test_certs/client.key --cert ~/test_certs/client.crt https://192.168.98.100:3000/; echo
    curl: (56) Unexpected EOF

    ...
    Assertion failed: n == b.size() (shrpx_tls.cc: get_x509_serial: 2051)
    2019-01-03T20:25:21.289Z 1 1 f84316ae NOTICE (shrpx_log.cc:895) Worker process: [9] exited abnormally with status 0x06; exit status 0; signal Aborted(6)
    2019-01-03T20:25:21.290Z 1 1 f84316ae NOTICE (shrpx.cc:4311) Shutdown momentarily
2019-01-03 13:20:29 -08:00
Brendan Heinonen
7e4c48a461 Disable shared library if ENABLE_SHARED_LIB is OFF
Signed-off-by: Brendan Heinonen <brendan@heinonen.co>
2018-12-27 13:06:02 -05:00
Tatsuhiro Tsujikawa
082e162f3c Merge pull request #1282 from alagoutte/travis
Travis: Update to Xenial
2018-12-26 20:44:39 +09:00
Alexis La Goutte
7cc7c06c7b .travis(.yml): no longer need llvm-toolchain-trusty-7
clang-7 is enable by default
2018-12-26 10:18:54 +00:00
Alexis La Goutte
12ebeb30d0 .travis(.yml): Update to Xenial
Xenial is now available with Travis CI
https://blog.travis-ci.com/2018-11-08-xenial-release
2018-12-25 18:35:54 +00:00
Tatsuhiro Tsujikawa
c78abbe1d2 Update mruby to 2.0.0 2018-12-26 00:03:40 +09:00
Tatsuhiro Tsujikawa
124c7848c0 nghttpx: Add missing return 2018-12-11 22:52:34 +09:00
Tatsuhiro Tsujikawa
ce9667c4f5 Merge branch 'nghttpx-fix-trailing-slash-handling' 2018-12-09 17:47:28 +09:00
Tatsuhiro Tsujikawa
f3f40840b3 nghttpx: Fix broken trailing slash handling
nghttpx allows a pattern with trailing slash to match a request path
without it.  Previously, under certain pattern registration, this does
not work.
2018-12-09 17:07:28 +09:00
Jeff 'Raid' Baitis
2c1570595e Fix for compilation against modern LibreSSL 2018-12-02 13:30:42 -08:00
Tatsuhiro Tsujikawa
302abf1b46 h2load: Fix compile error with gcc 2018-11-23 14:39:51 +09:00
Tatsuhiro Tsujikawa
089a03be42 h2load: Write log file with write(2) 2018-11-23 13:08:38 +09:00
Tatsuhiro Tsujikawa
de4fe72861 Merge branch 'pyos-master' 2018-11-23 12:11:21 +09:00
dawg
d1b3a83f59 h2load: add an option to write per-request logs 2018-11-23 12:11:00 +09:00
Tatsuhiro Tsujikawa
eb6792533d Merge branch 'puscas-port_in_use' 2018-11-23 11:00:39 +09:00
Pedro Santos
6800d317e7 added access to the number of the current server port 2018-11-23 10:56:21 +09:00
Tatsuhiro Tsujikawa
c98362eab1 Bump up version number to 1.36.0-DEV 2018-11-23 10:33:29 +09:00
Tatsuhiro Tsujikawa
e520469b3e Update manual pages 2018-11-23 10:07:33 +09:00
Tatsuhiro Tsujikawa
54067256eb Bump up version number to 1.35.0 2018-11-23 10:04:04 +09:00
Tatsuhiro Tsujikawa
c4d2eeeec7 Update AUTHORS 2018-11-23 10:01:20 +09:00
Tatsuhiro Tsujikawa
f51e696e4a asio: Add stop() to listen_and_serve doc 2018-11-18 17:30:35 +09:00
Tatsuhiro Tsujikawa
a433b132fc Merge pull request #1260 from nghttp2/h2load-non-final-response
h2load: Handle HTTP/1 non-final response
2018-11-15 17:32:15 +09:00
Tatsuhiro Tsujikawa
cf48a56d2e Merge pull request #1238 from jktjkt/cmake-fix-libevent-detection
cmake: Fix libevent version detection
2018-11-15 17:11:02 +09:00
Tatsuhiro Tsujikawa
6cad1b243b nghttpx: Write mruby send_info early 2018-11-15 10:17:47 +09:00
Tatsuhiro Tsujikawa
3c393dca58 nghttpx: Fix assertion failure on mruby send_info with HTTP/1 frontend 2018-11-15 10:17:41 +09:00
Tatsuhiro Tsujikawa
172924457f h2load: Handle HTTP/1 non-final response 2018-11-15 10:13:19 +09:00
Tatsuhiro Tsujikawa
f6644a92af make clang-format 2018-11-09 22:29:18 +09:00
Tatsuhiro Tsujikawa
48998f7239 Merge pull request #1222 from donny-dont/fix/declspec
Use __has_declspec_attribute for shared builds
2018-11-09 22:18:06 +09:00
Tatsuhiro Tsujikawa
15ff52f9fb Update README 2018-11-02 18:28:00 +09:00
Tatsuhiro Tsujikawa
6c03bb142b Upgrade travis toolchain 2018-11-02 17:57:16 +09:00
Tatsuhiro Tsujikawa
524b439221 Fix travis build failure 2018-11-02 17:56:53 +09:00
Tatsuhiro Tsujikawa
859bf2bc41 Update manual pages 2018-11-02 15:44:57 +09:00
Tatsuhiro Tsujikawa
b5619fb156 h2load: Clarify that time for connect includes TLS handshake 2018-11-02 15:43:35 +09:00
Tatsuhiro Tsujikawa
dcbe0c690f nghttpx: Simplify move ctor and operator 2018-11-02 15:40:53 +09:00
Tatsuhiro Tsujikawa
2996c28456 nghttpx: Cleanup 2018-11-02 15:16:36 +09:00
Tatsuhiro Tsujikawa
42e8ceb656 nghttpx: Convert API status code to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
1daf9ce8b7 nghttpx: Convert WorkerEventType to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
d68edf56c0 nghttpx: Convert MemcachedStatusCode to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
0c4e9fef29 nghttpx: Convert memcached op to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
571404c6e8 nghttpx: Convert MemcachedParseState to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
4d562b773b nghttpx: Convert LogFragmentType to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
e62258713e nghttpx: Convert connection check status to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
4bd075defd nghttpx: Convert Http2Session state to enum class 2018-11-02 14:14:48 +09:00
Tatsuhiro Tsujikawa
b46a324943 nghttpx: Convert FreelistZone to enum class 2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
4bd44b9cdf nghttpx: Convert dispatch state to enum class 2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
1b42110d4f nghttpx: Make Downstream state enum class 2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
0735ec55f3 nghttpx: Convert shrpx_connect_proto to enum class 2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
00554779e1 nghttpx: Convert DNSResolverStatus to enum class 2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
0963f38935 nghttpx: Convert SerialEventType to enum class 2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
1abfa3ca5f nghttpx: Make TLS handshake state enum class 2018-10-17 08:52:27 +09:00
Tatsuhiro Tsujikawa
f2159bc2c1 nghttpx: Convert UpstreamAltMode to enum class 2018-10-17 08:38:55 +09:00
Tatsuhiro Tsujikawa
b0eb68ee9e nghttpx: Convert shrpx_forwarded_node_type to enum class 2018-10-16 23:10:17 +09:00
Tatsuhiro Tsujikawa
e7b7b037f6 nghttpx: Convert shrpx_cookie_secure to enum class 2018-10-16 23:06:59 +09:00
Tatsuhiro Tsujikawa
5e4f434fd8 nghttpx: Convert shrpx_session_affinity to enum class 2018-10-16 23:03:17 +09:00
Tatsuhiro Tsujikawa
20ea964f2f nghttpx: Convert shrpx_proto to enum class 2018-10-16 22:59:34 +09:00
Tatsuhiro Tsujikawa
d105619bc3 src: Remove extra braces if possible 2018-10-15 23:46:33 +09:00
Tatsuhiro Tsujikawa
ec5729b1fa Use std::make_unique 2018-10-15 23:02:44 +09:00
Tatsuhiro Tsujikawa
6c9196953e Use C++14 2018-10-15 22:35:05 +09:00
Tatsuhiro Tsujikawa
46576178a3 Don't send Transfer-Encoding to pre-HTTP/1.1 clients 2018-10-14 22:57:54 +09:00
Tatsuhiro Tsujikawa
5e925f873e Update doc 2018-10-14 22:57:11 +09:00
Tatsuhiro Tsujikawa
153531d4d0 nghttpx: Use the same type as standard stream operator<< 2018-10-07 22:19:00 +09:00
Tatsuhiro Tsujikawa
f7287df03f Bump up version number to 1.35.0-DEV 2018-10-04 12:38:10 +09:00
Tatsuhiro Tsujikawa
2b085815b7 Update manual pages 2018-10-04 12:31:06 +09:00
Tatsuhiro Tsujikawa
986fa30264 Bump up version number to 1.34.0, LT revision to 31:1:17 2018-10-04 12:30:18 +09:00
Tatsuhiro Tsujikawa
7c8cb3a0ce nghttpx: Improve CONNECT response status handling 2018-10-04 12:04:15 +09:00
Tatsuhiro Tsujikawa
334c439ce0 Fix bug that regular CONNECT does not work 2018-10-04 12:02:46 +09:00
Jan Kundrát
6c17ed7e61 cmake: Fix libevent version detection
On my x86_64 Gentoo Linux, the CMake build won't find libevent because
Gentoo wraps include files via multilib-aware wrappers. This means that
the "real" include file lives in
/usr/include/x86_64-pc-linux-gnu/event2/event-config.h , and that
there's a proxy file at /usr/include/event2/event-config.h which check
the compile target's architecture and includes the real file from a
correct directory.

In other words, nghttp2's CMake FindLibevent.cmake reads a wrong file
and ends up not detecting the libevent's version.

This patch fixes it by simply using the version reported by pkg-config
as the libevent's version if the original method fails. I will be happy
to change this patch to always check version from pkg-config if you're
OK with that.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
2018-10-03 17:38:17 +02:00
Tatsuhiro Tsujikawa
6700626c30 Rule out content-length in the successful response to CONNECT 2018-10-03 23:24:32 +09:00
Tatsuhiro Tsujikawa
15162addc4 Update manual pages 2018-10-02 01:34:32 +09:00
Tatsuhiro Tsujikawa
9327077741 Merge pull request #1235 from nghttp2/backend-conn-timeout
nghttpx: Add read/write-timeout parameters to backend option
2018-09-30 13:17:24 +09:00
Tatsuhiro Tsujikawa
aeb92bbbe2 nghttpx: Add read/write-timeout parameters to backend option 2018-09-30 12:32:43 +09:00
Tatsuhiro Tsujikawa
fc7489e044 nghttpx: Fix mruby parameter validation 2018-09-30 12:30:19 +09:00
Tatsuhiro Tsujikawa
87ac872fdc nghttpx: Update doc 2018-09-30 12:28:43 +09:00
Tatsuhiro Tsujikawa
c278adde7a nghttpx: Log error when mruby file cannot be opened 2018-09-30 12:23:01 +09:00
Tatsuhiro Tsujikawa
f94d720909 Merge pull request #1234 from nghttp2/nghttpx-rfc8441
nghttpx: Implement RFC 8441 Bootstrapping WebSocket with HTTP/2
2018-09-29 11:54:47 +09:00
Tatsuhiro Tsujikawa
9b9baa6bd9 Update doc 2018-09-29 11:46:11 +09:00
Tatsuhiro Tsujikawa
02566ee383 nghttpx: Update doc 2018-09-29 11:42:37 +09:00
Tatsuhiro Tsujikawa
3002f31b1f src: Add debug output for SETTINGS_ENABLE_CONNECT_PROTOCOL 2018-09-29 11:39:49 +09:00
Tatsuhiro Tsujikawa
d2a594a753 nghttpx: Implement RFC 8441 Bootstrapping WebSocket with HTTP/2 2018-09-29 11:35:41 +09:00
Tatsuhiro Tsujikawa
651e147711 Allow client sending :protocol optimistically 2018-09-28 00:12:02 +09:00
Tatsuhiro Tsujikawa
a42faf1cc2 nghttpx: Write TLS alert during handshake 2018-09-23 18:01:38 +09:00
Tatsuhiro Tsujikawa
4aac05e193 Merge pull request #1231 from nghttp2/ws-lib-only
Implement RFC 8441
2018-09-23 17:34:53 +09:00
Tatsuhiro Tsujikawa
b80dfaa8a0 Adjustment for RFC 8441 2018-09-23 11:22:30 +09:00
Tatsuhiro Tsujikawa
a19d8f5d31 Deal with :protocol pseudo header 2018-09-23 10:36:30 +09:00
Tatsuhiro Tsujikawa
33f6e90a56 Add NGHTTP2_TOKEN__PROTOCOL 2018-09-23 10:36:30 +09:00
Tatsuhiro Tsujikawa
ed7fabcbc2 Add SETTINGS_ENABLE_CONNECT_PROTOCOL 2018-09-23 10:36:30 +09:00
Tatsuhiro Tsujikawa
8753b6da14 Update doc 2018-09-17 16:12:15 +09:00
Tatsuhiro Tsujikawa
f2de733bdf Update neverbleed to fix OpenSSL 1.1.1 issues 2018-09-16 22:55:07 +09:00
Tatsuhiro Tsujikawa
88ff8c69a0 Update mruby 1.4.1 2018-09-16 22:54:09 +09:00
Tatsuhiro Tsujikawa
a63558a1eb nghttpx: Call OCSP_response_get1_basic only when OCSP status is successful 2018-09-16 22:19:27 +09:00
Tatsuhiro Tsujikawa
3575a1325e nghttpx: Fix crash with plain text HTTP 2018-09-15 12:16:23 +09:00
Tatsuhiro Tsujikawa
e2de2fee69 Update bash_completion 2018-09-15 11:15:22 +09:00
Tatsuhiro Tsujikawa
9f415979fb Update manual pages 2018-09-15 11:15:04 +09:00
Tatsuhiro Tsujikawa
4bfc0cd196 Merge pull request #1230 from nghttp2/nghttpx-faster-logging
nghttpx: Get rid of std::stringstream from Log
2018-09-14 23:13:03 +09:00
Tatsuhiro Tsujikawa
9c824b87fe nghttpx: Get rid of std::stringstream from Log 2018-09-14 22:58:48 +09:00
Tatsuhiro Tsujikawa
a1ea1696be Make VALID_HD_NAME_CHARS and VALID_HD_VALUE_CHARS const qualified 2018-09-13 23:50:31 +09:00
Tatsuhiro Tsujikawa
dfc0f248c6 Make static_table const qualified 2018-09-13 23:48:53 +09:00
Tatsuhiro Tsujikawa
ed7c9db2a6 nghttpx: Add mruby env.tls_handshake_finished 2018-09-09 22:59:35 +09:00
Tatsuhiro Tsujikawa
5b42815afb nghttpx: Strip incoming Early-Data header field by default 2018-09-09 22:37:22 +09:00
Tatsuhiro Tsujikawa
cfe7fa9a75 nghttpx: Add --tls13-ciphers and --tls-client-ciphers options 2018-09-09 16:35:47 +09:00
Tatsuhiro Tsujikawa
cb8a9d58fd src: Remove TLSv1.3 ciphers from DEFAULT_CIPHER_LIST
TLSv1.3 ciphers are treated differently from the ciphers for TLSv1.2
or earlier.
2018-09-09 15:53:04 +09:00
Tatsuhiro Tsujikawa
023b94480b Merge branch 'tls13-early-data' 2018-09-09 15:48:25 +09:00
Tatsuhiro Tsujikawa
9b03c64f68 nghttpx: Should postpone early data by default 2018-09-08 19:22:30 +09:00
Tatsuhiro Tsujikawa
b8eccec62d nghttpx: Disable OpenSSL anti-replay 2018-09-08 19:10:59 +09:00
Tatsuhiro Tsujikawa
9f21258720 Specify SSL_CTX_set_max_early_data and add an option to change max value 2018-09-08 17:59:28 +09:00
Tatsuhiro Tsujikawa
47f6012407 nghttpx: Add an option to postpone early data processing 2018-09-08 17:57:21 +09:00
Tatsuhiro Tsujikawa
770e44de4d Implement draft-ietf-httpbis-replay-02
nghttpx sends early-data header field when forwarding requests which
are received in TLSv1.3 early data, and the TLS handshake is still in
progress.
2018-09-08 17:54:35 +09:00
Tatsuhiro Tsujikawa
2ab319c137 Don't hide error code from openssl 2018-09-08 17:54:35 +09:00
Tatsuhiro Tsujikawa
3992302432 Remove SSL_ERROR_WANT_WRITE handling 2018-09-08 17:54:35 +09:00
Tatsuhiro Tsujikawa
b30f312a70 Honor SSL_read semantics 2018-09-08 17:54:35 +09:00
Tatsuhiro Tsujikawa
c5cdb78a95 nghttpx: Add TLSv1.3 0-RTT early data support 2018-09-08 17:54:35 +09:00
Don
d82811303b Use __has_declspec_attribute for shared builds 2018-09-05 10:01:50 -07:00
Tatsuhiro Tsujikawa
f79a58120e Bump up version number to 1.34.0 2018-09-02 15:55:08 +09:00
Tatsuhiro Tsujikawa
9d843334d6 Update bash_completion 2018-09-02 15:34:33 +09:00
Tatsuhiro Tsujikawa
23cb3f38a6 Update manual pages 2018-09-02 15:33:58 +09:00
Tatsuhiro Tsujikawa
1d682dcdae Bump up version number to 1.33.0, LT revision to 31:0:17 2018-09-02 15:24:28 +09:00
Tatsuhiro Tsujikawa
601fbbb4ae Update doc 2018-09-02 15:24:12 +09:00
Tatsuhiro Tsujikawa
f44aa2466f Update AUTHORS 2018-09-02 15:15:52 +09:00
Tatsuhiro Tsujikawa
dd74a6dd34 Update manual pages 2018-09-02 14:59:38 +09:00
Tatsuhiro Tsujikawa
e959e7338e src: Refactor utos 2018-09-01 22:29:11 +09:00
Tatsuhiro Tsujikawa
fb9a204de2 nghttpx: Fix compile error without mruby 2018-08-31 21:58:35 +09:00
Tatsuhiro Tsujikawa
cd096802bd Update doc 2018-08-28 17:58:18 +09:00
Tatsuhiro Tsujikawa
7417fd71a4 nghttpx: Per-pattern not per-backend 2018-08-28 17:50:01 +09:00
Tatsuhiro Tsujikawa
2d1a981c81 Merge branch 'akonskarm-master' 2018-08-27 21:34:41 +09:00
Tatsuhiro Tsujikawa
45acc922eb clang-format 2018-08-27 21:34:18 +09:00
Tatsuhiro Tsujikawa
214d089910 Merge branch 'master' of https://github.com/akonskarm/nghttp2 into akonskarm-master 2018-08-27 21:30:36 +09:00
Tatsuhiro Tsujikawa
31fd707d0c nghttpx: Fix broken healthmon frontend 2018-08-27 21:21:55 +09:00
Alexandros Konstantinakis-Karmis
9a2e38e058 fix code for reuse addr on asio client 2018-08-27 10:53:14 +03:00
Tatsuhiro Tsujikawa
d24527e7e6 Bump up LT revision due to v1.32.1 release 2018-08-25 17:01:22 +09:00
Tatsuhiro Tsujikawa
6195d747ce nghttpx: Share mruby context if it is compiled from same file 2018-08-24 23:11:21 +09:00
Tatsuhiro Tsujikawa
fb97f596e1 nghttpx: Allocate mruby file because fopen requires NULL terminated string 2018-08-24 23:08:15 +09:00
Tatsuhiro Tsujikawa
0ccc7a770d nghttpx: Move blocked request data to request buffer for API request 2018-08-24 23:07:43 +09:00
Tatsuhiro Tsujikawa
32826466f5 nghttpx: Fix crash with API request 2018-08-24 23:07:16 +09:00
Tatsuhiro Tsujikawa
0422f8a844 nghttpx: Fix worker process crash with neverbleed write error 2018-08-24 22:22:53 +09:00
Tatsuhiro Tsujikawa
e329479a99 Merge pull request #1215 from nghttp2/mruby-per-backend
nghttpx: Support per-backend mruby script
2018-08-23 18:41:40 +09:00
Tatsuhiro Tsujikawa
f80a7873ba Merge branch 'akonskarm-reuse_addr' 2018-08-23 18:19:46 +09:00
Alexandros Konstantinakis-Karmis
866ac6ab27 add option reuse addr in local endpoint configuration of asio client 2018-08-23 18:19:10 +09:00
Tatsuhiro Tsujikawa
b574ae6aa2 nghttpx: Support per-backend mruby script 2018-08-23 18:13:29 +09:00
Tatsuhiro Tsujikawa
de4fd7cd35 doc: Update doc 2018-08-23 11:01:12 +09:00
Tatsuhiro Tsujikawa
32d7883c47 nghttpx: Downstream::request_buf_full: take into account blocked_request_buf_ 2018-08-23 10:55:42 +09:00
Tatsuhiro Tsujikawa
9b24e19763 nghttpx: Choose h1 protocol if headers have been sent to backend on retry 2018-08-22 23:20:13 +09:00
Tatsuhiro Tsujikawa
13ffece12d Merge pull request #1214 from nghttp2/fix-rst-without-dconn
Fix stream reset if data from client is arrived before dconn is attached
2018-08-22 23:05:01 +09:00
Tatsuhiro Tsujikawa
9d5b781df6 Fix stream reset if data from client is arrived before dconn is attached 2018-08-22 22:32:25 +09:00
Tatsuhiro Tsujikawa
11d822c2a7 Merge pull request #1211 from nghttp2/stream-user-data
Tweak nghttp2_session_set_stream_user_data
2018-08-19 21:01:08 +09:00
Tatsuhiro Tsujikawa
4098512b5d Tweak nghttp2_session_set_stream_user_data
nghttp2_session_set_stream_user_data now works for a stream which is
not created yet, but the request which creates the stream is queued.
2018-08-18 17:38:58 +09:00
Tatsuhiro Tsujikawa
7e06ac1072 Merge branch 'akonskarm-master' 2018-08-02 16:18:51 +09:00
Alexandros Konstantinakis-Karmis
c6d8c4013c support definition of local endpoint for cleartext client session 2018-08-02 16:18:23 +09:00
Tatsuhiro Tsujikawa
e5b3f9addd Compile with clang-6.0 2018-06-09 16:27:43 +09:00
Tatsuhiro Tsujikawa
880f948684 Enable IndentPPDirectives 2018-06-09 16:21:30 +09:00
Tatsuhiro Tsujikawa
bda7e079e2 Update .clang-format 2018-06-09 16:20:27 +09:00
Tatsuhiro Tsujikawa
fc94018b97 clang-format-6.0 2018-06-09 16:02:26 +09:00
Tatsuhiro Tsujikawa
159c5e446a Merge pull request #1184 from PiotrSikora/max_streams
Fix handling of SETTINGS_MAX_CONCURRENT_STREAMS.
2018-06-05 22:02:02 +09:00
Tatsuhiro Tsujikawa
bfd4d8b052 Merge pull request #1183 from PiotrSikora/spdy
Remove remaining SPDY code from the integration tests.
2018-06-03 13:14:25 +09:00
Tatsuhiro Tsujikawa
388e785822 Fix typo 2018-06-03 13:10:32 +09:00
Piotr Sikora
2ba1389993 Fix handling of SETTINGS_MAX_CONCURRENT_STREAMS.
The maximum number of outgoing concurrent streams is initially
limited to 100 to avoid issues when the local endpoint submits
lots of requests before receiving initial SETTINGS frame from
the remote endpoint, since sending them at once to the remote
endpoint could lead to rejection of some of the requests.

This initial limit is overwritten with the value advertised in
SETTINGS_MAX_CONCURRENT_STREAMS setting by the remote endpoint,
but previously, it wasn't lifted if the remote endpoint didn't
advertise that setting (implying no limits), in which case the
limit of 100 was retained, even though it was never advertised
by the remote endpoint.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2018-05-30 20:24:00 -07:00
Piotr Sikora
d65a417306 Remove remaining SPDY code from the integration tests.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2018-05-30 17:45:20 -07:00
Tatsuhiro Tsujikawa
575bc309b9 Fix typo 2018-05-12 13:07:52 +09:00
Tatsuhiro Tsujikawa
00909d0742 Update doc 2018-05-12 13:07:04 +09:00
Tatsuhiro Tsujikawa
a7e38724e7 Merge pull request #1177 from nghttp2/origin-frame
ORIGIN frame
2018-05-12 13:03:12 +09:00
Tatsuhiro Tsujikawa
325612bcde nghttp: Receive ORIGIN frame 2018-05-12 12:35:08 +09:00
Tatsuhiro Tsujikawa
8034221525 Implement ORIGIN frame 2018-05-12 12:35:08 +09:00
Tatsuhiro Tsujikawa
2e6593e5a5 Bump up version number to 1.33.0-DEV 2018-05-08 22:36:31 +09:00
Tatsuhiro Tsujikawa
572735e496 Update manual pages 2018-05-08 22:18:42 +09:00
Tatsuhiro Tsujikawa
e8d693c395 Bump up version number to 1.32.0, LT revision to 30:2:16 2018-05-08 22:12:43 +09:00
Tatsuhiro Tsujikawa
f44dfcd9dc Update AUTHORS 2018-05-08 22:11:06 +09:00
Tatsuhiro Tsujikawa
1f1b0d93d4 Update manual pages 2018-05-07 21:43:13 +09:00
Tatsuhiro Tsujikawa
ce8c749b77 Merge pull request #1173 from nghttp2/asio-client-sni
asio: Support client side SNI
2018-05-04 10:26:31 +09:00
Tatsuhiro Tsujikawa
3e4f257b91 asio: Support client side SNI 2018-05-03 20:29:16 +09:00
Tatsuhiro Tsujikawa
86fab997b4 Upgrade neverbleed to the latest master 2018-05-03 14:51:59 +09:00
Tatsuhiro Tsujikawa
c3ecd44592 Merge pull request #1171 from nghttp2/h2load-rate-and-duration
h2load: -r and --duration are mutually exclusive
2018-04-28 01:23:22 +09:00
Tatsuhiro Tsujikawa
c65ca20a49 h2load: -r and --duration are mutually exclusive 2018-04-28 00:30:43 +09:00
Tatsuhiro Tsujikawa
a5c408c5e3 Ignore all input after calling session_terminate_session 2018-04-22 14:42:28 +09:00
Tatsuhiro Tsujikawa
06379b2861 Fix treatment of padding 2018-04-22 14:42:28 +09:00
Tatsuhiro Tsujikawa
e04de48ed9 Merge pull request #1162 from nghttp2/libressl
Libressl
2018-04-14 23:57:20 +09:00
Tatsuhiro Tsujikawa
009646421c Use LIBRESSL_IN_USE instead of defined(LIBRESSL_VERSION_NUMBER) 2018-04-14 18:31:57 +09:00
Tatsuhiro Tsujikawa
8d0b4544f8 libressl 2.7 has X509_VERIFY_PARAM_* 2018-04-14 18:31:57 +09:00
Tatsuhiro Tsujikawa
d8a34131e1 libressl 2.7 has SSL_CTX_get0_certificate 2018-04-14 18:31:57 +09:00
Tatsuhiro Tsujikawa
5db17d0af9 Compile with libressl 2.7.2 2018-04-14 18:09:47 +09:00
Tatsuhiro Tsujikawa
1bf69b5662 Define LIBRESSL_LEGACY_API and LIBRESSL_2_7_API
LIBRESSL_LEGACY_API is drop-in replacement for LIBRESSL_IN_USE.  In
the upcoming commits, we will add changes to support libressl 2.7.
2018-04-14 18:09:47 +09:00
Tatsuhiro Tsujikawa
3febaef1fa Bump up LT revision to 30:1:16 due to v1.31.1 release 2018-04-13 00:24:13 +09:00
Tatsuhiro Tsujikawa
b1bd6035e8 Fix frame handling 2018-04-07 00:27:55 +09:00
Tatsuhiro Tsujikawa
b48bcb214a examples: Use C style comment in .c files 2018-04-03 22:08:24 +09:00
Tatsuhiro Tsujikawa
6f3ce2c72d examples: Remove unused lambda capture 2018-04-03 22:07:02 +09:00
Tatsuhiro Tsujikawa
2f9121cf44 Merge branch 'Sp1l-Sp1l/allow-no-npn' 2018-04-03 21:42:17 +09:00
Tatsuhiro Tsujikawa
e65e7711ca Add comment on #endif 2018-04-03 21:39:44 +09:00
Tatsuhiro Tsujikawa
636ef51b0f Fix compile error with -Wunused-function 2018-04-03 21:33:09 +09:00
Bernard Spil
400934e5a3 [PATCH] Allow building without NPN
NPN has been superseeded by ALPN. OpenSSL provides a configure
option to disable npn (no-npn) which results in an OpenSSL
installation that defines OPENSSL_NO_NEXTPROTONEG in opensslconf.h

The #ifdef's look safe here (as the next_proto is initialized as
nullptr). Alteratively, macros could be defined for the used npn
methods that return a 0 for next_proto.

Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
2018-03-25 18:27:23 +02:00
Tatsuhiro Tsujikawa
4c3a3acf9b Merge pull request #1146 from vszakats/cmakestaticlib
cmake: add ENABLE_STATIC_LIB option to build static lib
2018-03-13 23:06:29 +09:00
Tatsuhiro Tsujikawa
9aa6002c37 Merge pull request #1144 from hellojaewon/master
Fix typo
2018-03-13 23:04:05 +09:00
Viktor Szakats
f342260bfe cmake: add ENABLE_STATIC_LIB option to build static lib
When using the ENABLE_LIB_ONLY option, only the shared
library was built. This new option allows to build the
static library as well.
2018-03-12 22:41:37 +00:00
jwchoi
a6dd497016 Fix typo 2018-03-12 09:19:19 +09:00
Tatsuhiro Tsujikawa
842509dab6 Don't allow 101 HTTP status code because HTTP/2 removes HTTP Upgrade 2018-03-11 15:37:30 +09:00
Tatsuhiro Tsujikawa
4add618a3f Bump up version number to 1.32.0-DEV 2018-02-27 22:32:00 +09:00
Tatsuhiro Tsujikawa
6e74466231 Update bash_completion 2018-02-27 21:18:50 +09:00
Tatsuhiro Tsujikawa
478eac099f Update manual pages 2018-02-27 21:18:05 +09:00
Tatsuhiro Tsujikawa
88e2029e37 Bump up version number to 1.31.0, LT revision to 30:0:16 2018-02-27 21:15:26 +09:00
Tatsuhiro Tsujikawa
45d76cf501 nghttpx: Close listening socket on graceful shutdown 2018-02-26 22:40:24 +09:00
Tatsuhiro Tsujikawa
54573f28a8 Merge pull request #1137 from nghttp2/session-set-user-data
Add nghttp2_session_set_user_data() public API function
2018-02-25 18:26:43 +09:00
Tatsuhiro Tsujikawa
17793e99dc Add nghttp2_session_set_user_data() public API function 2018-02-22 21:02:16 +09:00
Tatsuhiro Tsujikawa
5eac3c9025 Update manual pages 2018-02-22 16:14:34 +09:00
Tatsuhiro Tsujikawa
e70195ae91 nghttpx: Update doc 2018-02-22 16:12:38 +09:00
Tatsuhiro Tsujikawa
fe51e7fa1a Merge pull request #1130 from nghttp2/avoid-inet_pton-macro
src: Define nghttp2_inet_pton wrapper to avoid inet_pton macro
2018-02-17 22:58:37 +09:00
Tatsuhiro Tsujikawa
eb951c2ce4 src: Define nghttp2_inet_pton wrapper to avoid inet_pton macro 2018-02-12 16:22:47 +09:00
Tatsuhiro Tsujikawa
39f0ce7c25 Merge pull request #1126 from nghttp2/nghttpx-expired-client-cert
nghttpx: Add an option to accept expired client certificate
2018-02-10 16:00:43 +09:00
Tatsuhiro Tsujikawa
65157811d4 Merge pull request #1123 from nghttp2/mruby-client-cert-not-before-after
nghttpx: Add mruby tls_client_not_before, and tls_client_not_after
2018-02-10 16:00:29 +09:00
Tatsuhiro Tsujikawa
e8af7afc65 nghttpx: Add an option to accept expired client certificate 2018-02-08 16:51:23 +09:00
Tatsuhiro Tsujikawa
38abfd1863 nghttpx: Add mruby tls_client_not_before, and tls_client_not_after 2018-02-08 16:25:31 +09:00
Tatsuhiro Tsujikawa
ff3edc09ed nghttpx: Fix potential memory leak 2018-02-03 18:21:42 +09:00
Tatsuhiro Tsujikawa
0bb1540682 Bump up version number to 1.31.0-DEV 2018-02-02 22:17:47 +09:00
Tatsuhiro Tsujikawa
f0836c7e39 Update manual pages 2018-02-02 21:19:16 +09:00
Tatsuhiro Tsujikawa
25db178b7d Bump up version number to 1.30.0, LT revision to 29:2:15 2018-02-02 21:15:03 +09:00
Tatsuhiro Tsujikawa
1b6713e6ec Update AUTHORS 2018-02-02 21:12:40 +09:00
Tatsuhiro Tsujikawa
c1a496cf4e nghttpx: Fix bug that h1 backend idle timeout expires sooner 2018-02-02 21:09:04 +09:00
Tatsuhiro Tsujikawa
e098a21132 mruby: Fix bug that response header is unexpectedly overwritten
The bug is the same bug fixed by
6deee2037d, but in response handler.
2018-01-28 19:41:45 +09:00
Tatsuhiro Tsujikawa
0ba4bf51e4 Merge pull request #1120 from dylanplecki/issue-1119-mruby-header-overwrite
Fix #1119: Overwrite of first header on mruby call to env.req.set_header(..)
2018-01-28 19:35:20 +09:00
Dylan Plecki
6deee2037d Fix #1119: Stop overwrite of first header on mruby call to env.req.set_header(..) 2018-01-26 18:49:08 -08:00
Tatsuhiro Tsujikawa
6761a933fe Merge pull request #1105 from nghttp2/nghttpx-upgrade-scheme
nghttpx: Add upgrade-scheme parameter to backend option
2018-01-14 23:44:00 +09:00
Tatsuhiro Tsujikawa
5cc3d159e1 nghttpx: Add upgrade-scheme parameter to backend option
If "upgrade-scheme" parameter is present in backend option along with
"tls" paramter, HTTP/2 :scheme pseudo header field is changed to
"https" from "http" when forwarding a request to this particular
backend.  This is a workaround for a server which requests "https"
scheme on HTTP/2 connection encrypted by TLS.
2018-01-08 18:08:01 +09:00
Tatsuhiro Tsujikawa
652f57e79d Merge pull request #1104 from nghttp2/allow-ping-after-goaway
Allow PING frame to be sent after GOAWAY
2018-01-08 17:26:47 +09:00
Tatsuhiro Tsujikawa
acd6b40e4c Allow PING frame to be sent after GOAWAY 2018-01-08 17:03:48 +09:00
Tatsuhiro Tsujikawa
0fbb46edd6 Merge pull request #1101 from nghttp2/remember-pushed-links
nghttpx: Remember which resource is pushed
2018-01-04 23:15:35 +09:00
Tatsuhiro Tsujikawa
6ad629de47 Merge pull request #1102 from nghttp2/fix-missing-alpn-validation
nghttpx: Fix missing ALPN validation (--npn-list)
2018-01-04 23:15:10 +09:00
Tatsuhiro Tsujikawa
74754982f1 nghttpx: Fix missing ALPN validation (--npn-list)
This commit fixes the bug that ALPN validation does not occur when
ALPN list is not sent from client.
2018-01-04 22:43:47 +09:00
Tatsuhiro Tsujikawa
a31a2e3b2c nghttpx: Remember which resource is pushed
Remember which resource is pushed in order to conform to the semantics
described in RFC 8297.
2018-01-04 22:35:22 +09:00
Tatsuhiro Tsujikawa
a776b0dbcc Merge pull request #1092 from nghttp2/define-103
src: Define 103 status code
2017-12-20 20:39:22 +09:00
Tatsuhiro Tsujikawa
cfd926f09b src: Define 103 status code 2017-12-20 19:30:55 +09:00
Tatsuhiro Tsujikawa
72f52716ae Bump up version number to 1.30.0-DEV 2017-12-19 23:37:09 +09:00
Tatsuhiro Tsujikawa
439b9b6c6a Update manual pages 2017-12-19 23:18:56 +09:00
Tatsuhiro Tsujikawa
4849845292 Bump up version number to v1.29.0, LT revision to 29:1:15 2017-12-19 23:16:34 +09:00
Tatsuhiro Tsujikawa
d30f38163c Update manual pages 2017-12-17 14:16:53 +09:00
Tatsuhiro Tsujikawa
cff9ebe1dd Merge pull request #1091 from nghttp2/remove-spdy
Remove SPDY
2017-12-17 14:14:14 +09:00
Tatsuhiro Tsujikawa
4d1139f653 Remove SPDY 2017-12-17 13:28:44 +09:00
Tatsuhiro Tsujikawa
48f574076c nghttpx: Update doc 2017-12-16 00:13:27 +09:00
Tatsuhiro Tsujikawa
c1f14d73c7 Update manual pages 2017-12-14 22:25:07 +09:00
Tatsuhiro Tsujikawa
216f4dad83 nghttpx: Remove redundant check 2017-12-14 21:39:22 +09:00
Tatsuhiro Tsujikawa
a4e27d766b Revert "nghttpx: Use an existing h2 backend connection as much as possible"
This reverts commit f507b5eee4.

Balancing load is more important at the moment.
2017-12-14 21:34:04 +09:00
Tatsuhiro Tsujikawa
96df14d2ec Merge pull request #1084 from dvetutnev/cmake_module_path
Fix CMAKE_MODULE_PATH
2017-12-14 21:19:34 +09:00
Dmitriy Vetutnev
2365f12e39 Fix CMAKE_MODULE_PATH 2017-12-06 20:48:52 +03:00
Tatsuhiro Tsujikawa
96ea9cdaf7 Merge pull request #1083 from nghttp2/nghttpx-api-tmp-file
nghttpx: Write API request body in temporary file
2017-12-03 16:43:54 +09:00
Tatsuhiro Tsujikawa
03f7ec0f60 nghttpx: Write API request body in temporary file 2017-12-03 16:19:57 +09:00
Tatsuhiro Tsujikawa
a941699962 Merge pull request #1082 from nghttp2/nghttpx-increase-api-max-request-body
nghttpx: Increase api-max-request-body
2017-12-02 14:55:45 +09:00
Tatsuhiro Tsujikawa
2056e812bd nghttpx: Increase api-max-request-body 2017-12-02 13:49:42 +09:00
Tatsuhiro Tsujikawa
04348ff20e Merge pull request #1081 from nghttp2/nghttpx-faster-parse-config
nghttpx: Faster configuration loading with lots of backends
2017-12-01 23:47:34 +09:00
Tatsuhiro Tsujikawa
d8e378fea9 Merge pull request #1080 from nghttp2/nghttpx-fix-crash-with-backend-http-proxy-uri
nghttpx: Fix crash with --backend-http-proxy-uri option
2017-12-01 23:07:38 +09:00
Tatsuhiro Tsujikawa
1ebb6810a1 nghttpx: Faster configuration loading with lots of backends 2017-12-01 23:06:06 +09:00
Tatsuhiro Tsujikawa
2a694b270a Merge pull request #1077 from nghttp2/refused-stream
Use NGHTTP2_REFUSED_STREAM for streams which are closed by GOAWAY
2017-12-01 22:36:09 +09:00
Tatsuhiro Tsujikawa
a3ebeeafba nghttpx: Fix crash with --backend-http-proxy-uri option 2017-12-01 22:28:16 +09:00
Tatsuhiro Tsujikawa
422ad1be32 Use NGHTTP2_REFUSED_STREAM for streams which are closed by GOAWAY
The error code NGHTTP2_REFUSED_STREAM is passed to
nghttp2_on_stream_close callback when a stream is closed because its
stream ID is strictly larger than incoming or outgoing GOAWAY.
2017-11-30 23:10:57 +09:00
Tatsuhiro Tsujikawa
97f1735cf5 Bump up version number to 1.29.0 2017-11-25 23:04:03 +09:00
Tatsuhiro Tsujikawa
939ad5ddbe Update manual pages 2017-11-25 22:19:11 +09:00
Tatsuhiro Tsujikawa
24d92b979d Add deprecation warning when spdylay support is enabled 2017-11-25 22:16:23 +09:00
Tatsuhiro Tsujikawa
4c92ff1843 Bump up version number to 1.28.0, LT revision to 29:0:15 2017-11-25 22:10:02 +09:00
Tatsuhiro Tsujikawa
280db5c6ba Update neverbleed 2017-11-25 21:27:14 +09:00
Tatsuhiro Tsujikawa
7fbcb2d005 Merge pull request #1074 from nghttp2/fix-doc
Fix doc
2017-11-24 22:59:04 +09:00
Tatsuhiro Tsujikawa
53aeb2c3d7 Fix doc 2017-11-24 22:26:29 +09:00
Tatsuhiro Tsujikawa
ff200bfcf3 clang-format-5.0 2017-11-23 14:19:12 +09:00
Tatsuhiro Tsujikawa
fee3151fd2 Switch to clang-format-5.0 2017-11-23 14:16:42 +09:00
Tatsuhiro Tsujikawa
99a85159ae Update manual pages 2017-11-21 23:27:02 +09:00
Tatsuhiro Tsujikawa
2a981a3f56 Merge pull request #1066 from nghttp2/nghttpx-add-affinity-cookie-secure
nghttpx: Add affinity-cookie-secure parameter to backend option
2017-11-21 23:24:40 +09:00
Tatsuhiro Tsujikawa
0028275d7b nghttpx: Add affinity-cookie-secure parameter to backend option 2017-11-21 22:29:22 +09:00
Tatsuhiro Tsujikawa
ee8bfddfc9 Merge pull request #1063 from nghttp2/error_callback2
Error callback2
2017-11-21 21:25:53 +09:00
Tatsuhiro Tsujikawa
194acb1f2c src: Use nghttp2_error_callback2 2017-11-19 16:51:52 +09:00
Tatsuhiro Tsujikawa
43a2a70ae7 Add nghttp2_error_callback2
nghttp2_error_callback2 is an extended version of the existing
nghttp2_error_callback by adding error code parameter.  This
deprecates nghttp2_error_callback.
2017-11-19 16:51:52 +09:00
Tatsuhiro Tsujikawa
73344ae9aa nghttpx: Use plain hex string format for client serial 2017-11-17 00:04:23 +09:00
Tatsuhiro Tsujikawa
c479f6122f Merge pull request #1060 from nghttp2/nghttpx-add-client-serial
Nghttpx add client serial
2017-11-16 23:26:35 +09:00
Tatsuhiro Tsujikawa
eca0a3025b nghttpx: Add $tls_client_serial log variable 2017-11-16 22:53:54 +09:00
Tatsuhiro Tsujikawa
4720c5cb3d nghttpx: Make client serial available in mruby script 2017-11-16 22:53:54 +09:00
Tatsuhiro Tsujikawa
cd55ab28ab nghttpx: Add function to get serial number from certificate 2017-11-16 22:53:54 +09:00
Tatsuhiro Tsujikawa
d402cfdf16 Merge pull request #1057 from nghttp2/nghttpx-add-tls-client-issuer-name
Add tls_client_issuer_name log variable and expose it to mruby
2017-11-16 01:16:11 +09:00
Tatsuhiro Tsujikawa
22502182d0 Add tls_client_issuer_name log variable and expose it to mruby 2017-11-15 23:41:47 +09:00
Tatsuhiro Tsujikawa
05e1fd5e77 Update manual pages 2017-11-04 17:53:51 +09:00
Tatsuhiro Tsujikawa
943d7923f9 Add Session Affinity section to nghttpx howto 2017-11-04 17:49:09 +09:00
Tatsuhiro Tsujikawa
568ecbfb28 doc: Add missing port 2017-11-04 17:48:46 +09:00
Tatsuhiro Tsujikawa
f5ddd7f43b nghttpx: Make initial_addr_idx_ unsigned 2017-11-04 17:30:56 +09:00
Tatsuhiro Tsujikawa
88abbce7e7 nghttpx: Fix compile error with gcc 2017-11-04 17:30:27 +09:00
Tatsuhiro Tsujikawa
16e9036568 nghttpx: Fix affinity retry 2017-11-04 17:13:45 +09:00
Tatsuhiro Tsujikawa
fa7945c627 nghttpx: Refactor 2017-11-04 15:55:25 +09:00
Tatsuhiro Tsujikawa
daca43f0dd nghttpx: Fix stalled backend connection on retry 2017-11-04 15:46:08 +09:00
Tatsuhiro Tsujikawa
16bc11e670 nghttpx: Remove duplicated util::make_socket_nodelay 2017-11-04 13:00:17 +09:00
Tatsuhiro Tsujikawa
6f7e94cdba Merge pull request #1047 from PiotrSikora/go_vet
integration: Fix issues reported by the `go vet` tool.
2017-11-03 23:02:37 +09:00
Piotr Sikora
61efa15a14 integration: Fix issues reported by the go vet tool.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2017-11-02 21:13:25 -07:00
Tatsuhiro Tsujikawa
8c0ea56bb8 Merge pull request #1036 from nghttp2/nghttpx-affinity-cookie
nghttpx: Cookie based session affinity
2017-11-01 22:45:38 +09:00
Tatsuhiro Tsujikawa
549053710b nghttpx: Refactor 2017-11-01 22:33:49 +09:00
Tatsuhiro Tsujikawa
6010d39325 integration: Add tests 2017-11-01 22:18:03 +09:00
Tatsuhiro Tsujikawa
be5c39a1cf src: Add tests 2017-11-01 22:18:03 +09:00
Tatsuhiro Tsujikawa
b8fda6808b nghttpx: Cookie based session affinity 2017-11-01 22:18:03 +09:00
Tatsuhiro Tsujikawa
e29b9c1261 Merge pull request #1045 from nghttp2/nghttpx-sha1-fingerprint
Nghttpx sha1 fingerprint
2017-10-31 23:07:39 +09:00
Tatsuhiro Tsujikawa
539e27812b nghttpx: Add tls_client_fingerprint_sha1 to mruby and accesslog
Also tls_client_fingerprint is renamed to
tls_client_fingerprint_sha256.
2017-10-31 21:41:40 +09:00
Tatsuhiro Tsujikawa
7008afd40e nghttpx: Refactor get_x509_fingerprint to accept hash function 2017-10-31 21:28:16 +09:00
Tatsuhiro Tsujikawa
77a41756db Merge pull request #1041 from nghttp2/fix-examples-client-server
examples: Make client and server work with libevent-2.1.8
2017-10-30 17:30:20 +09:00
Tatsuhiro Tsujikawa
b15045d60e Merge pull request #1040 from nghttp2/nghttpx-mruby-add-more-tls-vars
nghttpx: Add more TLS related attributes to mruby Env object
2017-10-29 23:14:16 +09:00
Tatsuhiro Tsujikawa
03084f7517 examples: Make client and server work with libevent-2.1.8 2017-10-29 23:09:23 +09:00
Tatsuhiro Tsujikawa
60baca27e4 nghttpx: Add more TLS related attributes to mruby Env object
The added attributes are:

* tls_cipher
* tls_protocol
* tls_session_id
* tls_session_reused
* alpn
2017-10-29 22:42:30 +09:00
Tatsuhiro Tsujikawa
86990db236 Merge pull request #1038 from nghttp2/nghttpx-add-more-logging-vars
nghttpx: Add client fingerprint and subject name to accesslog
2017-10-29 22:21:10 +09:00
Tatsuhiro Tsujikawa
cb376bcd80 nghttpx: Add client fingerprint and subject name to accesslog 2017-10-29 21:47:00 +09:00
Tatsuhiro Tsujikawa
f2b8edd1e2 nghttpx: Fix memory leak 2017-10-29 21:46:12 +09:00
Tatsuhiro Tsujikawa
c4f8afcfde nghttpx: Get TLS info only when it is necessary when writing accesslog 2017-10-29 21:22:33 +09:00
Tatsuhiro Tsujikawa
1a1a216d5a Merge pull request #1037 from nghttp2/nghttpx-mruby-tls-client-vars
nghttpx: Add client fingerprint and subject name to mruby env
2017-10-29 21:13:20 +09:00
Tatsuhiro Tsujikawa
9f80a82c1a nghttpx: Add client fingerprint and subject name to mruby env 2017-10-29 19:54:42 +09:00
Tatsuhiro Tsujikawa
c573c80bd3 nghttpx: Pass a pointer to SSL instead of TLSSessionInfo to LogSpec 2017-10-29 19:47:39 +09:00
Tatsuhiro Tsujikawa
3cd6817e21 Fix typos 2017-10-29 16:54:21 +09:00
Tatsuhiro Tsujikawa
d4a69658a1 Add another warning about mruby 2017-10-29 16:18:20 +09:00
Tatsuhiro Tsujikawa
8e06fe4971 Fix typo 2017-10-29 16:14:30 +09:00
Tatsuhiro Tsujikawa
aaeeec8f1c Fix typos 2017-10-28 22:25:42 +09:00
Tatsuhiro Tsujikawa
66d5e24606 Bump up version number to 1.28.0-DEV 2017-10-25 21:20:16 +09:00
Tatsuhiro Tsujikawa
e8907a073f Update manual pages 2017-10-24 23:10:37 +09:00
Tatsuhiro Tsujikawa
9656ac0254 Fix sphinx warnings 2017-10-24 23:10:23 +09:00
Tatsuhiro Tsujikawa
75624617ce Bump up version number to 1.27.0 2017-10-24 22:51:17 +09:00
Tatsuhiro Tsujikawa
1a8f6578b3 Update AUTHORS 2017-10-24 22:49:51 +09:00
Tatsuhiro Tsujikawa
4f0548b018 travis: Compile mruby and neverbleed in make distcheck
gcc is upgraded to gcc-7.
2017-10-24 21:41:10 +09:00
Tatsuhiro Tsujikawa
5119e82b93 src: Fix memory leak in unit test 2017-10-24 21:40:30 +09:00
Tatsuhiro Tsujikawa
3be5856c82 nghttpx: Fix unused function warnings 2017-10-24 21:40:30 +09:00
Tatsuhiro Tsujikawa
a319143901 nghttpx: Fix bug that header fields are missing in HTTP/1.0 response 2017-10-22 01:11:32 +09:00
Tatsuhiro Tsujikawa
17c88d60c7 Compile with g++ 7.2.1 2017-10-19 23:04:12 +09:00
Tatsuhiro Tsujikawa
7601511fdf Merge pull request #1029 from lazyhamster/master
Fixed accidental compiler flags concatenation for MSVC.
2017-10-19 21:21:46 +09:00
Tatsuhiro Tsujikawa
f507b5eee4 nghttpx: Use an existing h2 backend connection as much as possible
h2load measurement reveals that this strategy is 3 times faster than
the previous implementations.
2017-10-19 21:15:08 +09:00
LazyHamster
93821165be Fixed accidental compiler flags concatenation for MSVC. 2017-10-18 15:25:17 +03:00
Tatsuhiro Tsujikawa
aaa0b858e4 Amend some macro comments 2017-10-14 11:50:16 +09:00
Tatsuhiro Tsujikawa
5fa1938691 clang-format 2017-10-14 11:45:41 +09:00
Tatsuhiro Tsujikawa
56ee3d4820 Merge pull request #1027 from dermojo/mingw
Support for Windows / MinGW
2017-10-14 11:44:57 +09:00
Daniel Evers
c2d9a1ed6f Support for Windows / MinGW 2017-10-12 18:15:12 +02:00
Tatsuhiro Tsujikawa
fcf9ab2798 Merge pull request #1023 from nckx/fix-fuzz-typo
fuzz: Fix typo (‘-fsanitize=adres’) in README.rst
2017-10-12 21:00:18 +09:00
Tobias Geerinckx-Rice
35e445bd04 fuzz: Fix typo (‘-fsanitize=adres’) in README.rst 2017-10-10 22:14:25 +02:00
Tatsuhiro Tsujikawa
88ce3c31b7 Merge pull request #1020 from FireBurn/master
Reduce libxml2 version requirement to 2.6.26
2017-10-07 21:17:33 +09:00
Mike Lothian
16320a0f81 Reduce libxml2 version requirement to 2.6.26
It's currently set at 2.7.7 but reducing this down to 2.6.26 allows
nghttp2 to be built on RHEL5
2017-10-04 14:25:12 +01:00
Tatsuhiro Tsujikawa
8c72fb3539 Merge pull request #1018 from nghttp2/h2load-verbose-h2-headers
h2load: Print out h2 header fields with --verbose option
2017-10-01 12:49:13 +09:00
Tatsuhiro Tsujikawa
8ffe389daa h2load: Print out h2 header fields with --verbose option 2017-09-22 18:12:20 +09:00
Tatsuhiro Tsujikawa
189a4516a1 Merge pull request #1016 from nghttp2/nghttpx-non-final-response
nghttpx: Send non-final response to HTTP/1.1 or HTTP/2 client only
2017-09-21 22:28:51 +09:00
Tatsuhiro Tsujikawa
2576855ded nghttpx: Send non-final response to HTTP/1.1 or HTTP/2 client only 2017-09-21 21:42:56 +09:00
Tatsuhiro Tsujikawa
7d4d48a35e Add timing-based load-testing section to h2load howto 2017-09-21 17:57:32 +09:00
Tatsuhiro Tsujikawa
cc6f759190 src: Add static to constexpr char[] 2017-09-20 23:54:10 +09:00
Tatsuhiro Tsujikawa
c23fc86a23 Bump up version number to 1.27.0-DEV 2017-09-20 22:52:43 +09:00
Tatsuhiro Tsujikawa
d2324bdda1 Update bash_completion 2017-09-20 22:42:14 +09:00
Tatsuhiro Tsujikawa
6f0ae9d49a Update manual pages 2017-09-20 22:41:56 +09:00
Tatsuhiro Tsujikawa
0389af5724 Bump up version number to 1.26.0 2017-09-20 22:29:38 +09:00
Tatsuhiro Tsujikawa
1766e25f45 Update AUTHORS 2017-09-20 22:28:43 +09:00
Tatsuhiro Tsujikawa
323001238a clang-format 2017-09-20 22:08:22 +09:00
Tatsuhiro Tsujikawa
91f062f873 src: Fix compile error 2017-09-20 22:08:08 +09:00
Tatsuhiro Tsujikawa
650a0cfbff Merge pull request #1013 from marcbachmann/patch-1
Fix some typos in the nghttpx how-to doc
2017-09-13 23:59:07 +09:00
Marc Bachmann
e6b8b3d1d3 docs: Fix some typos in the nghttpx how-to 2017-09-11 22:10:03 +02:00
Tatsuhiro Tsujikawa
a170023f23 nghttpx: Verify OCSP response using trusted CA certificates 2017-09-01 21:35:38 +09:00
Tatsuhiro Tsujikawa
4be4c0cddc Revert "nghttpx: Verify OCSP response using trusted CA certificates"
This reverts commit 59c78d5809.
2017-08-30 22:27:02 +09:00
Tatsuhiro Tsujikawa
0de9d374df Merge pull request #1002 from GitaiQAQ/master
Just fix unreachable links and remove ndk...
2017-08-26 22:39:24 +09:00
Tatsuhiro Tsujikawa
0df199198a Merge pull request #1001 from rlei/master
Fix OCSP related error when building with BoringSSL
2017-08-26 22:00:56 +09:00
Gitai
7646e376e0 Fix unreachable 2017-08-26 12:54:03 +08:00
Rick Lei
5996798a34 Fix OCSP related error when building with BoringSSL
BoringSSL has no "openssl/ocsp.h" nor most OCSP related APIs used in
shrpx_tls.cc. This commit add ifdefs to disable related code to allow
building nghttp2 with BoringSSL (again).

It's possible to use !defined(OPENSSL_IS_BORINGSSL), but since BoringSSL
defines OPENSSL_NO_OCSP which is more specific, I chose to go with the
latter one.
2017-08-24 11:56:46 -04:00
Tatsuhiro Tsujikawa
6fec532012 Merge pull request #998 from nghttp2/h2load-fix-timing-script-stall
Fix bug that timing script stalls with -m1
2017-08-24 21:17:43 +09:00
Tatsuhiro Tsujikawa
15713e0b7c h2load: Ignore -n for timing-based mode instead of requiring -n=0 2017-08-23 20:35:01 +09:00
Tatsuhiro Tsujikawa
a6a561af47 Fix bug that timing script stalls with -m1 2017-08-23 20:10:23 +09:00
Tatsuhiro Tsujikawa
09c468a4b4 Merge branch 'sohamm17-master' 2017-08-23 19:22:44 +09:00
Tatsuhiro Tsujikawa
bcda1c2409 Fix assertion failure 2017-08-23 19:22:23 +09:00
Tatsuhiro Tsujikawa
afcd8d9ab1 clang-format 2017-08-23 19:19:00 +09:00
Tatsuhiro Tsujikawa
c9b1c91944 Fix compile error 2017-08-23 19:18:27 +09:00
Tatsuhiro Tsujikawa
5d9434eb09 Merge branch 'master' of https://github.com/sohamm17/nghttp2 into sohamm17-master 2017-08-23 19:16:40 +09:00
Tatsuhiro Tsujikawa
1a44b5d52a Merge pull request #984 from nghttp2/h2load-reservoir-sampling
h2load: Reservoir sampling
2017-08-23 19:00:28 +09:00
Tatsuhiro Tsujikawa
6635ca5e26 Merge pull request #988 from dvetutnev/refactoring_include_directories
Refactoring include directories
2017-08-23 18:59:28 +09:00
Tatsuhiro Tsujikawa
9c6c78833b Bump up version number to 1.26.0-DEV 2017-08-18 23:19:36 +09:00
Tatsuhiro Tsujikawa
9a9ab0813c Update manual pages 2017-08-18 23:00:58 +09:00
Tatsuhiro Tsujikawa
0ccaaa48ce Bump up version number to 1.25.0, LT revision to 28:0:14 2017-08-18 22:38:10 +09:00
Tatsuhiro Tsujikawa
3f2fe98dd1 Update AUTHORS 2017-08-18 22:11:11 +09:00
Tatsuhiro Tsujikawa
0d91e9c255 Update doc 2017-08-18 22:06:43 +09:00
Dmitriy Vetutnev
af926fbe1f Refactoring include directories for build as CMake subdirectory (add_subdirectory(nghttp2)) 2017-08-16 21:28:12 +03:00
Tatsuhiro Tsujikawa
83039ae2d4 h2load: Reservoir sampling 2017-08-14 20:25:02 +09:00
Tatsuhiro Tsujikawa
4c53da6961 Merge pull request #983 from addaleax/static-rcbuf
lib: add nghttp2_rcbuf_is_static()
2017-08-13 09:10:41 +09:00
Anna Henningsen
eb306f463e lib: add nghttp2_rcbuf_is_static()
Add a `nghttp2_rcbuf_is_static()` method to tell whether a rcbuf
is statically allocated.

This can be useful for language bindings that wish to avoid
creating duplicate strings for these buffers; concretely, I am
planning to use this in the Node HTTP/2 module that is being
introduced.
2017-08-12 17:48:14 +02:00
Tatsuhiro Tsujikawa
788835c5fd Merge pull request #980 from nghttp2/fix-forwarded-for-with-proxyprotocol
Fix bug that forwarded for is not affected by proxy protocol
2017-08-09 23:34:43 +09:00
Tatsuhiro Tsujikawa
4d76606fa2 Fix bug that forwarded for is not affected by proxy protocol 2017-08-09 22:44:14 +09:00
Soham Sinha
1baf7d34b3 Duration watcher and warmup watcher is initialised in Worker constructor. Statistic calculation is removed from duration watcher call_back, it's done in free_client. 2017-08-08 17:26:37 -04:00
Soham Sinha
c78159469a Added a function to free a client from Worker's list of client, if the client is destroyed 2017-08-07 18:58:12 -04:00
Soham Sinha
b72ca0289c formatting issue 2017-08-04 14:20:00 -04:00
Soham Sinha
46f670f8a2 concurrent connections are created in timing-based mode. Some safety asserts added. 2017-08-03 16:15:14 -04:00
Soham Sinha
4b44362b9f minor style changes 2017-08-01 20:22:20 -04:00
Soham Sinha
d068a29798 removed unnecessary code 2017-08-01 19:51:47 -04:00
Soham Sinha
0836a51408 Handling requests starting in warm-up phase and ending in MAIN_DURATION 2017-08-01 18:29:00 -04:00
Soham Sinha
566cee8fe7 MAIN_DURATION is initiliazed in Worker constructor, MAIN_DURATION check is removed from two functions because those functions are needed in warm-up phase as well. 2017-08-01 17:45:52 -04:00
Soham Sinha
e85698e131 MAIN_DURATION is initiliazed in Worker constructor, MAIN_DURATION check is removed from two functions because those functions are needed in warm-up phase as well. 2017-08-01 17:45:18 -04:00
Soham Sinha
5f3c541c4c enabled --duration option. 2017-07-28 17:31:13 -04:00
Soham Sinha
3c43e00d8a Timing (#1)
* Adding timing-sensitive load test option in h2load.

* more checks added for parameters

* A worker thread can control its clients' warmup and main duration.

* Changed warmup to an enum variable.

* removed unnecessary call to ev_timer_stop

* assertion is done before starting main measurement phase

* phase variable is implemented only inside the Worker class

* enum to enum class

* else indentation corrected

* check added for timing-based test when duration CB is called explicitly

* New argument is introduced for timing-based benchmarking.

* styling corrections

* duration watcher initialization is pushed back into warmup timeout

* Warmup and Duration timer is moved to Worker instead of clients. Now both timers and phase belongs to the Workers.

* some client functions are modified to return if it's not main_duration phase. client is not destructed but sessions are terminated

* outputs are adjusted for thread.

* Needed to check if a session exist before terminating

* formatting

* more formatting

* formatting
2017-07-28 17:08:20 -04:00
Tatsuhiro Tsujikawa
92d686d356 Merge branch 'mruby-1.3.0' 2017-07-28 00:51:48 +09:00
Tatsuhiro Tsujikawa
0f69e9c825 Fix typo 2017-07-28 00:51:34 +09:00
Tatsuhiro Tsujikawa
217d979458 Update mruby to 1.3.0
Fix compile error with mruby 1.3.0
2017-07-28 00:23:25 +09:00
Tatsuhiro Tsujikawa
cc289972fc Merge pull request #958 from sebdeckers/patch-1
fix: typo
2017-07-15 11:44:14 +09:00
Sebastiaan Deckers
c601e603c2 fix: typo
Came up in downstream code review by @lucaslago https://github.com/nodejs/node/pull/14239#discussion_r127539852
2017-07-15 07:46:26 +08:00
Tatsuhiro Tsujikawa
1002c6da1c src: Use llround instead of round 2017-07-12 23:23:47 +09:00
Tatsuhiro Tsujikawa
0911337689 Bump up version number to 1.25.0-DEV 2017-07-02 17:51:24 +09:00
Tatsuhiro Tsujikawa
3bcc416e13 Update manual pages 2017-07-02 13:40:21 +09:00
Tatsuhiro Tsujikawa
65837806f5 Bump up version number to 1.24.0 2017-07-02 13:37:53 +09:00
Tatsuhiro Tsujikawa
b0772dcc66 Update AUTHORS 2017-07-02 13:31:47 +09:00
Tatsuhiro Tsujikawa
c6d65aad3b Merge branch 'nghttp-not-upgrade-without-reason-phrase' 2017-06-28 21:36:13 +09:00
Tatsuhiro Tsujikawa
18dd20ce55 nghttp: Fix bug that upgrade fails if reason-phrase is missing 2017-06-28 01:01:39 +09:00
Tatsuhiro Tsujikawa
0f6d76a501 Merge pull request #947 from bassosimone/patch-1
README.rst: fix typo
2017-06-23 00:33:00 +09:00
Simone Basso
0f1320109f README.rst: fix typo 2017-06-22 17:03:05 +02:00
Tatsuhiro Tsujikawa
defa28c618 Merge pull request #945 from benjaminp/trailer-grammar
fix up grammar in submit_trailer docs
2017-06-20 00:35:46 +09:00
Benjamin Peterson
b7c95be47c fix up grammar in submit_trailer docs 2017-06-18 23:55:53 -07:00
Tatsuhiro Tsujikawa
a18d154e0e Merge pull request #943 from nghttp2/nghttpx-verify-ocsp-resp-with-cacerts
nghttpx: Verify OCSP response using trusted CA certificates
2017-06-15 20:56:44 +09:00
Tatsuhiro Tsujikawa
52195a12ee Merge pull request #941 from nghttp2/nghttpx-tls-min-proto
nghttpx: Set default minimum TLS version to TLSv1.2
2017-06-13 23:01:54 +09:00
Tatsuhiro Tsujikawa
59c78d5809 nghttpx: Verify OCSP response using trusted CA certificates 2017-06-13 23:00:26 +09:00
Tatsuhiro Tsujikawa
be164fc8f9 nghttpx: Set default minimum TLS version to TLSv1.2
Previously, the default minimum TLS version was TLSv1.1, but the
default cipher list didn't include any compatible ciphers with it.
This made handshake fail if TLSv1.1 was negotiated because there was
no shared ciphers.  To make the default settings consistent, the
default minimum TLS version is now TLSv1.2.
2017-06-12 23:54:12 +09:00
Tatsuhiro Tsujikawa
5833ef1efc Merge pull request #938 from benjaminp/fix-clean
fix cleaning in out-of-tree builds
2017-06-12 00:21:10 +09:00
Benjamin Peterson
28f88d46f3 fix cleaning in out-of-tree builds
The altered previously failed if the rst sources hadn't been copied over.
2017-06-11 00:03:36 -07:00
Tatsuhiro Tsujikawa
6ec7683991 nghttpx: Use nocopy version to send trailer headers to backend
It looks like we can use nocopy version here.  We use nocopy version
in frontend in day 1.
2017-06-02 22:38:39 +09:00
Tatsuhiro Tsujikawa
fb2d8f79d6 Update doc 2017-06-02 22:22:44 +09:00
Tatsuhiro Tsujikawa
8f7fa1b1bf nghttpx: Fix crash in OCSP response verification 2017-05-30 23:52:38 +09:00
Tatsuhiro Tsujikawa
e5889ce622 Bump up version number to 1.24.0-DEV 2017-05-26 23:07:50 +09:00
Tatsuhiro Tsujikawa
3a6f83394c Update bash_completion 2017-05-26 22:17:10 +09:00
Tatsuhiro Tsujikawa
acf36f3d1a Update manual pages 2017-05-26 22:16:51 +09:00
Tatsuhiro Tsujikawa
63e6a8bab2 Bump up version number to 1.23.0, LT revision to 27:3:13 2017-05-26 21:37:28 +09:00
Tatsuhiro Tsujikawa
5361cc6bd1 Update authors 2017-05-26 21:34:43 +09:00
Tatsuhiro Tsujikawa
cabac55394 Merge pull request #925 from sohamm17/patch-1
spelling mistake in arguments to build nghttp apps
2017-05-25 23:38:54 +09:00
Tatsuhiro Tsujikawa
db7483ef10 Merge branch 'nghttpx-verify-ocsp' 2017-05-25 23:37:34 +09:00
Tatsuhiro Tsujikawa
4b51ccbefe examples: Attempt to fix OpenSSL link error 2017-05-25 23:24:44 +09:00
Tatsuhiro Tsujikawa
74c2f1257a nghttpx: Add --no-verify-ocsp to disable OCSP response verification 2017-05-25 23:14:58 +09:00
Tatsuhiro Tsujikawa
1428a5e3ae nghttpx: Verify OCSP response
At least we should make sure that the OCSP response is targeted to the
expected certificate.  This is important because we pass the file path
to the external script, and if the file is replaced because of
renewal, and nghttpx has not reloaded its configuration, the
certificate nghttpx has loaded and the one included in the file
differ.  Verifying the OCSP response detects this, and avoids to send
wrong OCSP response.
2017-05-25 23:14:57 +09:00
Tatsuhiro Tsujikawa
fe021c1524 Merge branch 'memchunk-no-unique-ptr' 2017-05-25 00:53:13 +09:00
Tatsuhiro Tsujikawa
c57bf21306 src: memchunks: Don't use std::unique_ptr to avoid potential SO 2017-05-25 00:23:51 +09:00
Soham Sinha
1743b7d92d spelling mistake in arguments to build nghttp apps 2017-05-22 17:20:30 -04:00
Tatsuhiro Tsujikawa
7f31278c4c Update doc 2017-05-22 22:53:49 +09:00
Tatsuhiro Tsujikawa
8401e16a15 nghttpx: Fix compile error with gcc 2017-05-22 22:10:55 +09:00
Tatsuhiro Tsujikawa
07fb5854f3 nghttpx: Compile with openssl 1.0.2 2017-05-22 22:09:34 +09:00
Tatsuhiro Tsujikawa
b56a99bfba Update bash_completion 2017-05-21 11:43:00 +09:00
Tatsuhiro Tsujikawa
b91e4e4df1 Update manual pages 2017-05-21 11:42:46 +09:00
Tatsuhiro Tsujikawa
52a4d6ac31 Merge branch 'nghttpx-fix-cert-selection' 2017-05-21 11:26:12 +09:00
Tatsuhiro Tsujikawa
796ab87b14 nghttpx: Fix certificate selection based on pub key algorithm 2017-05-21 11:12:47 +09:00
Tatsuhiro Tsujikawa
ed1fad3bd4 nghttpx: Call ERR_clear_error()
Call ERR_clear_error() before the OpenSSL function if we use
SSL_get_error() to examine error stack.
2017-05-21 10:32:12 +09:00
Tatsuhiro Tsujikawa
9c1876f542 nghttpx: Fix certificate indexing bug 2017-05-21 00:19:33 +09:00
Tatsuhiro Tsujikawa
7d111d9963 Merge pull request #923 from nghttp2/compile-with-disable-assert
Compile with --disable-assert
2017-05-18 23:49:41 +09:00
Tatsuhiro Tsujikawa
8c2ce0cf3f Merge pull request #922 from nghttp2/nghttpx-ocsp-startup
nghttpx: Run OCSP at startup
2017-05-18 23:49:23 +09:00
Tatsuhiro Tsujikawa
1b442cb16f Compile with --disable-assert 2017-05-18 23:10:44 +09:00
Tatsuhiro Tsujikawa
2bf3680d87 Merge pull request #919 from projectgus/fix_ndebug_compile
nghttp2_session: Allow for compiling library with -DNDEBUG set
2017-05-18 22:37:51 +09:00
Tatsuhiro Tsujikawa
0d4f0f0db5 nghttpx: Run OCSP at startup
With --ocsp-startup option, nghttpx starts accepting connections after
initial attempts to get OCSP responses finish.  It does not matter
some of the attempts fail.  This feature is useful if OCSP responses
must be available before accepting connections.
2017-05-18 22:33:49 +09:00
Angus Gratton
e17ff8fd32 nghttp2_session: Allow for compiling library with -DNDEBUG set 2017-05-17 14:43:06 +10:00
Tatsuhiro Tsujikawa
14edd12304 nghttpx: Refactor the code for the anti-replay 2017-05-14 17:45:35 +09:00
Tatsuhiro Tsujikawa
e6ffdb23a4 nghttpx: Share session_cache_ssl_ctx across threads 2017-05-14 17:43:11 +09:00
Tatsuhiro Tsujikawa
98fdedac06 Merge pull request #917 from Tapanito/patch-1
Update docs
2017-05-13 10:27:22 +09:00
Tapanito
255037264a updated docs 2017-05-12 16:35:44 +01:00
Tatsuhiro Tsujikawa
d3fcbe9a02 Merge branch 'invalid-header-field-error' 2017-05-12 21:37:20 +09:00
Tatsuhiro Tsujikawa
bcdd588c6e Merge branch 'nghttpx-wildcard-path-match' 2017-05-11 23:50:56 +09:00
Tatsuhiro Tsujikawa
b5007d45f7 nghttpx: Wildcard path matching
This commit adds wildcard path matching.  If path pattern given in
backend option ends with "*", it is considered as wildcard path.  "*"
must match at least one character.  All paths which include wildcard
path without last "*" as prefix, and are strictly longer than wildcard
path without last "*" are matched.
2017-05-11 22:15:28 +09:00
Tatsuhiro Tsujikawa
a584cf5a4f Use clang-format-4.0 2017-04-30 15:45:53 +09:00
Tatsuhiro Tsujikawa
77f7a2fa7f Update doc 2017-04-29 22:21:21 +09:00
Tatsuhiro Tsujikawa
f2c539dc70 Clarify the effect of nghttp2_option_set_no_http_messaging 2017-04-29 21:00:20 +09:00
Tatsuhiro Tsujikawa
78d7160a99 Treat incoming invalid regular header field as stream error
Previously, the incoming invalid regular header field was ignored by
default.  With this commit, they are now treated as stream error, and
the stream is reset by default.  The error code used is now
PROTOCOL_ERROR, instead of INTERNAL_ERROR.
2017-04-28 23:46:06 +09:00
Tatsuhiro Tsujikawa
196673bbce nghttp: Remove unused short option 'g' 2017-04-28 22:39:12 +09:00
Tatsuhiro Tsujikawa
794d13082c Merge branch 'nghttp-no-verify-peer' 2017-04-28 22:36:23 +09:00
Tatsuhiro Tsujikawa
5f5cf4107e nghttpx: Reseve rcbufs_ 2017-04-28 22:31:09 +09:00
Tatsuhiro Tsujikawa
6f3ec54b9f nghttp: Add -y, --no-verify-peer option to suppress peer verify warn 2017-04-28 09:53:37 +09:00
Tatsuhiro Tsujikawa
58043a6b04 nghttpx: Guard the presence of TLS1_3_VERSION 2017-04-27 23:13:15 +09:00
Tatsuhiro Tsujikawa
a885315ef5 Merge branch 'nghttpx-unrecognized-sni' 2017-04-27 22:57:54 +09:00
Tatsuhiro Tsujikawa
d7581525ac nghttpx: Update TLSv1.3 TLS record overhead 2017-04-27 22:57:06 +09:00
Tatsuhiro Tsujikawa
385068eb91 Merge branch 'altsvc-invalid-callback' 2017-04-27 22:35:25 +09:00
Tatsuhiro Tsujikawa
1085f68018 nghttpx: Return SSL_TLSEXT_ERR_NOACK if server name is not recognized
With this commit, SSL_TLSEXT_ERR_NOACK is returned from
servername_callback, which removes server_name extension from
ServerHello.  CertLookupTree is now used even if the number of server
certificate is one.  It is better to exercise it regularly.
2017-04-27 22:25:58 +09:00
Tatsuhiro Tsujikawa
21af775ce0 Call nghttp2_on_invalid_frame_callback if altsvc validation fails 2017-04-27 18:53:43 +09:00
Tatsuhiro Tsujikawa
bf16fee6e9 Merge pull request #903 from nghttp2/nghttpx-forward-multiple-header-fields
nghttpx: Forward multiple via, xff, and xfp header fields
2017-04-26 22:32:33 +09:00
Tatsuhiro Tsujikawa
2358a2137a Refactor predicate functions 2017-04-26 22:31:43 +09:00
Tatsuhiro Tsujikawa
66baa7dc25 Estimate header block size after predicate function succeeds 2017-04-26 22:15:53 +09:00
Tatsuhiro Tsujikawa
d63b4c1034 nghttpx: Forward multiple via, xff, and xfp header fields
Previously, for Via, X-Forwarded-For, and X-Forwarded-Proto header
field, nghttpx only forwarded the last header field of each.  With
this commit, nghttpx forwards all of them if it is configured to do
so.
2017-04-26 21:23:13 +09:00
Tatsuhiro Tsujikawa
963e220a1c Bump up version number to 1.23.0-DEV 2017-04-24 22:34:13 +09:00
Tatsuhiro Tsujikawa
2f146e4d4c Update manual pages 2017-04-24 21:41:15 +09:00
Tatsuhiro Tsujikawa
f796eede5a Bump up version number to 1.22.0, LT revision to 27:2:13 2017-04-24 21:32:18 +09:00
Tatsuhiro Tsujikawa
c89453be95 Update AUTHORS 2017-04-24 21:29:12 +09:00
Tatsuhiro Tsujikawa
c3f5f5ca36 nghttpx: Clarify --conf option behaviour 2017-04-20 22:25:38 +09:00
Tatsuhiro Tsujikawa
911d12f7c4 nghttpx: Add log when loading configuration file 2017-04-20 22:22:29 +09:00
Tatsuhiro Tsujikawa
34d3c45d35 Update manual pages 2017-04-19 23:03:08 +09:00
Tatsuhiro Tsujikawa
17614312e0 Merge pull request #892 from nghttp2/nghttpx-sni-fwd
nghttpx: SNI based backend server selection
2017-04-19 21:22:15 +09:00
Tatsuhiro Tsujikawa
977779ae8d Merge pull request #896 from nghttp2/nghttpx-add-tls-sni-log-var
nghttpx: Add $tls_sni access log variable
2017-04-19 21:21:01 +09:00
Tatsuhiro Tsujikawa
a2e35a0757 nghttpx: Add $tls_sni access log variable 2017-04-18 22:44:26 +09:00
Tatsuhiro Tsujikawa
a4a2b6403b nghttpx: Use SHRPX_LOGF_TLS_* instead of SHRPX_LOGF_SSL_* 2017-04-18 22:34:08 +09:00
Tatsuhiro Tsujikawa
8ce8e289c9 Merge pull request #895 from nghttp2/nghttpx-rename-ssl-log-vars
nghttpx: Rename ssl_* log variables as tls_*
2017-04-18 22:31:44 +09:00
Tatsuhiro Tsujikawa
03be97e437 nghttpx: Rename ssl_* log variables as tls_*
The exiting ssl_* log variables still work for backward compatibility.
2017-04-18 22:11:05 +09:00
Tatsuhiro Tsujikawa
2c5cf5a82a Merge pull request #894 from nghttp2/nghttpx-fix-path-match
nghttpx: Fix path matching bug
2017-04-18 21:28:21 +09:00
Tatsuhiro Tsujikawa
0a2d1965df nghttpx: Fix path matching bug
Previously, if path is empty or path does not start with "/", nghttpx
did not try to match with wildcard pattern.  This commit fixes it.
2017-04-18 21:03:50 +09:00
Tatsuhiro Tsujikawa
c8a5f1e335 nghttpx: SNI based backend server selection 2017-04-16 23:47:10 +09:00
Tatsuhiro Tsujikawa
5e00cf9620 Update doc 2017-04-14 00:55:31 +09:00
Tatsuhiro Tsujikawa
ce6370e25c Merge pull request #886 from lstefani/patch-1
Update nghttp2_session.c
2017-04-14 00:16:06 +09:00
Tatsuhiro Tsujikawa
3f8c1e4b34 tests: Fix failmalloc tests 2017-04-14 00:00:36 +09:00
lstefani
25cda200be Update nghttp2_session.c
Add missing free call on error in inflight_settings_new().
2017-04-13 10:00:15 -04:00
Tatsuhiro Tsujikawa
a1bc83a2ba Merge pull request #881 from mway/dev/request-priority
Support specifying stream priority via session::submit()
2017-04-12 23:36:40 +09:00
Matt Way
bc3949db9e Support specifying stream priority via session::submit() 2017-04-12 10:07:16 -04:00
Tatsuhiro Tsujikawa
6cfa885207 nghttpx: Remove unused lambda capture 2017-04-12 22:09:44 +09:00
Tatsuhiro Tsujikawa
899588e0b5 Update bash_completion 2017-04-09 16:10:07 +09:00
Tatsuhiro Tsujikawa
49af52a68d Update manual pages 2017-04-09 16:09:44 +09:00
Tatsuhiro Tsujikawa
ec908af19c integration: Use nip.io instead of xip.io 2017-04-09 16:06:37 +09:00
Tatsuhiro Tsujikawa
e61ac4682e Merge branch 'nghttpx-xfp-take2' 2017-04-09 16:02:53 +09:00
Tatsuhiro Tsujikawa
4d10dce61d nghttpx: Only send SCT for leaf certificate 2017-04-09 14:38:18 +09:00
Tatsuhiro Tsujikawa
c569830dfc Merge branch 'nghttpx-tls13-sct' 2017-04-09 14:24:00 +09:00
Tatsuhiro Tsujikawa
2d9fd87029 nghttpx: Enable signed_certificate_timestamp extension for TLSv1.3 2017-04-09 14:11:49 +09:00
Tatsuhiro Tsujikawa
2670bfb8ba integration: Add tests for X-Forwarded-Proto handling 2017-04-08 18:46:37 +09:00
Tatsuhiro Tsujikawa
cc9190ab37 nghttpx: Add options for X-Forwarded-Proto header field
This commit adds 2 new options to handle X-Forwarded-Proto header
field.  The --no-add-x-forwarded-proto option makes nghttpx not to
append X-Forwarded-Proto value.  The
--no-strip-incoming-x-forwarded-proto option prevents nghttpx from
stripping the header field from client.

Previously, nghttpx always strips incoming header field, and set its
own header field.  This commit preserves this behaviour, and adds
additional knobs.
2017-04-08 18:46:36 +09:00
Tatsuhiro Tsujikawa
980570de71 Revert "nghttpx: Add options for X-Forwarded-Proto header field"
This reverts commit 8c0b2c684a.
2017-04-08 18:37:54 +09:00
Tatsuhiro Tsujikawa
ef92b54db3 Revert "integration: Add tests for X-Forwarded-Proto handling"
This reverts commit 6aa581d2f0.
2017-04-08 18:34:10 +09:00
Tatsuhiro Tsujikawa
0130124cea Revert "doc: Add migration doc for nghttpx"
This reverts commit 82b326e684.
2017-04-08 18:34:07 +09:00
Tatsuhiro Tsujikawa
e2a7e867f9 integration: Add more tests for 204 status code 2017-04-07 22:36:46 +09:00
Tatsuhiro Tsujikawa
32ce0ce5d9 Merge branch 'nghttpx-fix-204-handling' 2017-04-07 22:11:39 +09:00
Tatsuhiro Tsujikawa
28082ff5f5 integration: Add tests for 204 status code 2017-04-07 21:46:33 +09:00
Tatsuhiro Tsujikawa
46ccc4332c nghttpx: Fix bug that 204 from h1 backend is always treated as error 2017-04-07 21:45:13 +09:00
Tatsuhiro Tsujikawa
3a1217e667 Update bash_completion 2017-04-06 20:26:32 +09:00
Tatsuhiro Tsujikawa
39fd0c1278 Update manual pages 2017-04-06 20:26:08 +09:00
Tatsuhiro Tsujikawa
4e6bd54dd1 Merge branch 'nghttpx-single-process' 2017-04-06 20:18:33 +09:00
Tatsuhiro Tsujikawa
5c9f46a6b0 Merge branch 'nghttp-verify-server-certificate' 2017-04-06 20:17:29 +09:00
Tatsuhiro Tsujikawa
7d53866157 Update doc 2017-04-06 20:14:49 +09:00
Tatsuhiro Tsujikawa
9a2e948c42 Update doc
Add section to promote the build from tar archives.
2017-04-06 20:13:00 +09:00
Tatsuhiro Tsujikawa
223e971c7e nghttpx: Add --single-process option
With --single-process option, nghttpx will run in a single process
mode where master and worker are unified into one process.  nghttpx
still spawns additional process for neverbleed.  In the single process
mode, signal handling is disabled.
2017-04-06 20:02:57 +09:00
Tatsuhiro Tsujikawa
df814223ff Merge branch 'nghttpx-xfp' 2017-04-06 19:36:27 +09:00
Tatsuhiro Tsujikawa
82b326e684 doc: Add migration doc for nghttpx 2017-04-06 19:24:02 +09:00
Tatsuhiro Tsujikawa
6aa581d2f0 integration: Add tests for X-Forwarded-Proto handling 2017-04-06 19:20:08 +09:00
Tatsuhiro Tsujikawa
8c0b2c684a nghttpx: Add options for X-Forwarded-Proto header field
This commit adds 2 new options to handle X-Forwarded-Proto header
field.  The --add-x-forwarded-proto option makes nghttpx append
X-Forwarded-Proto value.  The --strip-incoming-x-forwarded-proto
option makes nghttpx to strip the header field from client.

Previously, nghttpx always strips incoming header field, and set its
own header field.  This commit changes this behaviour.  Now nghttpx
does not strip, and append X-Forwarded-Proto header field by default.
The X-Forwarded-For, and Forwarded header fields are also handled in
the same way.  To recover the old behaviour, use
--add-x-forwarded-proto and --strip-incoming-x-forwarded-proto
options.
2017-04-06 19:17:36 +09:00
Tatsuhiro Tsujikawa
62324781bd integration: Close channel instead of writing struct 2017-04-05 23:57:33 +09:00
Tatsuhiro Tsujikawa
7ae0b2dc09 nghttp: Verify server certificate and show warning if it fails 2017-04-01 17:49:57 +09:00
Tatsuhiro Tsujikawa
058122b804 nghttpx: Rename shrpx_ssl.{h,cc} as shrpx_tls.{h,cc}
The namespace shrpx::ssl was also renamed as shrpx::tls.
2017-04-01 15:12:28 +09:00
Tatsuhiro Tsujikawa
69f63c529d src: Rename ssl.{h,cc} as tls.{h,cc}
nghttp2::ssl namespace was also renamed as nghttp2::tls.
2017-04-01 15:12:28 +09:00
Tatsuhiro Tsujikawa
e17a6b29b6 nghttpx: Use 502 as server error code 2017-04-01 14:04:55 +09:00
Tatsuhiro Tsujikawa
b12c2a13c0 nghttpx: Fail handshake if server certificate verification fails
Previously, we drop connection if server certificate verification
fails after handshake.  With this commit, we fail handshake if that
happens.
2017-04-01 13:41:41 +09:00
Tatsuhiro Tsujikawa
236c835abc nghttpx: Don't enable SSL_MODE_AUTO_RETRY since we do non-blocking I/O 2017-04-01 12:05:07 +09:00
Tatsuhiro Tsujikawa
b41a5afe04 Merge branch 'fix-asio-client-ping' 2017-03-31 22:20:07 +09:00
Tatsuhiro Tsujikawa
ad338bfa44 asio: Fix crash if connect takes longer time than ping interval 2017-03-31 21:17:57 +09:00
Tatsuhiro Tsujikawa
a899522679 asio: Fix compile error 2017-03-31 21:14:08 +09:00
Tatsuhiro Tsujikawa
b9b58c781e nghttpx: Avoid extra TLS handshake calls 2017-03-30 22:23:55 +09:00
Tatsuhiro Tsujikawa
aa1eec4642 nghttpx: Cache client side session inside openssl callback 2017-03-30 21:07:58 +09:00
Tatsuhiro Tsujikawa
0c8d9469ea nghttpx: Use SSL_CTX_set_early_data_enabled with boringssl 2017-03-27 23:58:49 +09:00
Tatsuhiro Tsujikawa
079e1bdffc Revert "nghttpx: Use SSL_CTX_set_early_data_enabled with boringssl"
This reverts commit b4337d1b54.
2017-03-27 23:47:24 +09:00
Tatsuhiro Tsujikawa
b4337d1b54 nghttpx: Use SSL_CTX_set_early_data_enabled with boringssl 2017-03-27 23:29:28 +09:00
Tatsuhiro Tsujikawa
e6a11c5e12 Bump up version number to 1.22.0-DEV 2017-03-27 23:13:56 +09:00
Tatsuhiro Tsujikawa
dbe287ff5e nghttpx: Print version number with -v option 2017-03-27 22:49:53 +09:00
Tatsuhiro Tsujikawa
61dc1a7c62 Update man pages 2017-03-27 22:48:00 +09:00
Tatsuhiro Tsujikawa
dc1e0c0195 Bump up version number to 1.21.0, LT revision to 27:1:13 2017-03-27 22:45:23 +09:00
Tatsuhiro Tsujikawa
041531458b Merge pull request #858 from nghttp2/nghttpx-ai-addrconfig
nghttpx: Retry getaddrinfo without AI_ADDRCONFIG
2017-03-27 22:37:07 +09:00
Tatsuhiro Tsujikawa
1374bb81fd nghttpx: Enable X25519 with boringssl 2017-03-27 21:18:44 +09:00
Tatsuhiro Tsujikawa
f41ac103d3 nghttpx: Retry getaddrinfo without AI_ADDRCONFIG 2017-03-27 00:20:42 +09:00
Tatsuhiro Tsujikawa
f6301714db nghttpx: Avoid copy of std::mt19937 which is huge 2017-03-26 21:14:34 +09:00
Tatsuhiro Tsujikawa
7dc39b1ee9 nghttpx: Failing to listen on server socket is fatal error 2017-03-26 11:04:45 +09:00
Tatsuhiro Tsujikawa
696a7ce407 Merge pull request #856 from nghttp2/escape-access-log
Escape access log
2017-03-25 23:36:02 +09:00
Tatsuhiro Tsujikawa
d28d788623 Merge pull request #853 from PiotrSikora/ssl_ctx_set_proto_versions
src: BoringSSL supports SSL_CTX_set_{min,max}_proto_version.
2017-03-25 19:45:12 +09:00
Tatsuhiro Tsujikawa
99122ee7bb nghttpx: Find illegal character in path for SPDY CONNECT method 2017-03-25 19:18:35 +09:00
Tatsuhiro Tsujikawa
19ee7ec794 nghttpx: Escape certain characters in access log
The certain characters coming from client are now escaped with "\xNN"
where NN is the ascii code of the character in hex notation.
2017-03-25 19:17:24 +09:00
Piotr Sikora
cd9ec0d20f src: BoringSSL supports SSL_CTX_set_{min,max}_proto_version.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2017-03-23 19:26:49 -07:00
Tatsuhiro Tsujikawa
e77883e980 nghttpx: Fix typo 2017-03-22 22:53:46 +09:00
Tatsuhiro Tsujikawa
0994c92550 nghttpx: Don't cache session server side if TLS version is 1.3 2017-03-22 21:34:13 +09:00
Tatsuhiro Tsujikawa
465c7208cc nghttpx: Don't look up session ID if length is 0 2017-03-22 21:33:31 +09:00
Tatsuhiro Tsujikawa
4f9f181f07 Merge pull request #848 from nghttp2/asio-client-ping
asio: client: Send PING after 30 seconds idle
2017-03-22 21:20:23 +09:00
Tatsuhiro Tsujikawa
b7e7a4bf26 asio: client: Send PING after 30 seconds idle 2017-03-20 18:37:56 +09:00
Tatsuhiro Tsujikawa
c7df65309b nghttpx: Ignore further input if connection is going to close 2017-03-19 13:24:12 +09:00
Tatsuhiro Tsujikawa
26900262f3 Revert "nghttpx: Attempt to avoid TCP RST on socket closure on Linux"
This reverts commit f69b52b1aa.
2017-03-18 22:43:30 +09:00
Tatsuhiro Tsujikawa
9b5ce36368 nghttpx: Reset write timer on write 2017-03-18 21:33:00 +09:00
Tatsuhiro Tsujikawa
f69b52b1aa nghttpx: Attempt to avoid TCP RST on socket closure on Linux 2017-03-18 00:59:26 +09:00
Tatsuhiro Tsujikawa
1e1d908c12 nghttpx: Eliminate global std::random_device 2017-03-17 22:25:10 +09:00
Tatsuhiro Tsujikawa
6c69d675da nghttpx: Should take reference 2017-03-17 22:24:32 +09:00
Tatsuhiro Tsujikawa
feabd6f739 nghttpx: Delete unused delete_bio_method 2017-03-15 23:37:39 +09:00
Tatsuhiro Tsujikawa
1ea590c364 nghttpx: Return new BIO_METHOD object with OpenSSL < 1.1.0 2017-03-15 23:36:38 +09:00
Tatsuhiro Tsujikawa
b21779e685 nghttpx: Use raw pointer for apis 2017-03-15 23:33:07 +09:00
Tatsuhiro Tsujikawa
12a4e7c3a2 src: Use raw pointer for ssl_global_locks 2017-03-15 23:24:28 +09:00
Tatsuhiro Tsujikawa
799a76de74 nghttpx: Lesser usage of DIE 2017-03-15 23:14:07 +09:00
Tatsuhiro Tsujikawa
b1fee8ff63 nghttpx: Use raw pointer for config 2017-03-15 23:13:14 +09:00
Tatsuhiro Tsujikawa
9cc223d419 nghttpx: Use constexpr 2017-03-15 23:12:50 +09:00
Tatsuhiro Tsujikawa
20edd64301 nghttpx: Handle return value of write(2) 2017-03-15 21:28:53 +09:00
Tatsuhiro Tsujikawa
9aee518352 nghttpx: Effectively revert ff64f64e1d 2017-03-15 00:07:57 +09:00
Tatsuhiro Tsujikawa
6ca515ea70 Fix sphinx warning about README markup 2017-03-12 23:46:21 +09:00
Tatsuhiro Tsujikawa
51b933c5f0 src: Use "Modern compatibility" ciphers by default 2017-03-11 23:58:52 +09:00
Tatsuhiro Tsujikawa
3f13d33543 Merge branch 'eliminate-u-macro' 2017-03-11 18:56:23 +09:00
Tatsuhiro Tsujikawa
85a12429ee Eliminate _U_ macro
Instead use (void)VAR for better compiler compatibility.
2017-03-11 18:45:49 +09:00
Tatsuhiro Tsujikawa
3e0e3f5459 src: Fix typo 2017-03-10 23:10:13 +09:00
Tatsuhiro Tsujikawa
801869a5d5 Merge branch 'fix-nghttp2_session_want_write' 2017-03-07 23:33:58 +09:00
Tatsuhiro Tsujikawa
54f4b85beb Fix nghttp2_session_want_write
This commit fixes the bug in nghttp2_session_want_write.  Previously,
it may return 0 if there is pending frames after GOAWAY frame is
submitted.

To avoid the situation that nghttp2_session_want_write keeps returning
nonzero after GOAWAY and the number of active streams is 0 (e.g., keep
receiving SETTINGS or PING), nghttp2_session_mem_recv now just
swallows the input data without parsing in this case.
2017-03-07 22:55:39 +09:00
Tatsuhiro Tsujikawa
fa074145a4 Merge pull request #788 from nghttp2/nghttpx-h2-proxy-pattern-match
nghttpx: Enable backend pattern matching with http2-proxy
2017-03-06 21:22:34 +09:00
Tatsuhiro Tsujikawa
b2d6550179 src: BoringSSL only requires CRYPTO_library_init 2017-03-05 21:36:52 +09:00
Tatsuhiro Tsujikawa
62dd1f5177 src: OpenSSL 1.1.0 does not require explicit initialization 2017-03-05 19:57:06 +09:00
Tatsuhiro Tsujikawa
dc7c12d474 Document pkg-config path usage 2017-03-02 23:09:56 +09:00
Tatsuhiro Tsujikawa
a6dda5f91c nghttpx: Log rstatus in hex 2017-03-01 23:21:11 +09:00
Tatsuhiro Tsujikawa
c1f7795dd6 nghttpx: Set close-on-exec flag on listener in worker process 2017-03-01 23:20:36 +09:00
Tatsuhiro Tsujikawa
4989e6e419 nghttpx: Don't call functions which are not async-signal-safe
.. after fork but before execv in multithreaded process.
2017-03-01 22:42:30 +09:00
Tatsuhiro Tsujikawa
d4963bcd32 Merge pull request #823 from alagoutte/gcc7
nghtt2_gzip: fix this statement may fall through [-Werror=implicit-fa…
2017-02-28 23:21:29 +09:00
Alexis La Goutte
d725255784 nghttp2_gzip: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7 2017-02-27 21:38:55 +01:00
Tatsuhiro Tsujikawa
5f4159a0d7 tests: Fix uninitialized bug 2017-02-27 21:26:12 +09:00
Tatsuhiro Tsujikawa
0a2a5e6604 Bump up version number to 1.21.0-DEV 2017-02-26 19:16:33 +09:00
Tatsuhiro Tsujikawa
acd05f2aa5 Update bash_completion 2017-02-26 18:36:15 +09:00
Tatsuhiro Tsujikawa
bb7718a64a Update man pages 2017-02-26 18:35:58 +09:00
Tatsuhiro Tsujikawa
e59fc725ab Bump up version number to 1.20.0, and LT revision to 27:0:13 2017-02-26 18:32:23 +09:00
Tatsuhiro Tsujikawa
4fcd0fc144 Update AUTHORS 2017-02-26 18:29:27 +09:00
Tatsuhiro Tsujikawa
373be22d7e nghttpx: Simpler 2017-02-23 22:32:04 +09:00
Tatsuhiro Tsujikawa
b647a7c5b7 nghttpx: Simplify code using parse_uint 2017-02-23 22:22:49 +09:00
Tatsuhiro Tsujikawa
46ba9e080d Update doc 2017-02-22 21:06:45 +09:00
Tatsuhiro Tsujikawa
e1b8317ae8 nghttpx: Strip version number from server header field 2017-02-22 20:56:40 +09:00
Tatsuhiro Tsujikawa
ea67864e08 Remove SPDY build instruction for android 2017-02-21 22:32:14 +09:00
Tatsuhiro Tsujikawa
6b286e0d94 Add SPDY support deprecation warning in README 2017-02-21 22:31:51 +09:00
Tatsuhiro Tsujikawa
d10ea5ea06 Disable spdylay detection by default 2017-02-21 22:31:23 +09:00
Tatsuhiro Tsujikawa
2af57c3cfc nghttpx: Add --single-worker option
Previously, nghttpx will use only one single thread inside the worker
process if --workers=1 (this is default).  If --workers=N, N > 1, we
use additional threads for accepting connections, or API request
processing, etc.

With this commit, we use the same processing model for N > 1 even if N
== 1.  To restore the original single thread execution mode,
--single-worker option is added.  If threading is disabled
--single-worker is always true.
2017-02-21 22:19:34 +09:00
Tatsuhiro Tsujikawa
0c8b1a4f74 nghttpx: Fix bug that send_reply does not participate graceful shutdown 2017-02-21 21:27:57 +09:00
Tatsuhiro Tsujikawa
9d16292fe4 nghttpx: Add --frontend-max-requests option 2017-02-20 23:36:50 +09:00
Tatsuhiro Tsujikawa
e2b9590c0f nghttpx: Enable stream-write-timeout by default 2017-02-20 22:18:49 +09:00
Tatsuhiro Tsujikawa
24fb640a55 nghttpx: Fix stream wtimer handling 2017-02-20 22:08:39 +09:00
Tatsuhiro Tsujikawa
e6a05cb66d Update bash_completion 2017-02-20 00:17:00 +09:00
Tatsuhiro Tsujikawa
12f9b09845 Update man pages 2017-02-20 00:16:44 +09:00
Tatsuhiro Tsujikawa
102b98813f Merge branch 'nghttpx-configrevision-api' 2017-02-20 00:15:33 +09:00
Tatsuhiro Tsujikawa
1f55e5d34d nghttpx: Document configrevision API 2017-02-19 23:40:06 +09:00
Tatsuhiro Tsujikawa
5618e1bbc9 integration: Add configrevision API tests 2017-02-19 23:40:06 +09:00
Tatsuhiro Tsujikawa
450ffaa6f0 nghttpx: Add configrevision API endpoint
This commit adds configuration revision, which is considered opaque
string, and changes after reloading configuration with SIGHUP.  This
revision is returned as a response to configrevision API endpoint.
This allows external application to know whether nghttpx has finished
reloading new configuration or not.  Note that this revision does not
change on backendconfig API calls.
2017-02-19 23:40:06 +09:00
Tatsuhiro Tsujikawa
dc15832030 nghttpx: Refactor API downstream connection to allow more endpoints 2017-02-19 22:49:53 +09:00
Tatsuhiro Tsujikawa
0797e89a90 Merge pull request #819 from nghttp2/nghttpx-https-redirect
nghttpx: Redirect to HTTPS URI with redirect-if-no-tls parameter in backend option
2017-02-19 21:02:32 +09:00
Tatsuhiro Tsujikawa
9f1543f81e integration: Add https redirect tests 2017-02-18 22:32:45 +09:00
Tatsuhiro Tsujikawa
a7c780a732 nghttpx: Redirect to HTTPS URI with redirect-if-not-tls param
This commit removes frontend-tls parameter, and adds
redirect-if-not-tls parameter parameter to --backend option.  nghttpx
now responds to the request with 308 status code to redirect the
request to https URI if frontend connection is not TLS encrypted, and
redirect-if-no-tls parameter is used in --backend option.  The port
number in Location header field is 443 by default (thus omitted), but
it can be configurable using --redirect-https-port option.
2017-02-18 22:32:27 +09:00
Tatsuhiro Tsujikawa
1bd6893084 integration: Fix deprecation warnings 2017-02-18 22:29:59 +09:00
Tatsuhiro Tsujikawa
ae21130b13 integration: Redirect nghttpx stdout/stderr to test driver's stdout/stderr 2017-02-18 22:29:25 +09:00
Tatsuhiro Tsujikawa
e06ed85747 nghttpx: Fix travis gcc compile error 2017-02-17 00:42:25 +09:00
Tatsuhiro Tsujikawa
83fd72c97e nghttpx: Use std::chrono::duration_cast 2017-02-17 00:33:26 +09:00
Tatsuhiro Tsujikawa
ace40f298d nghttpx: Update log time stamp in millisecond interval 2017-02-17 00:18:07 +09:00
Tatsuhiro Tsujikawa
1133cc0bbc nghttpx: Don't call get_config() repeatedly 2017-02-16 23:41:23 +09:00
Tatsuhiro Tsujikawa
6960039aee nghttpx: C++ style cast 2017-02-16 23:02:19 +09:00
Tatsuhiro Tsujikawa
bf5eeb831b nghttpx: Better error message when private key and certificate are missing 2017-02-16 23:00:25 +09:00
Tatsuhiro Tsujikawa
e5b84fad09 nghttpx: Fix bug that old config is used during reloading config 2017-02-16 22:46:22 +09:00
Tatsuhiro Tsujikawa
cfb39171a7 nghttpx: Remove redundant StringRef ctor invocation 2017-02-16 22:45:55 +09:00
Tatsuhiro Tsujikawa
2f6e1ac336 Merge pull request #816 from nghttp2/tls13
Add TLSv1.3 support
2017-02-15 23:23:25 +09:00
Tatsuhiro Tsujikawa
9e8d9d658a src: Enable TLSv1.3 if OpenSSL supports it
If OpenSSL supports TLSv1.3, enable it by default for all applications
under src.  BoringSSL can work at the moment although it does not
unlock all the features nghttpx offers.  OpenSSL's TLSv1.3 support is
still WIP at the time of writing.
2017-02-15 22:34:53 +09:00
Tatsuhiro Tsujikawa
6ecfac6954 nghttpx: Parse default TLS min and max versions from string 2017-02-15 21:28:40 +09:00
Tatsuhiro Tsujikawa
368775c2ed Merge pull request #814 from alagoutte/pvs
nghttp2_session: fix The 'then' statement is equivalent to the subseq…
2017-02-15 21:15:43 +09:00
Tatsuhiro Tsujikawa
1e9a094edd Merge pull request #811 from nghttp2/nghttp2_option_no_closed_streams
Add nghttp2_option_no_closed_streams
2017-02-15 21:11:17 +09:00
Alexis La Goutte
ceb4dcf3b2 nghttp2_session: fix The 'then' statement is equivalent to the subsequent code fragment found by PVS Studio (V523) 2017-02-14 17:40:51 +01:00
Tatsuhiro Tsujikawa
d2ef80fe3a Update bash_completion 2017-02-14 22:36:11 +09:00
Tatsuhiro Tsujikawa
79ae5aed67 Update man pages 2017-02-14 22:35:54 +09:00
Tatsuhiro Tsujikawa
56e86cd944 src: h2 requires >= TLSv1.2 2017-02-14 22:21:35 +09:00
Tatsuhiro Tsujikawa
19a311ad62 Merge branch 'nghttpx-tls-min-max-proto-version' 2017-02-14 22:17:13 +09:00
Tatsuhiro Tsujikawa
b36e53cccd nghttpx: Specify TLS protocol by version range
This commit deprecates --tls-proto-list option, and adds 2 new
options: --tls-min-proto-version and --tls-max-proto-version to
specify minimum and maximum protocol version respectively.  Versions
between the two are enabled.  The deprecated --tls-proto-list has
empty default value, and acts like enabling only specific protocol
versions in the range for now.
2017-02-14 00:01:09 +09:00
Tatsuhiro Tsujikawa
f3a5a0a0ec Add nghttp2_option_no_closed_streams
nghttp2_option_no_closed_streams controls whether closed streams are
retained or not.  If nonzero is passed to that function's parameter
val, a session does not retain closed streams.  It may hurt the shape
of priority tree, but can save memory.
2017-02-13 22:33:29 +09:00
Tatsuhiro Tsujikawa
001d45efad Merge branch 'nghttpx-graceful-sigusr2' 2017-02-12 23:52:03 +09:00
Tatsuhiro Tsujikawa
56c455bca4 nghttpx: Send SIGQUIT to the original master process
Previously, after sending SIGUSR2 to the original master process, and
the new master process gets ready, user has to send SIGQUIT to the
original master process to shut it down gracefully.  With this commit,
the new master process sends SIGQUIT to the original master process
when it is ready to serve requests, eliminating for user to send
SIGQUIT manually.

This works nicely with systemd, because now you can replace nghttpx
binary with new one by "systemctl kill -s USR2 --kill-who=main
nghttpx".
2017-02-12 23:29:44 +09:00
Tatsuhiro Tsujikawa
4bf3cb2cc0 Revert "nghttpx: Don't capitalize h1 header fields"
This reverts commit f994664934.
2017-02-12 23:27:38 +09:00
Tatsuhiro Tsujikawa
c78528d54b nghttpx: Restrict HTTP major and minor in 0 or 1 2017-02-11 18:42:29 +09:00
Tatsuhiro Tsujikawa
f994664934 nghttpx: Don't capitalize h1 header fields 2017-02-11 18:41:52 +09:00
Tatsuhiro Tsujikawa
44e290da66 clang-format 2017-02-11 13:08:08 +09:00
Tatsuhiro Tsujikawa
8aed101585 Merge pull request #805 from pakdel/graceful_stop
graceful stop of nghttp2::asio_http2::server::http2
2017-02-11 13:07:10 +09:00
Tatsuhiro Tsujikawa
54ba1bebf2 Update doc 2017-02-10 22:40:57 +09:00
Tatsuhiro Tsujikawa
e44c58282e Drop privilege of neverbleed daemon first 2017-02-10 17:43:19 +09:00
Tatsuhiro Tsujikawa
c02b1041d9 nghttpx: Use nullptr instead of NULL 2017-02-10 17:14:47 +09:00
Tatsuhiro Tsujikawa
0d20e07436 Show SYSTEMD_CFLAGS in summary 2017-02-10 17:13:34 +09:00
Tatsuhiro Tsujikawa
b7f956c967 Add --with-systemd option to configure 2017-02-10 17:13:16 +09:00
Tatsuhiro Tsujikawa
786f52a81c Document about systemd support in README 2017-02-10 17:02:52 +09:00
Tatsuhiro Tsujikawa
23209baaf5 clang-format 2017-02-10 17:02:46 +09:00
Tatsuhiro Tsujikawa
9d2503f9c0 Merge pull request #802 from zdzichu/master
nghttpx: add systemd support
2017-02-10 16:17:01 +09:00
Amir Pakdel
1c31213aef More graceful stop of nghttp2::asio_http2::server::http2
Explicit io_service::stop() will prevent running streams from
finishing their task. That means if there are already reposnes
that we have called end(std::string) on them and they have not
finished sending back their data, they will be closed with a
NGHTTP2_INTERNAL_ERROR
Instead, we can stop accepting connections and destroy all
io_service::work objects to signals end of work.
2017-02-09 23:34:19 -05:00
Tomasz Torcz
fdb75ba5fe nghttpx: add systemd support
Add systemd's Type=notify support by sending information about
 master process PID around forks.
  Add some hardening option to service unit.
2017-02-09 18:58:00 +01:00
Tatsuhiro Tsujikawa
8f888b29bd clang-format 2017-02-09 21:00:47 +09:00
clemahieu
298808f276 Holding more shared_ptrs instead of raw ptrs to make sure called objects don't get deleted. 2017-02-09 21:00:11 +09:00
Tatsuhiro Tsujikawa
a231874e1e Merge branch 'nghttpx-certs-per-sigalg' 2017-02-08 23:36:23 +09:00
Tatsuhiro Tsujikawa
2101f4ae3f Merge branch 'mruby-send-1xx' 2017-02-08 22:18:11 +09:00
Tatsuhiro Tsujikawa
4a06f9684f nghttpx: Fix crash on SIGHUP with multi thread configuration 2017-02-08 22:14:23 +09:00
Tatsuhiro Tsujikawa
5f31c09410 Mention about nghttp2_data_source_read_length_callback 2017-02-08 00:40:47 +09:00
Tatsuhiro Tsujikawa
9a85c5264a nghttpx: Send 1xx non-final response using mruby script 2017-02-08 00:30:03 +09:00
Tatsuhiro Tsujikawa
fd475e4b2f Merge branch 'oss-fuzz' 2017-02-07 00:28:24 +09:00
Tatsuhiro Tsujikawa
5dc1d116c9 fuzz: Add README 2017-02-06 23:13:23 +09:00
Tatsuhiro Tsujikawa
c566d3f475 Add fuzzer for oss-fuzz 2017-02-06 22:14:49 +09:00
Tatsuhiro Tsujikawa
68a724cf7b nghttpx: Select certificate by client's supported signature algo
nghttpx supports multiple certificates using --subcert option.
Previously, SNI hostname is used to select certificate.  With this
commit, signature algorithm presented by client is also taken into
consideration.  nghttpx now accepts certificates which share the same
hostname (CN, SAN), but have different signature algorithm (e.g.,
ECDSA+SHA256, RSA+SHA256).

Currently, this feature requires OpenSSL >= 1.0.2.  BoringSSL, and
LibreSSL do not work since they lack required APIs.
2017-02-04 23:37:24 +09:00
Tatsuhiro Tsujikawa
779ec50e73 Merge pull request #795 from clemahieu/close_stream_iterator
close_stream erases from streams_ while it's being iterated over.
2017-02-04 11:37:43 +09:00
Tatsuhiro Tsujikawa
aad3e275d1 Merge branch 'clemahieu-acceptor_infinite_loop' 2017-02-04 11:35:43 +09:00
Tatsuhiro Tsujikawa
1649948e78 asio: Add curly brackets to avoid possible well known issue 2017-02-04 11:33:21 +09:00
clemahieu
6d3e010ae7 Infinite loop in acceptor handler. 2017-02-04 11:31:12 +09:00
Tatsuhiro Tsujikawa
7dddac081e clang-format 2017-02-04 11:29:10 +09:00
Tatsuhiro Tsujikawa
588dd33241 Merge branch 'worenga-github-pr-preload' 2017-02-04 11:28:53 +09:00
clemahieu
f0b6b9508d close_stream erases from streams_ while it's being iterated over.
The destructor will already clean this structure up.
2017-02-03 01:36:18 -06:00
Benedikt Christoph Wolters
14ccb24be5 add support for link rel="preload" for --get-assets 2017-02-01 15:54:15 +01:00
Tatsuhiro Tsujikawa
025ec85144 Merge pull request #790 from nghttp2/nghttpx-backend-frontend-tls-parameter
nghttpx: Add frontend-tls parameter to backend to require client TLS
2017-01-31 21:49:51 +09:00
Tatsuhiro Tsujikawa
bd97886d8e nghttpx: Use stack allocated buffer instead of making std::string 2017-01-29 22:11:33 +09:00
Tatsuhiro Tsujikawa
0b1ddad62b nghttpx: Add frontend-tls parameter to backend to require client TLS 2017-01-28 22:19:14 +09:00
Tatsuhiro Tsujikawa
540853bde8 nghttpx: Fix typo 2017-01-28 22:18:17 +09:00
Tatsuhiro Tsujikawa
c757f7d848 nghttpx: Recommend POST for backendconfig API request 2017-01-28 17:54:00 +09:00
Tatsuhiro Tsujikawa
052f3a3871 Update doc 2017-01-26 23:40:12 +09:00
Tatsuhiro Tsujikawa
2ae83e871b Merge branch 'Sp1l-master' 2017-01-26 20:36:57 +09:00
Tatsuhiro Tsujikawa
1cc08c0a51 nghttpx: Show warning if PSK options are used but not supported 2017-01-26 20:34:58 +09:00
Bernard Spil
16be89f9cc nghttpx: Don't build PSK features with LibreSSL
LibreSSL removed PSK

Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
2017-01-26 20:21:55 +09:00
Tatsuhiro Tsujikawa
3ddc446ba2 nghttpx: Enable backend pattern matching with http2-proxy 2017-01-26 01:04:27 +09:00
Tatsuhiro Tsujikawa
b72c5f104e h2load: Fix wrong req_stat updates 2017-01-26 00:26:35 +09:00
Tatsuhiro Tsujikawa
7e6eb7e02a h2load: Explicitly count the number of requests left and inflight 2017-01-26 00:16:12 +09:00
Tatsuhiro Tsujikawa
712b08e8ed Bump up version number to 1.20.0-DEV 2017-01-25 20:50:21 +09:00
Tatsuhiro Tsujikawa
fbf156d22d Update man pages 2017-01-25 20:30:16 +09:00
Tatsuhiro Tsujikawa
965a0e87e5 Bump up version number to 1.19.0, LT revision to 26:4:12 2017-01-25 20:23:37 +09:00
Tatsuhiro Tsujikawa
2b55ca1ce6 Update AUTHORS 2017-01-25 20:22:05 +09:00
Tatsuhiro Tsujikawa
534c01896c Update bash_completion 2017-01-24 23:05:53 +09:00
Tatsuhiro Tsujikawa
c25197ac40 Update man pages 2017-01-24 23:05:39 +09:00
Tatsuhiro Tsujikawa
becae65257 Fix leak 2017-01-24 22:59:01 +09:00
Tatsuhiro Tsujikawa
ba9f2c3ae2 Compile with Android NDK r13b using clang 2017-01-23 00:32:51 +09:00
Tatsuhiro Tsujikawa
0387525b77 Update doc 2017-01-23 00:30:56 +09:00
Tatsuhiro Tsujikawa
5311185333 nghttpx: Define the maximum number of digits in uint64_t 2017-01-22 22:33:52 +09:00
Tatsuhiro Tsujikawa
2fc2a27ac1 nghttpx: Use char instead of char[] if possible 2017-01-22 22:28:14 +09:00
Tatsuhiro Tsujikawa
db938afd66 nghttpx: Increase default backlog 2017-01-20 23:06:24 +09:00
Tatsuhiro Tsujikawa
89ddc47616 nghttpx: More constexpr 2017-01-20 23:04:48 +09:00
Tatsuhiro Tsujikawa
90b7849af1 Merge branch 'nghttpx-optimize-accesslog' 2017-01-20 23:03:52 +09:00
Tatsuhiro Tsujikawa
3176e872b3 nghttpx: Efficient access.log writer
Write integer to log buffer directly to improve efficiency.  Remove
unused function templates.  Use [first, last) style arguments for
copy() function templates.
2017-01-20 22:42:41 +09:00
Tatsuhiro Tsujikawa
16206d5f67 nghttp: Use std::unique_ptr for html_parser 2017-01-18 00:34:39 +09:00
Tatsuhiro Tsujikawa
0f33749790 nghttp: Take into account scheme and port when parsing HTML links
Previously, when parsing HTML links, we only take into account
overridden host.  But we actually need more variables to consider.  In
this commit, we take into account overridden scheme, host, and port to
parse HTML links.
2017-01-18 00:29:51 +09:00
Tatsuhiro Tsujikawa
5e7e4c0cc0 nghttp: config.headers should be inspected rather than req->req_nva 2017-01-17 23:00:37 +09:00
Tatsuhiro Tsujikawa
25503ad763 Merge branch 'worenga-fix-get-assets' 2017-01-17 21:15:40 +09:00
Benedikt Christoph Wolters
8f513fceca Fix authority for --get-assets if IP adress is used in conjunction with user-defined :authority header 2017-01-17 21:14:36 +09:00
Tatsuhiro Tsujikawa
91af4ed70d Merge branch 'nghttpx-accesslog-write-early' 2017-01-14 11:39:58 +09:00
Tatsuhiro Tsujikawa
685e926494 nghttpx: Add --accesslog-write-early option
--accesslog-write-early option is analogous to HAProxy's logasap.  If
used, nghttpx writes access log when response header fields are
received from backend rather than when request transaction finishes.
2017-01-13 22:12:21 +09:00
Tatsuhiro Tsujikawa
a2afd393ed nghttpx: Remove field from LogSpec which can be got from Downstream 2017-01-11 22:30:12 +09:00
Tatsuhiro Tsujikawa
4e9098bccf Merge branch 'nghttpx-accesslog-timestamp' 2017-01-11 21:14:12 +09:00
Tatsuhiro Tsujikawa
33aa327ef5 nghttpx: Fix access.log timestamp
access.log timestamp is now when request header fields are received,
rather than when access log is written.
2017-01-11 20:47:17 +09:00
Tatsuhiro Tsujikawa
9067ff5eee nghttp: Use nghttp2::ssl::DEFAULT_CIPHER_LIST 2017-01-09 23:50:38 +09:00
Tatsuhiro Tsujikawa
efeede4192 nghttpx: Fix typo 2017-01-09 23:49:10 +09:00
Tatsuhiro Tsujikawa
6a8749873f nghttpx: Add detailed TLS connection logging 2017-01-09 23:32:35 +09:00
Tatsuhiro Tsujikawa
b1b8308555 Update doc 2017-01-09 22:22:04 +09:00
Tatsuhiro Tsujikawa
9b574a5a76 nghttpx: Fix typo 2017-01-09 22:19:19 +09:00
Tatsuhiro Tsujikawa
0567f1f038 Add constexpr to StringRef(const CharT *, size_t) 2017-01-09 21:15:53 +09:00
Tatsuhiro Tsujikawa
4be5de1163 src: Move log related functions from util.cc to shrpx_log.cc 2017-01-09 19:34:40 +09:00
Tatsuhiro Tsujikawa
9db1c9467c src: Add constexpr to long_options 2017-01-09 19:28:00 +09:00
Tatsuhiro Tsujikawa
3444b42d44 src: Add more constexpr 2017-01-09 17:17:48 +09:00
Tatsuhiro Tsujikawa
6595ae26ea src: Add constexpr to const objects 2017-01-09 17:11:37 +09:00
Tatsuhiro Tsujikawa
41d8a3ac09 Document PROX protocol and PSK in nghttpx howto 2017-01-09 16:33:51 +09:00
Tatsuhiro Tsujikawa
175001a8d9 Add migration section from nghttpx v1.18.x 2017-01-09 16:09:30 +09:00
Tatsuhiro Tsujikawa
7cf9e00283 Update bash_completion 2017-01-09 14:56:03 +09:00
Tatsuhiro Tsujikawa
8a3eb3f066 Update man pages 2017-01-09 14:55:51 +09:00
Tatsuhiro Tsujikawa
7e1a0d204b h2load: Show default cipher list in -h 2017-01-09 14:47:32 +09:00
Tatsuhiro Tsujikawa
cbca2e35b5 nghttpx: Show default cipher list in -h 2017-01-09 14:43:13 +09:00
Tatsuhiro Tsujikawa
fc9bdf024f src: Make DEFAULT_CIPHER_LIST constexpr char[] 2017-01-09 14:42:40 +09:00
Tatsuhiro Tsujikawa
3f97e6cd3a Merge pull request #776 from nghttp2/nghttpx-memchunkbuffer
nghttpx: Use Memchunk based read buffer for frontend connection
2017-01-09 13:08:23 +09:00
Tatsuhiro Tsujikawa
4fa150c494 nghttpx: Use Memchunk based read buffer for frontend connection
Previously, we have dedicated read buffer for each frontend
connection.  With this commit, the buffer spaces are only used when
needed, and pooled if they are not used.  This reduces memory usage
for idle client connections.
2017-01-08 23:20:14 +09:00
Tatsuhiro Tsujikawa
e8b2508036 nghttpx: Rename confusing names in HttpDownstreamConnection 2017-01-08 23:09:00 +09:00
Tatsuhiro Tsujikawa
ac399e41ac nghttpx: Update doc
Mention client-ciphers, and no-http2-cipher-black-list options in
psk-secrets and client-psk-secrets options.
2017-01-08 23:04:07 +09:00
Tatsuhiro Tsujikawa
95dd908834 Merge branch 'nghttpx-more-tls-options' 2017-01-08 22:57:21 +09:00
Tatsuhiro Tsujikawa
9c7e54d9b5 nghttpx: Add client-ciphers option
Previously, ciphers option sets cipher list for both frontend and
backend TLS connections.  With this commit, ciphers option only sets
cipher list for frontend connections.  The new client-ciphers option
sets cipher list for backend connection.
2017-01-08 22:40:58 +09:00
Tatsuhiro Tsujikawa
3c03024881 nghttpx: Add client-no-http2-cipher-black-list option
This commit adds client-no-http2-cipher-black-list option to disable
enforcement of HTTP/2 cipher black list on backend HTTP/2 connection.
Previously, existing no-http2-cipher-black-list option disables it for
both frontend and backend connections.  Now no-http2-cipher-black-list
option only disables it for frontend connection.
2017-01-08 22:33:19 +09:00
Tatsuhiro Tsujikawa
36dfc0a56a nghttpx: Reorganize client side TLS configuration 2017-01-08 22:25:30 +09:00
Tatsuhiro Tsujikawa
55bf6cdb15 Merge branch 'nghttpx-psk' 2017-01-08 21:10:07 +09:00
Tatsuhiro Tsujikawa
0abc220013 nghttpx: Fix the bug that no-http2-cipher-black-list does not work
Because of the redundant check in backend HTTP/2 session,
no-http2-cipher-black-list does not work on backend HTTP/2 connection.
This commit fixes it.
2017-01-08 19:43:24 +09:00
Tatsuhiro Tsujikawa
c28900990a h2load: Show custom server temp key such as X25519 2017-01-08 17:58:19 +09:00
Tatsuhiro Tsujikawa
5108193d7b h2load: Fix incorrect return value from spdylay_send_callback 2017-01-08 17:32:35 +09:00
Tatsuhiro Tsujikawa
79a24f5dd9 nghttpx: Add --client-psk-secret option to enable PSK in backend 2017-01-08 00:35:55 +09:00
Tatsuhiro Tsujikawa
83c759572c nghttpx: Add --psk-secret option to enable PSK in frontend connection 2017-01-08 00:35:54 +09:00
Tatsuhiro Tsujikawa
1a07fb000b nghttpx: Enable SCT with OpenSSL 1.1.0 2017-01-06 21:29:04 +09:00
Tatsuhiro Tsujikawa
4aab15999d Merge pull request #769 from alagoutte/pvs
Fix issue reporting by PVS Studio
2017-01-04 20:27:55 +09:00
Tatsuhiro Tsujikawa
441982674f Merge pull request #768 from makovich/master
Update README file
2017-01-04 20:24:04 +09:00
Alexis La Goutte
8256c6e070 libevent-client: fix Incorrect format found by PVS Studio (V576)
Consider checking the fourth actual argument of the 'fprintf' function. The SIGNED integer type argument is expected.
2017-01-03 22:03:53 +01:00
Alexis La Goutte
ae87a44b94 nghttp2_hd: fix It is odd that the body of 'hd_get_num_table_entries' function is fully equivalent to the body of 'get_max_index' function found by PVS Studio (V524) 2017-01-03 22:03:53 +01:00
Alexis La Goutte
87d1692e27 nghttp2_submit: fix Parameter 'flags' is always rewritten in function body before being used found by PVS Studio (V763) 2017-01-03 22:03:53 +01:00
makovich
1d2f008656 Update README file 2017-01-03 23:00:32 +03:00
Tatsuhiro Tsujikawa
b064d8a9ff Merge branch 'nghttpx-fronend-proxyproto' 2017-01-03 17:28:20 +09:00
Tatsuhiro Tsujikawa
528af200b6 Merge branch 'nghttpx-fix-libev-assertion-error' 2017-01-03 17:26:05 +09:00
Tatsuhiro Tsujikawa
c6827a7dac nghttpx: Fix assertion error in libev ev_io_start 2017-01-03 16:43:49 +09:00
Tatsuhiro Tsujikawa
55ecb082ee nghttpx: Handle c-ares success without result 2017-01-03 14:35:05 +09:00
Tatsuhiro Tsujikawa
5f2cf461e6 integration: Avoid nghttpx accept-proxy-protocol option 2017-01-03 14:14:37 +09:00
Tatsuhiro Tsujikawa
b313386988 nghttpx: Add proxyproto to frontend option to accept PROXY protocol
Previously, global accept-proxy-protocol option enables PROXY protocol
support for all frontend listeners, but this was inflexible.  To fix
this issue, accept-proxy-protocol option is now deprecated, and
instead proxyproto parameter in frontend option enables PROXY protocol
support per frontend.
2017-01-03 12:47:03 +09:00
Tatsuhiro Tsujikawa
3933280d29 src: Fix assertion error with boringssl
boringssl says:

/* It is an error to clear any bits that have already been set. (We can't try
 * to get a second close_notify or send two.) */
assert((SSL_get_shutdown(ssl) & mode) == SSL_get_shutdown(ssl));
2017-01-02 11:48:38 +09:00
Tatsuhiro Tsujikawa
2b6073900f Merge branch 'nghttpx-dns-timeout-fix' 2016-12-30 11:39:28 +09:00
Tatsuhiro Tsujikawa
d1ba43a69f nghttpx: Fix bug that DNS timeout was erroneously disabled 2016-12-30 11:09:02 +09:00
Tatsuhiro Tsujikawa
a0779edec4 nghttpx: Fix bug that DNS timeout was ignored 2016-12-30 11:08:26 +09:00
Tatsuhiro Tsujikawa
d70fefe72f Bump up version number to 1.19.0-DEV 2016-12-27 20:55:00 +09:00
Tatsuhiro Tsujikawa
b52db072f1 Update bash_completion 2016-12-27 20:43:30 +09:00
Tatsuhiro Tsujikawa
ab0b98db61 Update man pages 2016-12-27 20:42:46 +09:00
Tatsuhiro Tsujikawa
4245d98653 Bump up version number to 1.18.0, LT revision to 26:3:12 2016-12-27 20:35:31 +09:00
Tatsuhiro Tsujikawa
93b4866f5b Merge branch 'nghttpx-dont-write-after-failure' 2016-12-26 00:49:45 +09:00
Tatsuhiro Tsujikawa
25df164219 nghttpx: Don't write again after failure
Plain write(2) is OK, but SSL_write requires same arguments on retry.
It would be better to avoid calling them again.
2016-12-26 00:35:38 +09:00
Tatsuhiro Tsujikawa
ba03c082e9 Merge branch 'nghttpx-retry-h1-backend-request' 2016-12-25 23:05:29 +09:00
Tatsuhiro Tsujikawa
bcfa333322 nghttpx: Refactor h1 backend retry code 2016-12-25 22:19:51 +09:00
Tatsuhiro Tsujikawa
c4aeadd57d nghttpx: Retry h1 backend request if first write fails 2016-12-25 22:19:51 +09:00
Tatsuhiro Tsujikawa
e6b4454e48 Merge branch 'nghttpx-better-early-final-response-handling' 2016-12-24 23:02:52 +09:00
Tatsuhiro Tsujikawa
3226d21609 Merge pull request #755 from nghttp2/nghttpx-h1-frontend-keep-alive-timeout
nghttpx: Add frontend-keep-alive-timeout option
2016-12-24 23:01:17 +09:00
Tatsuhiro Tsujikawa
3d20c2dce6 nghttpx: Feed read event rather than calling on_read
on_read may fail, but we failed to check its return value most of the
places.  This is because failure means deletion of ClientHandler, but
because of architecture, we cannot delete it.  Feeding read event is
better since we can move call on_read from libev callback.  We can
delete ClientHandler form there.
2016-12-24 22:57:59 +09:00
Tatsuhiro Tsujikawa
cd83d70e7b nghttpx: Don't reset stream if we have already received response 2016-12-24 22:54:22 +09:00
Tatsuhiro Tsujikawa
a0ce5ea9ab nghttpx: Keep reading after backend write failed
Because of bidirectional nature of TCP, we may fail write(2), but have
still pending read in TCP buffer, which may contain response body.  To
forward them, we should keep reading until get EOF from backend.

To avoid stalling HTTP/1 upload when request buffer is full, and we
have received complete response from backend, drop connection in that
case.
2016-12-24 22:50:02 +09:00
Tatsuhiro Tsujikawa
3c600c103f nghttpx: Add frontend-keep-alive-timeout option 2016-12-23 11:01:29 +09:00
Tatsuhiro Tsujikawa
841ac75c3e nghttpx: Clarify that backend-keep-alive-timeout applies to h1 only 2016-12-23 10:49:39 +09:00
Tatsuhiro Tsujikawa
80a96817aa Add c-ares to android build guide 2016-12-21 23:47:34 +09:00
Tatsuhiro Tsujikawa
ecc05e0a1a Add git submodule to required build step 2016-12-21 23:34:28 +09:00
Tatsuhiro Tsujikawa
359730af54 Fix regression in ff64f64e1d 2016-12-21 23:19:10 +09:00
Tatsuhiro Tsujikawa
e9cb19c80e Merge branch 'nghttpx-new-errorlog-format' 2016-12-20 23:14:18 +09:00
Tatsuhiro Tsujikawa
049e064e28 nghttpx: New error log format
To debug multi threaded configuration easier, we added current PID and
thread ID to error log.  Previously, we didn't add date and time if
log level is NOTICE.  In this change, we always write date and time
regardless of log level.
2016-12-20 23:13:19 +09:00
Tatsuhiro Tsujikawa
0463928a1e nghttpx: Fix uninitialized errors found by coverity scan 2016-12-18 22:16:52 +09:00
Tatsuhiro Tsujikawa
02d34c8c4c nghttpx: Fix dead code found by coverity scan 2016-12-18 22:14:26 +09:00
Tatsuhiro Tsujikawa
46acf32c41 Merge pull request #748 from nghttp2/pkg-config-libxml2
Use pkg-config to detect libxml2
2016-12-18 00:46:22 +09:00
Tatsuhiro Tsujikawa
cab0a76795 Use pkg-config to detect libxml2 2016-12-18 00:20:30 +09:00
Tatsuhiro Tsujikawa
0c76cebbfc Merge branch 'travis-make-distcheck' 2016-12-17 22:54:12 +09:00
Tatsuhiro Tsujikawa
5029b85b25 Add -f option to rm rst files not to pause travis build 2016-12-17 22:27:14 +09:00
Tatsuhiro Tsujikawa
0b71d9b828 travis: Do make distcheck for autotools build 2016-12-17 22:18:43 +09:00
Tatsuhiro Tsujikawa
464d7c4ec6 Update doc 2016-12-16 22:09:00 +09:00
Tatsuhiro Tsujikawa
ed21b631ae Update doc 2016-12-16 21:31:26 +09:00
Tatsuhiro Tsujikawa
950e2d9954 Mention dynamic hostname lookup in nghttpx how-to 2016-12-16 21:30:13 +09:00
Tatsuhiro Tsujikawa
71c054a789 Merge pull request #745 from nghttp2/remove-tiny-nghttpd
examples: Delete tiny-nghttpd
2016-12-15 00:18:33 +09:00
Tatsuhiro Tsujikawa
d2f456e5b1 Remove tiny-nghttpd from cmake build system 2016-12-14 23:56:02 +09:00
Tatsuhiro Tsujikawa
30a44b26d3 examples: Delete tiny-nghttpd
nghttpd does the better job in this area.
2016-12-14 23:26:52 +09:00
Tatsuhiro Tsujikawa
7dff758f8b Merge pull request #743 from nghttp2/fix-fetch-ocsp-response-with-openssl-1-1-0
Fix bug that fetch-ocsp-response does not work with OpenSSL 1.1.0
2016-12-12 22:59:40 +09:00
Tatsuhiro Tsujikawa
bd3ececdd8 Fix bug that fetch-ocsp-response does not work with OpenSSL 1.1.0
The syntax of openssl ocsp -header option has been changed in OpenSSL
1.1.0.  And it now does not require -header option anymore.  It looks
like that it is workaround for 1.0.x versions.
2016-12-12 21:22:48 +09:00
Tatsuhiro Tsujikawa
77416b0ac2 Update man pages 2016-12-11 17:01:16 +09:00
Tatsuhiro Tsujikawa
fce9efd341 Mention that non-numeric host is allowed in API call if "dns" is used 2016-12-11 17:00:33 +09:00
Tatsuhiro Tsujikawa
928fda1d70 Update bash_completion 2016-12-11 16:52:14 +09:00
Tatsuhiro Tsujikawa
2d9d654507 Update man pages 2016-12-11 16:52:03 +09:00
Tatsuhiro Tsujikawa
7398e57174 Merge pull request #740 from nghttp2/backend-dns
nghttpx: Dynamic DNS
2016-12-11 16:48:28 +09:00
Tatsuhiro Tsujikawa
503ec82f4d Merge pull request #737 from alagoutte/win
Add Windows CI via AppVeyor
2016-12-11 16:38:46 +09:00
Tatsuhiro Tsujikawa
22bd9fb530 nghttpx: Set DNS cache expire date for error and ok statuses only 2016-12-11 11:49:24 +09:00
Tatsuhiro Tsujikawa
e007b6b031 Add DNS integration tests 2016-12-11 11:32:38 +09:00
Tatsuhiro Tsujikawa
c487cd888f nghttpx: Periodically remove expired DNS cache entries 2016-12-11 10:42:54 +09:00
Tatsuhiro Tsujikawa
fd403a85c8 nghttpx: Just return DNS_STATUS_ERROR
At the moment, we use both resolvers, and if either one is not
DNS_STATUS_IDLE, the other one is also not DNS_STATUS_IDLE.  This may
change if we are going to configure DNS so that either A or AAAA
lookup is done.  In that case, it is better to just return
DNS_STATUS_ERROR in the diff.  This is because the calling side does
not expect DNS_STATUS_IDLE in that case.
2016-12-11 10:39:19 +09:00
Tatsuhiro Tsujikawa
a06a8c36a4 nghttpx: Add --dns-lookup-timeout and --dns-max-try options 2016-12-11 00:50:16 +09:00
Tatsuhiro Tsujikawa
0967ee9cb9 nghttpx: Better logging for DNS resolver 2016-12-10 23:10:18 +09:00
Tatsuhiro Tsujikawa
d66d34f9b9 Add libc-ares detection to cmake 2016-12-10 22:40:18 +09:00
Tatsuhiro Tsujikawa
264a98d106 nghttpx: Call c-ares initialization/cleanup functions 2016-12-10 21:41:03 +09:00
Tatsuhiro Tsujikawa
7c11d2d9bb Require c-ares >= 1.7.5 2016-12-10 21:40:50 +09:00
Tatsuhiro Tsujikawa
b58d7b406f Try c-ares 1.7.5 because it is the latest version travis offers 2016-12-10 21:32:37 +09:00
Tatsuhiro Tsujikawa
5ed9e4c83b Document that c-ares is a required library for nghttpx 2016-12-10 21:09:51 +09:00
Tatsuhiro Tsujikawa
e7da2a669e .travis.yml: Add libc-ares-dev 2016-12-10 21:09:51 +09:00
Tatsuhiro Tsujikawa
d66377d4b6 nghttpx: Add dns-cache-timeout option
This option controls how long cached DNS entries remain valid.
2016-12-10 21:09:51 +09:00
Tatsuhiro Tsujikawa
77a324fa46 nghttpx: Backend API call allows non-numeric host with dns parameter 2016-12-10 21:09:50 +09:00
Tatsuhiro Tsujikawa
38b5cad4e3 nghttpx: Lookup backend host name dynamically
We have added "dns" parameter to backend option.  If specified, name
lookup is done dynamically.  If not, name lookup is done at start up,
or configuration reloading.  nghttpx caches DNS result including error
case in 30 seconds in this commit.  Later commit makes this
configurable.

DNS resolution is done asynchronously using c-ares library.
2016-12-10 21:09:50 +09:00
Alexis La Goutte
29014643a9 Add Windows CI via AppVeyor 2016-12-08 21:17:02 +01:00
Tatsuhiro Tsujikawa
0872f6babe Merge pull request #736 from nghttp2/accept-204-content-length-0
Accept content-length: 0 in 204 response
2016-12-04 13:27:30 +09:00
Tatsuhiro Tsujikawa
b6a9cf9ffa nghttpx: Accept and ignore content-length: 0 in 204 response for now 2016-12-03 14:57:48 +09:00
Tatsuhiro Tsujikawa
5645cad577 Accept and ignore content-length: 0 in 204 response for now 2016-12-03 14:57:16 +09:00
Tatsuhiro Tsujikawa
85ba33c08f nghttpx: Wait for child process to exit
Normally, we don't have wait for child process to exit, since init can
take care of them.  But in containerized environment, pid 0 init might
not be available, and defunct processes can be piled up.  This commit
ensures that OCSP and neverbleed processes are waited for before
worker process exits.
2016-11-30 22:59:02 +09:00
Tatsuhiro Tsujikawa
ff64f64e1d nghttpx: Faster HTTP/1 frontend 2016-11-29 20:42:27 +09:00
Tatsuhiro Tsujikawa
bdd3425028 Bump up version number to 1.18.0-DEV 2016-11-27 14:09:30 +09:00
Tatsuhiro Tsujikawa
70e02cddd3 Update man pages 2016-11-27 10:56:36 +09:00
Tatsuhiro Tsujikawa
d1c0a17cc2 Bump up version number to 1.17.0, LT revision to 26:2:12 2016-11-27 10:53:28 +09:00
Tatsuhiro Tsujikawa
35c5cbbc21 Update AUTHORS 2016-11-27 10:51:03 +09:00
Tatsuhiro Tsujikawa
2ff31bdd2b nghttpx: Remove redundant check 2016-11-26 22:34:24 +09:00
Tatsuhiro Tsujikawa
2fa3d34af1 nghttpx: Use Connection::again_rt() in MemcachedConnection 2016-11-26 19:45:23 +09:00
Tatsuhiro Tsujikawa
fa3452ec68 nghttpx: Use Connection::again_rt() in LiveCheck 2016-11-26 19:45:23 +09:00
Tatsuhiro Tsujikawa
7451f2f212 nghttpx: Fix frequent crash with --backend-http-proxy-uri 2016-11-26 19:45:23 +09:00
Tatsuhiro Tsujikawa
e9ab75a386 nghttpx: Robust backend read timeout 2016-11-26 19:45:23 +09:00
Tatsuhiro Tsujikawa
d83949bc88 asio: server: Call on_close callback on connection close 2016-11-21 22:43:23 +09:00
Tatsuhiro Tsujikawa
50f42a80c9 nghttpx: Fix bug that mishandles response header from h1 backend 2016-11-18 22:33:29 +09:00
Tatsuhiro Tsujikawa
00bd76fc3d Update man pages 2016-11-13 22:26:56 +09:00
Tatsuhiro Tsujikawa
93ea6b581e Update LT revision due to v1.16.1 release 2016-11-13 22:24:31 +09:00
Tatsuhiro Tsujikawa
8e52a5c7f3 Add test for the bug that shift goes beyond 32 bits in decode_length 2016-11-12 23:05:16 +09:00
Tatsuhiro Tsujikawa
0aa35e574a Merge branch 'ruds-master' 2016-11-12 22:55:28 +09:00
Matt Rudary
5a81f2441f Prevent undefined behavior in decode_length 2016-11-11 11:12:43 -05:00
Tatsuhiro Tsujikawa
2b75aff32e nghttpx: Fix bug that zero-length POST is not forwarded 2016-11-11 00:48:32 +09:00
Tatsuhiro Tsujikawa
f4474d57ec nghttpx: Fix compile error with gcc 2016-11-07 23:11:52 +09:00
Tatsuhiro Tsujikawa
d0310c8aee integration: Add te header field test 2016-11-07 22:56:36 +09:00
Tatsuhiro Tsujikawa
8471c9e92e nghttpx: Parse te header field a bit more properly 2016-11-07 22:47:48 +09:00
Tatsuhiro Tsujikawa
f5a4c9d971 nghttpx: Don't copy non-final nva since they are backed by Downstream 2016-11-04 22:06:01 +09:00
Tatsuhiro Tsujikawa
a0dd8918eb nghttpx: Don't mutate *_key_prev_ in add_header 2016-11-04 22:04:42 +09:00
Tatsuhiro Tsujikawa
baa9b1cac0 nghttpx: Remove optional reason-phrase from SPDY :status 2016-11-04 21:16:45 +09:00
Tatsuhiro Tsujikawa
38443d2195 nghttpx: Small optimization 2016-11-04 21:13:22 +09:00
Tatsuhiro Tsujikawa
208d71561a src: Add missing mandatory SP after status code 2016-11-04 02:19:37 +09:00
Tatsuhiro Tsujikawa
25fbc7b435 nghttpx: Reset flags as well 2016-11-04 02:00:50 +09:00
Tatsuhiro Tsujikawa
6bd95d885d Merge pull request #723 from nghttp2/strict-http-framing
Strict http framing
2016-11-03 23:30:38 +09:00
Tatsuhiro Tsujikawa
c171097dea Document that libnghttp2's behaviour about Content-Length 2016-11-03 23:09:30 +09:00
Tatsuhiro Tsujikawa
6bcdb178a5 nghttpx: Header key and value must be string in mruby script 2016-11-03 22:58:45 +09:00
Tatsuhiro Tsujikawa
5e10cc4cad nghttpx: Use gc save/restore around downcase method 2016-11-03 22:47:52 +09:00
Tatsuhiro Tsujikawa
95e6c875f0 nghttpx: Use mrb_ary_ref instead of mrb_ary_entry 2016-11-03 22:44:42 +09:00
Tatsuhiro Tsujikawa
6eb2829ee8 nghttpx: Strip content-length with 204 or 200 to CONNECT in mruby 2016-11-03 22:25:15 +09:00
Tatsuhiro Tsujikawa
6ad9ddcdea Disallow content-length in 1xx, 204, or 200 to a CONNECT request 2016-11-03 17:26:32 +09:00
Tatsuhiro Tsujikawa
e082b7be72 nghttpx: Strict handling for Content-Length or Transfer-Encoding in h1
We now treat Content-Length or Transfer-Encoding as error if they come
with 204 or 1xx status code, or 200 to a CONNECT request in HTTP/1
response.
2016-11-03 17:00:05 +09:00
Tatsuhiro Tsujikawa
da01d8dedb nghttpx: Delete outdated comment 2016-11-03 16:48:24 +09:00
Tatsuhiro Tsujikawa
ca6f6511f2 Avoid memcpy against NULL src 2016-11-01 23:54:21 +09:00
Tatsuhiro Tsujikawa
ee8440408c Merge branch 'remoe-add_cmake_win_version' 2016-10-28 22:24:51 +09:00
Remo E
9cd695a1db MSVC version resource support 2016-10-28 22:24:22 +09:00
Tatsuhiro Tsujikawa
4b45906f46 Merge branch 'dalf-boringssl' 2016-10-28 00:06:06 +09:00
dalf
d448eb54f9 Fix compilation with BoringSSL 2016-10-27 10:00:52 +00:00
Tatsuhiro Tsujikawa
65739fe754 Bump up version number to 1.17.0-DEV 2016-10-24 21:21:24 +09:00
Tatsuhiro Tsujikawa
0344c962f8 Add missing nghttp2_set_debug_vprintf_callback.rst to APIDOCS 2016-10-24 21:14:15 +09:00
Tatsuhiro Tsujikawa
46d1e6bb55 nghttpx: Increase block size of connection wide allocator to 512 2016-10-24 21:06:37 +09:00
Tatsuhiro Tsujikawa
04606b9339 Update man pages 2016-10-24 20:40:51 +09:00
Tatsuhiro Tsujikawa
7bb083e69e Bump up version number to 1.16.0, LT revision to 26:0:12 2016-10-24 20:37:56 +09:00
Tatsuhiro Tsujikawa
3a831fa95c nghttpx: Fix file descriptor leak in read_tls_sct_from_dir 2016-10-24 20:30:30 +09:00
Tatsuhiro Tsujikawa
5b9cacc2d7 nghttpx: Discard iaddrs early 2016-10-23 19:55:58 +09:00
Tatsuhiro Tsujikawa
10a84f3e3d nghttpx: Rename errbuf for neverbleed as nb_errbuf for clarification 2016-10-23 19:26:22 +09:00
Tatsuhiro Tsujikawa
c42715ed6a nghttpx: Fix compile error with --disable-threads 2016-10-23 19:26:22 +09:00
Tatsuhiro Tsujikawa
177d51ddab nghttpx: Use thread_local if it is available 2016-10-23 19:26:22 +09:00
Tatsuhiro Tsujikawa
6c882e1ece asio: Avoid repeated call of io_service::post 2016-10-20 22:12:31 +09:00
Tatsuhiro Tsujikawa
f09c5c4bf9 xsi_strerror: Use stddef.h so that we can use size_t 2016-10-19 23:50:28 +09:00
Tatsuhiro Tsujikawa
08a9a2eca9 asio: Fix bug when end() is called outside nghttp2 callback 2016-10-19 23:17:43 +09:00
Tatsuhiro Tsujikawa
19f1785cde nghttpx: Avoid extra allocation on look up host key 2016-10-18 22:19:53 +09:00
Tatsuhiro Tsujikawa
109de15c1f doc: Mention --no-location-rewrite in "Rewriting location header field" section 2016-10-17 22:02:49 +09:00
Tatsuhiro Tsujikawa
8b64e7b4e1 src: Add XSI-compliant version strerror_r 2016-10-16 22:47:56 +09:00
Tatsuhiro Tsujikawa
a5d66e71d0 Update http-parser to feae95a3a69f111bc1897b9048d9acbc290992f9 2016-10-16 17:57:45 +09:00
Tatsuhiro Tsujikawa
3de2654223 src: Add noexcept to move constructor and assignment operator 2016-10-15 18:51:22 +09:00
Tatsuhiro Tsujikawa
d49bd50908 Apply clang-format-diff only to lib, src, examples and tests 2016-10-15 18:40:45 +09:00
Tatsuhiro Tsujikawa
4130c68db1 Merge branch 'clang-format-3.9' 2016-10-15 18:39:15 +09:00
Tatsuhiro Tsujikawa
ad3dac81a2 Update doc 2016-10-15 18:37:03 +09:00
Tatsuhiro Tsujikawa
0cf6848646 clang-format-3.9 2016-10-15 18:36:04 +09:00
Tatsuhiro Tsujikawa
e9d562f987 Update .clang-format for clang-format-3.9 2016-10-15 18:25:36 +09:00
Tatsuhiro Tsujikawa
bc0f501dd3 Replace final with fin to make clang-format-3.9 happy 2016-10-15 18:25:13 +09:00
Tatsuhiro Tsujikawa
a591001e7b Update doc 2016-10-15 18:18:52 +09:00
Tatsuhiro Tsujikawa
eaa9229d72 Update doc 2016-10-15 18:16:15 +09:00
Tatsuhiro Tsujikawa
1d5cde1c6b Add missing nghttp2_debug.h 2016-10-14 23:13:42 +09:00
Tatsuhiro Tsujikawa
de03c41111 Merge branch 'Andersbakken-set_nghttp2_debug_callback' 2016-10-14 23:03:00 +09:00
Tatsuhiro Tsujikawa
19340da8d4 Re-format debug text output 2016-10-14 22:59:05 +09:00
Tatsuhiro Tsujikawa
5e99531b4d clang-format 2016-10-14 22:59:05 +09:00
Tatsuhiro Tsujikawa
bef3d47c16 Rename functions and nghttp2_debug.h to move debug macro there 2016-10-14 22:59:05 +09:00
Tatsuhiro Tsujikawa
b8f7b474b4 Fix autotools build 2016-10-14 22:04:02 +09:00
Tatsuhiro Tsujikawa
1fb291d0e1 Merge branch 'set_nghttp2_debug_callback' of https://github.com/Andersbakken/nghttp2 into Andersbakken-set_nghttp2_debug_callback 2016-10-14 21:58:13 +09:00
Anders Bakken
bc3dc6b765 Add set_nghttp2_debug_callback to take advantage of DEBUGF statements in
when building DEBUGBUILD.
2016-10-13 13:24:26 -07:00
Tatsuhiro Tsujikawa
ee7c36c022 Merge pull request #707 from Andersbakken/current
Make it possible to include nghttp2/CMakeLists.txt in another project
2016-10-13 21:16:14 +09:00
Anders Bakken
857791dbb9 Make it possible to include nghttp2/CMakeLists.txt in another project
using add_subdirectory.

CMAKE_SOURCE_DIR/CMAKE_BINARY_DIR points to the top level
CMakeLists.txt. This isn't necessarily nghttp2/CMakeLists.txt.
2016-10-12 08:23:20 -07:00
Tatsuhiro Tsujikawa
3c3267ea7d Update bash_completion 2016-10-11 23:03:11 +09:00
Tatsuhiro Tsujikawa
d654664fb2 Update man pages 2016-10-11 23:02:55 +09:00
Tatsuhiro Tsujikawa
1a37044d3c nghttpx: Use pre-allocated buffer for timestamp string 2016-10-11 22:32:26 +09:00
Tatsuhiro Tsujikawa
00a8c378d4 nghttpx: Add --backend-connect-timeout option 2016-10-10 22:50:41 +09:00
Tatsuhiro Tsujikawa
7549341081 Fix typo 2016-10-10 15:35:12 +09:00
Tatsuhiro Tsujikawa
5db8473f12 Fix build error with OpenSSL < 1.0.2 (again) 2016-10-09 19:34:32 +09:00
Tatsuhiro Tsujikawa
00b89f10bd Fix build error with OpenSSL < 1.0.2 2016-10-09 18:54:18 +09:00
Tatsuhiro Tsujikawa
281df33f40 Update bash_completion 2016-10-09 18:45:17 +09:00
Tatsuhiro Tsujikawa
e6ae681f07 Update man pages 2016-10-09 18:44:33 +09:00
Tatsuhiro Tsujikawa
7e681dc98f help2rst.py: Fix * escape 2016-10-09 18:43:36 +09:00
Tatsuhiro Tsujikawa
412c8f9e67 nghttpx: Add TLS signed_certificate_timestamp extension support 2016-10-09 18:43:36 +09:00
Tatsuhiro Tsujikawa
2795da840c nghttpx: Apply timeout for incoming header block 2016-10-09 17:18:43 +09:00
Tatsuhiro Tsujikawa
175c7886ea nghttpx: Update doc 2016-10-09 17:18:29 +09:00
Tatsuhiro Tsujikawa
4a4b2cf538 nghttpx: Embed Process into OCSPUpdateContext 2016-10-08 15:26:13 +09:00
Tatsuhiro Tsujikawa
2c2188c09d nghttpx: Refactor ocsp command execution
We have now generic read-only command execution in shrpx_exec.{h,cc}.
2016-10-08 15:22:11 +09:00
Tatsuhiro Tsujikawa
1f07c24a2e Update bash_completion 2016-10-08 11:46:16 +09:00
Tatsuhiro Tsujikawa
e038625881 Update man pages 2016-10-08 11:46:03 +09:00
Tatsuhiro Tsujikawa
cdb1d6b462 nghttpx: Add P-384 and P-521 to the default of --ecdh-curves option 2016-10-08 11:44:03 +09:00
Tatsuhiro Tsujikawa
1b4ccd0d51 nghttpx: Don't call get_config() repeatedly 2016-10-08 11:37:18 +09:00
Tatsuhiro Tsujikawa
8babaac8c3 nghttpx: Add --ecdh-curves option to specify list of named curves
This option requires OpenSSL >= 1.0.2.  With OpenSSL 1.0.2, the
default value is "P-256".  With OpenSSL 1.1.0 or later, the default
value is "X25519:P-256".
2016-10-08 10:50:56 +09:00
Tatsuhiro Tsujikawa
d1624d6929 h2load: Format default value of header table size with unit 2016-10-06 23:16:30 +09:00
Tatsuhiro Tsujikawa
e4472b5aec h2load: Add --header-table-size and --encoder-header-table-size options 2016-10-06 22:26:31 +09:00
Tatsuhiro Tsujikawa
9439ba75d3 nghttpx: Fix heap-use-after-free when executing new binary 2016-10-04 00:32:02 +09:00
Tatsuhiro Tsujikawa
9254c563ca Fix compile error with gcc 2016-10-03 22:52:14 +09:00
Tatsuhiro Tsujikawa
35594e09df Merge branch 'nghttpx-more-block-allocator' 2016-10-03 22:12:28 +09:00
Tatsuhiro Tsujikawa
96ff3be5e6 nghttpx: Use allocator of new config since this may happen multiple times 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa
3d5d76ba74 nghttpx: Update doc 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa
8c1e155f44 nghttpx: Make it simple to calculate length 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa
dba0d2791c nghttpx: Use emplace_back instead of push_back 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa
f310e82fc8 nghttpx: Update doc 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa
1240e55bb6 nghttpx: Use const ref 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
75039c573c base64: Assert that input is multiple of 4 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
4b5179a544 nghttpx: Fix bug in util::make_hostport 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
8efccddcf4 nghttpx: Use StringRef for HttpProxy 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
97843e3874 nghttpx: Use StringRef for tls_proto_list 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
5dd2704051 nghttpx: Use StringRef for tls.npn_list 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
de7b7fd440 nghttpx: Use StringRef for tls.subcerts 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
1037d3ad26 nghttpx: Use StringRef for tls.ticket.files 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
c4368a9416 nghttpx: Use StringRef for AltSvc fields 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
fdc1eb526b nghttpx: Use HeaderRefs for add_request_headers and add_response_headers 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
99a91e3172 nghttpx: Add BlockAllocator to Config object 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
272cfa320e nghttpx: Use BlockAllocator per DownstreamConfig 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa
f5285d1f5a nghttpx: Add BlockAllocator to SharedDownstreamAddr 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa
ede6104900 nghttpx: Increase block size for connection wide BlockAllocator 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa
5aec60fbeb nghtpx: Add BlockAllocator version of base64 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa
e1a865c406 nghttpx: Add BlockAllocator version of util::formax_hex 2016-10-02 22:28:42 +09:00
Tatsuhiro Tsujikawa
5e03b6a0db nghttpx: Use BlockAllocator for util::quote_string 2016-10-02 00:07:26 +09:00
Tatsuhiro Tsujikawa
b85924bf70 nghttpx: Use BlockAllocator to encode alt-svc token 2016-10-02 00:00:46 +09:00
Tatsuhiro Tsujikawa
19707aac55 nghttpx: Use StringRef for sni_name_ 2016-10-01 22:54:17 +09:00
Tatsuhiro Tsujikawa
9ad873fc06 nghttpx: Remove unused function declaration 2016-10-01 22:54:17 +09:00
Tatsuhiro Tsujikawa
8a9810ed32 nghttpx: Add BlockAllocator to ClientHandler 2016-10-01 22:54:17 +09:00
Tatsuhiro Tsujikawa
68a6d8c50b nghttpx: Realloc header buffer 2016-10-01 22:52:02 +09:00
Tatsuhiro Tsujikawa
600605400c nghttpx: Don't send RST_STREAM CANCEL to a pushed stream repeatedly 2016-09-27 23:49:01 +09:00
Tatsuhiro Tsujikawa
97aa4dabc8 Bump up version number to 1.16.0-DEV 2016-09-25 12:17:45 +09:00
Tatsuhiro Tsujikawa
a6f487240d Add missing rst entry 2016-09-25 11:44:24 +09:00
Tatsuhiro Tsujikawa
da135416bb Update man pages 2016-09-25 11:39:14 +09:00
Tatsuhiro Tsujikawa
13eb881e5e Bump up version number to 1.15.0, LT revision to 25:0:11 2016-09-25 11:36:15 +09:00
Tatsuhiro Tsujikawa
82c84d163b doc: Add missing rst files to CMakeLists.txt 2016-09-24 22:14:35 +09:00
Tatsuhiro Tsujikawa
a526183928 doc: Sort rst files 2016-09-24 22:14:28 +09:00
Tatsuhiro Tsujikawa
60222ae7c3 Update doc 2016-09-24 10:42:50 +09:00
Tatsuhiro Tsujikawa
2052a1a4bd Document how libnghttp2 schedules HTTP/2 frames internally 2016-09-23 22:41:49 +09:00
Tatsuhiro Tsujikawa
183be9cac9 Fix typo 2016-09-23 22:23:48 +09:00
Tatsuhiro Tsujikawa
69b53b9aaa nghttpx: Handle graceful shutdown with client IP affinity enabled 2016-09-22 23:17:49 +09:00
Tatsuhiro Tsujikawa
02b9fcd332 integration: Fix test failure with go1.7.1 2016-09-22 20:47:51 +09:00
Tatsuhiro Tsujikawa
231d739b10 nghttpx: Improve performance with h1 backend when request body is involved 2016-09-22 20:46:50 +09:00
Tatsuhiro Tsujikawa
e1dfff8929 Use std::atomic_* overloads for std::shared_ptr if available 2016-09-20 22:39:01 +09:00
Tatsuhiro Tsujikawa
db1716ae93 Fix -Wexpansion-to-defined warning with clang-3.9
The error message was:

warning: macro expansion producing 'defined' has undefined
behavior [-Wexpansion-to-defined]

http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html
2016-09-19 22:07:03 +09:00
Tatsuhiro Tsujikawa
4cdc74c957 Update bash_completion 2016-09-18 22:44:33 +09:00
Tatsuhiro Tsujikawa
2c17ec3df8 Update man pages 2016-09-18 22:44:19 +09:00
Tatsuhiro Tsujikawa
e464b10fc3 Merge branch 'set-max-deflate-dynamic-table-size' 2016-09-18 22:13:56 +09:00
Tatsuhiro Tsujikawa
03ba399176 nghttpx: Update doc 2016-09-17 22:38:06 +09:00
Tatsuhiro Tsujikawa
751d66a397 nghttpd: Check maximum value of -c option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa
3ec71bf5a2 nghttpd: Add --encoder-header-table-size option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa
f19b0724a3 nghttp: Check maximum value of -c option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa
a7e0a69f97 nghttp: Add --encoder-header-table-size option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa
e532e20491 Merge branch 'master' into set-max-deflate-dynamic-table-size 2016-09-17 22:02:41 +09:00
Tatsuhiro Tsujikawa
3e1cfa8e99 nghttpx: Don't check downstream existence since dconn is one-to-one with it 2016-09-15 22:11:26 +09:00
Tatsuhiro Tsujikawa
a100df9cae nghttpx: Remove redundant check using get_downstream_stream_id 2016-09-15 22:06:52 +09:00
Tatsuhiro Tsujikawa
56284b1e15 nghttpx: Fix regression introduced in f267e400fa 2016-09-15 22:03:04 +09:00
Tatsuhiro Tsujikawa
f267e400fa nghttpx: Migrate backend stream to another h2 session on graceful shutdown 2016-09-15 00:53:41 +09:00
Tatsuhiro Tsujikawa
8bac5899cc nghttpx: Handle h2 backend error per Downstream
Previously we wrongly handles stream per connection when h2 backend
failed or closed.  If upstream is h2 or spdy, streams which are not
associated to the failed h2 backend are also handled, which is
unnecessary.
2016-09-14 22:18:38 +09:00
Tatsuhiro Tsujikawa
f4016644a9 nghttpx: Add option to specify HPACK encoder/decoder dynamic table size 2016-09-12 22:53:02 +09:00
Tatsuhiro Tsujikawa
d9bc6d04f7 nghttpx: Log client address 2016-09-11 23:30:33 +09:00
Tatsuhiro Tsujikawa
743fc4a3c3 Use the similar naming scheme for table size as 392256e542 2016-09-11 22:25:01 +09:00
Tatsuhiro Tsujikawa
392256e542 Add nghttp2_option_set_max_deflate_dynamic_table_size() API function
nghttp2_option_set_max_deflate_dynamic_table_size function sets the
maximum dynamic table size for header block deflater.  The default
value is 4KiB.
2016-09-11 22:13:59 +09:00
Tatsuhiro Tsujikawa
905e16cb99 Simplify session_after_frame_sent1 2016-09-11 17:18:08 +09:00
Tatsuhiro Tsujikawa
9d4e8eeb12 Simplify code
Move DATA frame handling code to switch-case of frame type.
2016-09-11 17:00:04 +09:00
Tatsuhiro Tsujikawa
8099dd9558 Mention --enable-lib-only configure option in README 2016-09-11 13:34:34 +09:00
Tatsuhiro Tsujikawa
a3a6b91c5f src: Rename OPENSSL_101_API macro as OPENSSL_1_1_API 2016-09-11 00:38:20 +09:00
Tatsuhiro Tsujikawa
d9bb3448bf Update man pages 2016-09-10 22:15:56 +09:00
Tatsuhiro Tsujikawa
d508a0c72c nghttpx: Defer validation of request form after mruby handler 2016-09-10 22:09:13 +09:00
Tatsuhiro Tsujikawa
bc31146c1f nghttpx: Add tls_sni to mruby Nghttpx::Env class
tls_sni returns TLS SNI value which client sent in this TLS
connection.
2016-09-10 22:08:34 +09:00
Tatsuhiro Tsujikawa
1ad7d5e366 nghttpx: Fix compile error gcc (again) 2016-09-10 17:13:01 +09:00
Tatsuhiro Tsujikawa
456038e3de nghttpx: Fix compile error with gcc 2016-09-10 16:51:35 +09:00
Tatsuhiro Tsujikawa
9aa26970be nghttpx: Comment out TCP logging since it is too verbose 2016-09-10 16:49:15 +09:00
Tatsuhiro Tsujikawa
20c39fa843 nghttpx: Use default connection window size with window size optimization 2016-09-10 16:45:28 +09:00
Tatsuhiro Tsujikawa
f5a2f1da25 nghttpx: Add --frontend-http2-window-size option, and its family
We added --frontend-http2-window-size,
--frontend-http2-connection-window-size, --backend-http2-window-size,
and --backend-http2-connection-window-size option to replace existing
*-bits options.  The old options are not flexible because they only
specify number of bits.  Now we can specify integer value, with
possible g, m, and k unit.  The old options are still available for
backend compatibility, but are deprecated.
2016-09-10 16:27:48 +09:00
Tatsuhiro Tsujikawa
27b250ac8e nghttpx: Add experimental TCP optimization for h2 frontend 2016-09-10 16:27:48 +09:00
Tatsuhiro Tsujikawa
b14375ec63 Bump up LT revision to 24:1:10 due to v1.14.1 release
This also fixes LT revision in CMakeLists.txt, which was not updated
in v1.14.0 release.
2016-09-10 12:52:37 +09:00
Tatsuhiro Tsujikawa
6858cda366 Fix GOAWAY race with new incoming stream on server side
Revert part of 16c46114dc to fix race
condition that incoming stream after sending GOAWAY causes connection
error.  The strict stream handling introduced in the above commit does
not handle several cases well (e.g., GOAWAY race, and refusing streams
because of concurrency limit).
2016-09-09 22:08:34 +09:00
Tatsuhiro Tsujikawa
8a703d21ae Update neverbleed 2016-09-08 21:19:24 +09:00
Tatsuhiro Tsujikawa
1dabe43ff4 nghttpx: Workaround for std::make_shared bug in Xcode7, 7.1, and 7.2
std::make_shared in Xcode 7, 7.1, and 7.2 does not perform
value-initialization, and causes undefined behaviour if struct does
not have user defined default constructor.  This workaround explicitly
defines user defined default constructor, and initializes values.
2016-09-04 23:30:24 +09:00
Tatsuhiro Tsujikawa
900aef10da Update neverbleed 2016-09-04 17:43:07 +09:00
Tatsuhiro Tsujikawa
ded576f423 nghttpx: Fix bug that bytes are doubly counted for TLS connections 2016-09-04 17:28:50 +09:00
Tatsuhiro Tsujikawa
136aae725f nghttpx: Add --no-server-rewrite option not to rewrite server header field 2016-08-31 23:47:15 +09:00
Tatsuhiro Tsujikawa
a60c3f8939 Add -Wsometimes-uninitialized to warn flags 2016-08-30 23:47:07 +09:00
Tatsuhiro Tsujikawa
99dc31ff1a nghttpx: Retry if backend h1 connection cannot be established due to timeout 2016-08-30 23:37:49 +09:00
Tatsuhiro Tsujikawa
7673848325 Add -lsocket -lnsl to APPLDFLAGS for solaris build
As suggested in GH-674
2016-08-30 21:25:47 +09:00
Tatsuhiro Tsujikawa
0f8a5ffc23 Merge branch 'http2-debug-state-api' 2016-08-28 22:33:24 +09:00
Tatsuhiro Tsujikawa
fddb019baf Merge branch 'master' into http2-debug-state-api 2016-08-28 22:20:04 +09:00
Tatsuhiro Tsujikawa
72bf7d4af0 Merge branch 'pause-from-data-source-read-callback' 2016-08-28 22:18:29 +09:00
Tatsuhiro Tsujikawa
581e0938a9 Allow NGHTTP2_ERR_PAUSE from nghttp2_data_source_read_callback 2016-08-28 21:57:10 +09:00
Tatsuhiro Tsujikawa
1064e017c6 nghttpx: Reset stream if invalid header field is received in h2 2016-08-28 00:49:38 +09:00
Tatsuhiro Tsujikawa
79b07f0ce2 Update doc 2016-08-28 00:47:38 +09:00
Tatsuhiro Tsujikawa
cd471a989a python: Support ALPN, require Python 3.5
This commit also fixes the bug that SETTINGS timer continues after
connection was closed.
2016-08-28 00:11:59 +09:00
Tatsuhiro Tsujikawa
0ea44072a3 Enable ASAN in travis autotools build 2016-08-27 22:14:54 +09:00
Tatsuhiro Tsujikawa
6ba1abac6c src: Only consider openssl 1.1.0 final 2016-08-27 00:45:16 +09:00
Tatsuhiro Tsujikawa
0110d2f9f8 Fix compile error with openssl 1.1.0 2016-08-27 00:02:03 +09:00
Tatsuhiro Tsujikawa
baa0f60dc8 Add API to get current HPACK dynamic table size 2016-08-26 23:02:51 +09:00
Tatsuhiro Tsujikawa
69aa70086a Merge branch 'master' into http2-debug-state-api 2016-08-26 22:54:59 +09:00
Tatsuhiro Tsujikawa
13d3f785bd Make ImmutableString(const std::string&) explicit 2016-08-26 22:52:08 +09:00
Tatsuhiro Tsujikawa
39c068974d Make ImmutableString(const char*) explicit 2016-08-26 22:40:59 +09:00
Tatsuhiro Tsujikawa
0d4d1a63d4 nghttpx: Add --server-name option to change server response header field 2016-08-26 22:28:09 +09:00
Tatsuhiro Tsujikawa
833cd962a1 Bump up version number to 1.15.0-DEV 2016-08-25 23:25:42 +09:00
Tatsuhiro Tsujikawa
8103f43b65 doc: Add missing APIDOCS entry 2016-08-25 23:19:35 +09:00
Tatsuhiro Tsujikawa
1c8a672a8d Update man pages 2016-08-25 22:57:56 +09:00
Tatsuhiro Tsujikawa
4749e66c67 nghttpx: Disallow copying Config 2016-08-25 22:55:12 +09:00
Tatsuhiro Tsujikawa
25ea41972a Bump up version number to 1.14.0, LT revision to 24:0:10 2016-08-25 22:41:17 +09:00
Tatsuhiro Tsujikawa
7d66188910 Add author.py
This script prints out the commit author from `git log` output.  Used
to update AUTHORS file.
2016-08-25 22:37:18 +09:00
Tatsuhiro Tsujikawa
979c99eaea Update AUTHORS 2016-08-25 22:36:05 +09:00
Tatsuhiro Tsujikawa
cf7f87c2ad nghttpx: Log error code from getsockopt(SO_ERROR) on first write event 2016-08-25 00:25:03 +09:00
Tatsuhiro Tsujikawa
bd0c1edaa6 Merge branch 'weliu-master' 2016-08-24 00:58:49 +09:00
Tatsuhiro Tsujikawa
c7ef021b4b Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master 2016-08-24 00:58:15 +09:00
Wenfeng Liu
00c80a15c0 lib: Make emit_header() return void since it always succeed. 2016-08-23 13:40:14 +00:00
Tatsuhiro Tsujikawa
8f47b68a95 nghttpx: Set do_signal_write_ when TLS handshake was completed 2016-08-23 21:36:43 +09:00
Tatsuhiro Tsujikawa
d9139fc286 asio: Fix reserved size 2016-08-22 22:30:25 +09:00
Tatsuhiro Tsujikawa
e693f75670 Add nghttp2_session_get_local_settings() API function 2016-08-21 19:33:01 +09:00
Tatsuhiro Tsujikawa
759f6c0b39 Update doc 2016-08-21 19:17:51 +09:00
Tatsuhiro Tsujikawa
3e0d73c01d Add missing document entries 2016-08-21 19:11:23 +09:00
Tatsuhiro Tsujikawa
5cf21ec187 Add APIs to return the number of data that remote endpoint can send
2 APIs are added.  nghttp2_session_get_local_window_size() returns the
amount of data that the remote endpoint can send without receiving
connection level WINDOW_UPDATE.
nghttp2_session_get_stream_local_window_size() returns the amount of
data that the remote endpoint can send without receiving stream level
WINDOW_UPDATE.
2016-08-21 19:01:51 +09:00
Tatsuhiro Tsujikawa
62e1d1c952 Fix typo 2016-08-21 13:29:29 +09:00
Tatsuhiro Tsujikawa
6ae58cc22e Document how to report vulnerability 2016-08-21 12:18:31 +09:00
Tatsuhiro Tsujikawa
874ef1ac54 Add License section in README 2016-08-21 11:29:21 +09:00
Tatsuhiro Tsujikawa
5f65460944 nghttpx: Don't change pushed stream's priority
There is a discussion in httpbis mailing list which argues that
dependency tree is for client, and changing it in server side is not
what client expects.
https://lists.w3.org/Archives/Public/ietf-http-wg/2016JulSep/0416.html

Currently, we make pushed stream depend on the parent stream of
associated stream (that is main HTML in most of the cases), so that
associated stream and pushed stream become siblings.  In this case, we
also observed that these resources complete each other to get its
parent weight.  This means that the delivery of associated stream is
delayed by pushed streams.

So at this moment, it is not a good idea to change pushed stream
priority in a way we do currently.
2016-08-20 22:09:18 +09:00
Tatsuhiro Tsujikawa
41b2745dad nghttpx: Log backend connection failure in WARN level 2016-08-19 16:25:05 +09:00
Tatsuhiro Tsujikawa
30f9f9ef87 nghttpx: Guard with LOG_ENABLED(INFO) 2016-08-19 16:24:48 +09:00
Tatsuhiro Tsujikawa
4807e71b7d nghttpx: Fix bug that api and healthmon params do not work with http2 proxy 2016-08-18 22:31:53 +09:00
Tatsuhiro Tsujikawa
09c647fd1b Update doc 2016-08-18 21:26:58 +09:00
Tatsuhiro Tsujikawa
d0fea96e69 Allow nonuniform buffer size in nghttp2_hd_deflate_hd_vec() 2016-08-18 21:23:17 +09:00
Tatsuhiro Tsujikawa
b8883101d3 deflatehd: Call nghttp2_hd_deflate_change_table_size only if table size is changed from default 2016-08-18 17:19:24 +09:00
Tatsuhiro Tsujikawa
508c88f659 Add test for nghttp2_hd_deflate_hd_vec with 1 byte chunk 2016-08-17 22:59:48 +09:00
Tatsuhiro Tsujikawa
40d217beb1 Remove bufs_avail 2016-08-17 22:56:40 +09:00
Tatsuhiro Tsujikawa
e36caef006 Merge branch 'hpack-vec' 2016-08-17 21:09:44 +09:00
Tatsuhiro Tsujikawa
9b864380a5 Use nghttp2_vec in nghttp2_hd_deflate_hd_vec
This change is for the future enhancement where we loose the
requirement about the chunk size for each buffer.
2016-08-17 21:09:29 +09:00
Tatsuhiro Tsujikawa
0e1d0400d8 Use whole chunk when performing huffman encoding 2016-08-17 21:05:04 +09:00
Tatsuhiro Tsujikawa
afdd51ff15 Merge branch 'weliu-master' 2016-08-17 20:51:24 +09:00
Wenfeng Liu
488c3588d9 lib: Malloc nghttp2_buf_chain array once in nghttp2_bufs_wrap_init2()
to simplify logic
2016-08-17 20:48:03 +09:00
Tatsuhiro Tsujikawa
4f02b191d1 Merge branch 'weliu-master' 2016-08-16 13:03:13 +09:00
Tatsuhiro Tsujikawa
8acef2711b Use pointer-to-pointer idiom to construct linked list 2016-08-16 13:02:24 +09:00
Tatsuhiro Tsujikawa
c6111b3792 Add test for nghttp2_hd_deflate_hd_vec 2016-08-16 11:11:06 +09:00
Tatsuhiro Tsujikawa
c4d36aeff7 Make parameters const pointer 2016-08-16 10:55:51 +09:00
Tatsuhiro Tsujikawa
f50596e355 Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master 2016-08-16 09:59:50 +09:00
Wenfeng Liu
abf81b5bb7 lib: Add nghttp2_hd_deflate_hd_vec() deflate API to support multiple bufs input 2016-08-15 10:28:45 +00:00
Tatsuhiro Tsujikawa
8579b8a968 Merge pull request #646 from nghttp2/invalid-header-cb
Add nghttp2_on_invalid_header_callback
2016-08-15 11:13:20 +09:00
Tatsuhiro Tsujikawa
8df2c357d9 nghttp: Adjust weight according to Firefox stable 2016-08-11 21:59:34 +09:00
Tatsuhiro Tsujikawa
4c381611a1 More doc about HPACK decoding API 2016-08-11 11:47:53 +09:00
Tatsuhiro Tsujikawa
7dfd6ab1ad Merge branch 'weliu-master' 2016-08-11 11:34:03 +09:00
Tatsuhiro Tsujikawa
0c7d48dede Make result type of hd_inflate_commit_indexed void 2016-08-11 11:33:09 +09:00
Tatsuhiro Tsujikawa
4639a66e53 Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master 2016-08-11 11:30:51 +09:00
Wenfeng Liu
65cc2f0515 lib: since hd_inflate_commit_indexed() always return 0, remove the
return value check in nghttp2_hd_inflate_hd_nv().
2016-08-11 02:00:43 +00:00
Tatsuhiro Tsujikawa
4eb7f98449 Remove old doc about differential encoding in HPACK 2016-08-10 21:32:36 +09:00
Wenfeng Liu
2d8059a9a5 Merge pull request #1 from nghttp2/master
Merge from nghttp2/nghttp2
2016-08-10 10:39:33 +08:00
Tatsuhiro Tsujikawa
a3d22b6db9 Merge branch 'weliu-master' 2016-08-09 22:05:12 +09:00
Tatsuhiro Tsujikawa
3f31424ee2 Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master 2016-08-09 22:01:10 +09:00
Wenfeng Liu
e0119452a3 Use memeq() instead of lstreq() in lookup_token(). 2016-08-09 04:15:38 +00:00
Tatsuhiro Tsujikawa
60cae325bc Search dynamic table first for optimization 2016-08-08 00:27:16 +09:00
Tatsuhiro Tsujikawa
16c46114dc More strict stream state handling
Previously, in server side, we used closed streams to detect the error
that the misbehaving client sends a frame on the incoming stream it
explicitly closed.  With this commit, we make a further step, and
detect one more error case.  Since we retain closed streams as long as
the sum of its size and the number of opened streams are equal or less
than max concurrent streams, we can safely say that if we get a frame
which is sent on the stream that is not found in either closed or
opened stream, it is already closed or has not existed.  Then we can
send GOAWAY.

The previous code shrinks closed streams when we closed another
stream, but now it is removed.  It is enough to adjust closed streams
when new incoming stream is created.

While creating this commit, we noticed that
NGHTTP2_INITIAL_MAX_CONCURRENT_STREAMS is defined as INT32_MAX.  But
since SETTINGS can contain value up to UINT32_MAX, it is not enough.
However, since the stream ID space is limited to INT32_MAX, it is high
enough.  We could keep this value, but this time we deprecate
NGHTTP2_INITIAL_MAX_CONCURRENT_STREAMS macro.  While it is in public
header, the effect of deprecating it is negligible because of the
reason we wrote above, and usually application sets much smaller value
(say, 100) as SETTINGS_MAX_CONCURRENT_STREAMS.
2016-08-07 19:31:00 +09:00
Tatsuhiro Tsujikawa
862175b21c Merge branch 'weliu-master' 2016-08-06 22:44:10 +09:00
Tatsuhiro Tsujikawa
e7e3d77c53 Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master 2016-08-06 22:42:22 +09:00
Wenfeng Liu
af9aeee752 1. Modify genlibtokenlookup.py to remove redundant header comparisons.
2. Remove inline qualifier of lookup_token() in genlibtokenlookup.py.
2016-08-05 09:56:15 +00:00
Tatsuhiro Tsujikawa
ad3d43b8be nghttpx: Add access log variable for backend host and port
Use $backend_host and $backend_port.  $backend_host is backend host
name given in --backend option.  It could be a path to UNIX domain
socket.
2016-08-05 00:04:47 +09:00
Tatsuhiro Tsujikawa
210a5c4f01 nghttpx: Use copy instead of const reference of backend group 2016-08-04 23:11:45 +09:00
Tatsuhiro Tsujikawa
d8822f2a8e Merge branch 'weliu-master' 2016-08-04 22:25:49 +09:00
Tatsuhiro Tsujikawa
b7a72b1e5a Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master 2016-08-04 22:25:25 +09:00
Tatsuhiro Tsujikawa
2f106dc96b Fix wrong tree operation to avoid cycle
https://tools.ietf.org/html/rfc7540#section-5.3.3 explains how to
transform dependency tree to avoid circular dependency.  Previously,
we wrongly always moved the dependent stream under the root stream.
The correct destination is the parent stream of the stream to
reprioritize.  This commit fixes this bug.
2016-08-04 22:20:07 +09:00
Wenfeng Liu
f619286ca3 Make get_max_index() return the max index in frame, so we don't need
to do extra calculation
2016-08-04 01:26:13 +00:00
Tatsuhiro Tsujikawa
271f7fbbb6 Add nghttp2_on_invalid_header_callback
nghttp2_on_invalid_header_callback is similar to
nghttp2_on_header_callback, but the former is only called when the
invalid header field is received which is silently ignored when the
callback is not set.  With this callback, application inspects the
incoming invalid field, and it also can reset stream from this
callback by returning NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE, or using
nghttp2_submit_rst_stream() directly with the error code of choice.

We also added nghttp2_on_invalid_header_callback2, which uses
reference counted header fields.
2016-08-04 00:03:58 +09:00
Tatsuhiro Tsujikawa
318235db33 Log frame's stream ID for header debug logging
Previously, for PUSH_PROMISE frame, we logged its promised stream ID.
But it is saner to use just frame's ID in this context.
2016-08-03 00:17:38 +09:00
Tatsuhiro Tsujikawa
8ab079ccc2 Call error callback when invalid header field is received and ignored
We have a code to call error callback when invalid header is received
and it is treated as stream error.  But we didn't if the incoming
header is invalid, but just ignored.  This generosity is required to
handle public Internet connections especially when nghttp2 is used as
forward proxy.
2016-08-03 00:13:37 +09:00
Tatsuhiro Tsujikawa
a4d2104c3c Revert "Output availability of ALPN in configure summary"
This reverts commit f4a4abd180.
2016-08-02 22:00:00 +09:00
Tatsuhiro Tsujikawa
44672e437a Update man pages 2016-07-31 21:16:34 +09:00
Tatsuhiro Tsujikawa
fb3d6f68a8 Merge branch 'nghttpx-reload' 2016-07-31 21:03:13 +09:00
Tatsuhiro Tsujikawa
d7c9015d8b Update doc 2016-07-31 20:59:06 +09:00
Tatsuhiro Tsujikawa
54f640f3e1 nghttpx: Update doc 2016-07-31 20:50:07 +09:00
Tatsuhiro Tsujikawa
e2906025c8 nghttpx: Don't exit from save_pid and set_alpn_prefs 2016-07-31 20:35:10 +09:00
Tatsuhiro Tsujikawa
9a8e9815c9 nghttpx: Cleanup 2016-07-31 20:26:03 +09:00
Tatsuhiro Tsujikawa
8c3e864989 nghttpx: Define ~Config for automatic clean up with std::unique_ptr
Now config global is backed with std::unique_ptr.  configuration
swapping dance is now a bit cleaner, but YMMV.
2016-07-31 19:01:29 +09:00
Tatsuhiro Tsujikawa
22570b7260 nghttpx: Close fd when error occurred in reload operation
This commit also fixes the bug that old configuration is still used
for worker process.  The another bug fix is that inherited, but not
used fd is not closed in worker process.  That makes reloading next
configuration fail if it contains the address which are leaked into
worker process.
2016-07-31 18:47:03 +09:00
Tatsuhiro Tsujikawa
fb49182c29 nghttpx: Move original_argv, argv, argc, and cmdcfgs to StartupConfig 2016-07-31 16:34:55 +09:00
Tatsuhiro Tsujikawa
b9b648e0ed nghttpx: Remove last_worker_pid from Config
The last_worker_pid is known by inspecting the last entry of
worker_processes.
2016-07-31 16:20:00 +09:00
Tatsuhiro Tsujikawa
494775a25d nghttpx: Rename SignalServer with WorkerProcess 2016-07-31 16:16:23 +09:00
Tatsuhiro Tsujikawa
1214f9e23b nghttpx: Reload configuration with SIGHUP
This commit implements configuration reloading with SIGHUP.
There are rough edges left:

* Rename SignalServer with more meaningful name, say, WorkerProcess.
* We should introduce global configuration object which is not
  affected by configuration reloading.  It should hold cmdcfgs, argc,
  argv, and last worker PID.
* We should close the listener file descriptor when some operation was
  failed after that.
2016-07-31 15:57:41 +09:00
Tatsuhiro Tsujikawa
a54cda22ab nghttpx: Do creation of InheritedAddr in a dedicated function for reuse 2016-07-31 00:35:15 +09:00
Tatsuhiro Tsujikawa
f4a4abd180 Output availability of ALPN in configure summary 2016-07-29 19:50:36 +09:00
Tatsuhiro Tsujikawa
c9559b5c0d Document about ALPN in nghttpx howto 2016-07-29 19:37:52 +09:00
Tatsuhiro Tsujikawa
af5b354685 nghttp: next_weight_idx is enough to be an local variable 2016-07-29 19:36:05 +09:00
Tatsuhiro Tsujikawa
3c1c2c4aad nghttp: Allow multiple -p option
The N-th -p options sets N-th URI's weight.  If the number of -p is
less than the number of URIs, the last -p value is repeated.  If no -p
is set, use default weight, 16.
2016-07-27 05:10:27 +09:00
Tatsuhiro Tsujikawa
767ed255ca Bump up version number to 1.14.0-DEV 2016-07-21 22:53:26 +09:00
Tatsuhiro Tsujikawa
aa0023b3c1 Update man pages 2016-07-21 21:24:01 +09:00
Tatsuhiro Tsujikawa
3bdc143474 Bump up version number to 1.13.0, LT revision to 23:0:9 2016-07-21 21:20:52 +09:00
Tatsuhiro Tsujikawa
8b50cc0ece Update doc 2016-07-21 21:18:21 +09:00
Tatsuhiro Tsujikawa
a24c94e92a Update doc 2016-07-18 00:25:59 +09:00
Tatsuhiro Tsujikawa
a00442bee6 Work with Android NDK r12b
clang + libc++ does not work, it still requires libc++_shared.so
runtime even if -lstdc++ is used, which supposed to link with static
version of libc++.
2016-07-17 23:41:41 +09:00
Tatsuhiro Tsujikawa
f857b63986 Fix warning with Sphinx 1.4 2016-07-16 19:34:39 +09:00
Tatsuhiro Tsujikawa
cbd72da9a1 Update man pages 2016-07-16 19:10:34 +09:00
Tatsuhiro Tsujikawa
7506a93179 doc: Fix Sphinx build warnings 2016-07-16 19:08:38 +09:00
Tatsuhiro Tsujikawa
53e1623ab3 Update doc
It was markdown, we should use reST.
2016-07-16 12:51:04 +09:00
Tatsuhiro Tsujikawa
0cb0bdabec Update doc 2016-07-13 22:01:31 +09:00
Tatsuhiro Tsujikawa
ed8d5f04bb Update doc 2016-07-10 19:07:03 +09:00
Tatsuhiro Tsujikawa
33153010c5 nghttpx: Retry memcached connection
Previously, we didn't retry request on connection failure.  Sometimes
we hit the edge case where connection is about to lost just when we
write request.  To avoid this situation, we now retry request to
failed attempt.  We also add ConnectBlocker to MemcachedConnection not
to attempt to connect to memcached if connection could not be made
previously.
2016-07-08 23:41:53 +09:00
Tatsuhiro Tsujikawa
2c500b62fd Update doc 2016-07-07 23:26:15 +09:00
Tatsuhiro Tsujikawa
30f26a2b9d nghttpx: Explicitly cast to uint32_t for hash calculation 2016-07-06 23:58:53 +09:00
Tatsuhiro Tsujikawa
ca39c71ac3 examples: Fix compile error with OpenSSL v1.1.0-beta2 2016-07-06 23:32:50 +09:00
Tatsuhiro Tsujikawa
2bbe4422d2 nghttpx: Use consistent hashing for client IP based session affinity
We use technique described in https://github.com/RJ/ketama
2016-07-06 23:31:10 +09:00
Tomasz Buchert
5d3535126e Fix FTBFS on armel by explicitly including the <mutex> header. 2016-07-05 00:04:23 +09:00
Tatsuhiro Tsujikawa
d2addbc1ed Add test for canceling PUSH_PROMISE 2016-07-02 21:19:54 +09:00
Tatsuhiro Tsujikawa
110ca3131a Cancel frame transmission from before_frame_send_callback
We define the behaviour when NGHTTP2_ERR_CANCEL is returned from
before_frame_send_callback.  That is to cancel the frame passed to the
callback.
2016-07-02 19:21:08 +09:00
Tatsuhiro Tsujikawa
fd7d3c57d7 nghttpx: Use faster version of power
In our use case, x and y is quite small, and there is no chance for
overflow, and y is always integer.
2016-06-27 22:42:28 +09:00
Tatsuhiro Tsujikawa
179561e4be nghttpx: Cast to double to fix build with gcc 4.8 on Solaris 11 2016-06-27 22:33:25 +09:00
Tatsuhiro Tsujikawa
903e0077aa nghttpx: Fix build error with libressl 2016-06-27 22:29:07 +09:00
Tatsuhiro Tsujikawa
3fadad1bf3 Bump up version number to 1.13.0-DEV 2016-06-26 22:44:40 +09:00
Tatsuhiro Tsujikawa
acb5d45a88 Update man pages 2016-06-26 22:33:46 +09:00
Tatsuhiro Tsujikawa
6fd4dd99da nghttpx: Update doc 2016-06-26 22:33:17 +09:00
Tatsuhiro Tsujikawa
1bcf13b28b Update man pages 2016-06-26 20:01:25 +09:00
Tatsuhiro Tsujikawa
c7210908df Bump up version number to 1.12.0 2016-06-26 19:58:44 +09:00
Tatsuhiro Tsujikawa
ad7cded2f4 examples: Check return value from nghttp2_submit_settings 2016-06-26 19:57:29 +09:00
Tatsuhiro Tsujikawa
7d847d8796 Update bash_completion 2016-06-26 00:04:28 +09:00
Tatsuhiro Tsujikawa
ab9cc37ca0 Update man pages 2016-06-26 00:04:17 +09:00
Tatsuhiro Tsujikawa
65095c448d nghttpx: Fix compile error with gcc -Werror=comment 2016-06-25 23:57:40 +09:00
Tatsuhiro Tsujikawa
76e188e368 nghttpx: Fix compile error with gcc 2016-06-25 23:57:26 +09:00
Tatsuhiro Tsujikawa
0613a16c11 nghttpx: Fix compile error without --with-mruby 2016-06-25 23:56:46 +09:00
Tatsuhiro Tsujikawa
aced5b3b6c nghttpx: Fix memory leak from CertLookupTree 2016-06-25 23:47:22 +09:00
Tatsuhiro Tsujikawa
97d8bb16e6 nghttpx: Update doc 2016-06-25 23:37:29 +09:00
Tatsuhiro Tsujikawa
3e14f0d8a5 nghttpx: Fix compile error with openssl 1.0.1
openssl lacks SSL_CTX_get0_certificates().
2016-06-25 23:35:37 +09:00
Tatsuhiro Tsujikawa
f7c0d48152 nghttpx: Rewrite CertLookupTree using Router 2016-06-25 22:52:01 +09:00
Tatsuhiro Tsujikawa
2a4733857f nghttpx: Reduce TTFB with large number of incoming connections
To reduce TTFB with large number of incoming connections, we now
intentionally accept one connection at a time, so that it does not
delay the TTFB of the existing connection.  This is significant
especially for TLS connections.
2016-06-25 11:50:33 +09:00
Tatsuhiro Tsujikawa
3c1efeff55 nghttpx: Don't reset read timer on write in LiveCheck 2016-06-24 22:25:43 +09:00
Tatsuhiro Tsujikawa
532f801fbd nghttpx: Don't reset read timer on write in memcached connection 2016-06-24 00:11:29 +09:00
Tatsuhiro Tsujikawa
cbced219ec nghttpx: Rewrite read timer handling
For HTTP/2, read timer starts when there is no downstream, and timer
stops when there is at least one downstream.  For HTTP/1, read timer
starts when request handling finished, and timer stops when request
handling starts.
2016-06-24 00:04:39 +09:00
Tatsuhiro Tsujikawa
66ca8272ca nghttpx: Clean up neverbleed AF_UNIX socket 2016-06-23 23:04:47 +09:00
Tatsuhiro Tsujikawa
f945653ba9 integration: Add tests for the case where response ends before request
This commit also fixes the rare issue that connection is not made
properly because of race between nghttpx process and TCP client
connection.
2016-06-23 22:21:12 +09:00
Tatsuhiro Tsujikawa
fdc27c9f0e Specify 1 for 2nd parameter of fwrite as a convention 2016-06-22 23:29:09 +09:00
Tatsuhiro Tsujikawa
3aa0ebbbd6 Revert "Robust handling for ssize_t on Win32 platform"
This reverts commit c42296acf1.
2016-06-22 21:29:34 +09:00
Tatsuhiro Tsujikawa
aa16412850 nghttpx: Add --backend-max-backoff option 2016-06-22 00:13:43 +09:00
Tatsuhiro Tsujikawa
e2bdf1d734 nghttpx: Enforce the fact that api and healthmon are mutually exclusive 2016-06-21 22:44:26 +09:00
Tatsuhiro Tsujikawa
4aa79763be Clarify code path when appending inflight_settings 2016-06-21 22:32:08 +09:00
Tatsuhiro Tsujikawa
057db65657 Rewrite session_append_inflight_settings 2016-06-21 22:30:21 +09:00
Tatsuhiro Tsujikawa
c42296acf1 Robust handling for ssize_t on Win32 platform
Now we define NGHTTP2_SSIZE_T which is typedef-ed to the appropriate
type depending on the platform (x86/x86_64).

See GH-616 for details
2016-06-21 22:06:20 +09:00
Tatsuhiro Tsujikawa
d6def22ad5 Update tutorials according to the updated tutorial client/server sources 2016-06-19 23:03:04 +09:00
Tatsuhiro Tsujikawa
cdd72bad77 examples: Add ALPN support to tutorial client/server
This commit adds ALPN support to tutorial client/server.  It also adds
a code to check h2 was negotiated, if not, drop connection.

For tutorial server, now it sends connection preface just after TLS
handshake was made without waiting for the client connection preface.
2016-06-19 22:32:47 +09:00
Tatsuhiro Tsujikawa
123752a032 nghttpx: Handle error from push_upload_data and end_upload_data
We have to gracefully handle the case where response ends before
request body is fully received.
2016-06-17 22:32:15 +09:00
Tatsuhiro Tsujikawa
ec5e438a7c nghttpx: Make backend fail with TLS handshake failure, including ALPN mismatch 2016-06-17 00:53:38 +09:00
Tatsuhiro Tsujikawa
c0b6b9a282 nghttpx: Use 16KiB buffer for reading to match TLS record size 2016-06-17 00:50:40 +09:00
Tatsuhiro Tsujikawa
1fb3d71f77 Update man pages 2016-06-17 00:26:29 +09:00
Tatsuhiro Tsujikawa
43d595b7f3 integration: Add tests for healthmon 2016-06-17 00:24:14 +09:00
Tatsuhiro Tsujikawa
fa8bccbae2 nghttpx: Move api enabled to APIConfig 2016-06-17 00:09:15 +09:00
Tatsuhiro Tsujikawa
56e7cd4be2 nghttpx: Add healthmon parameter to -f option to enable health monitor mode 2016-06-17 00:00:37 +09:00
Tatsuhiro Tsujikawa
af9662f971 nghttpx: Make API processing one of alternative mode 2016-06-16 23:30:35 +09:00
Tatsuhiro Tsujikawa
af4e262d47 nghttpx: Use AI_NUMERICSERV 2016-06-16 23:06:17 +09:00
Tatsuhiro Tsujikawa
96218a1078 nghttpx: Fast backend replacement on multi thread environment 2016-06-16 23:04:06 +09:00
Tatsuhiro Tsujikawa
50c9c3358a nghttpx: Silence logging 2016-06-16 22:12:42 +09:00
Tatsuhiro Tsujikawa
6f025619de nghttpx: Use dedicated worker for API processing
Some API processing is very slow (e.g., getaddrinfo).  To avoid to
slow down regular request handling, if multi threaded configuration is
enabled, we allocate dedicated worker for API.
2016-06-16 21:22:36 +09:00
Tatsuhiro Tsujikawa
7e31340045 nghttpx: Receive reference of std::mt19937, not making a copy 2016-06-16 21:11:39 +09:00
Tatsuhiro Tsujikawa
cddb411495 nghttpx: Fix bug that backend never return to online 2016-06-16 00:57:26 +09:00
Tatsuhiro Tsujikawa
92572203e7 nghttpx: Fix stack buffer overflow with API call 2016-06-16 00:39:11 +09:00
Tatsuhiro Tsujikawa
57259481c8 Fix typo 2016-06-15 00:42:03 +09:00
Tatsuhiro Tsujikawa
c7b0e04498 Add nghttp2_option_set_max_send_header_block_length API function
This function sets the maximum length of header block (a set of header
fields per HEADERS frame) to send.  The length of given set of header
fields is calculated using nghttp2_hd_deflate_bound().  Previously,
this is hard-coded, and is 64KiB.
2016-06-15 00:05:15 +09:00
Tatsuhiro Tsujikawa
47fa56fd0a Update man pages 2016-06-14 00:26:36 +09:00
Tatsuhiro Tsujikawa
fd09d8b861 integration: Rename method names 2016-06-14 00:19:27 +09:00
Tatsuhiro Tsujikawa
d48d399fb3 nghttpx: Allow query in API endpoint 2016-06-13 22:11:26 +09:00
Tatsuhiro Tsujikawa
34468eccc4 Update doc 2016-06-13 21:19:01 +09:00
Tatsuhiro Tsujikawa
81bfb84b32 nghttpx: Rename backend/replace API as backendconfig 2016-06-13 21:17:53 +09:00
Tatsuhiro Tsujikawa
11bca9a98a h2load: Document the behaviour when -d is used with HTTP/1.1 connection 2016-06-12 18:56:32 +09:00
Tatsuhiro Tsujikawa
2868370f9e h2load: http1: Send header + body in one packet 2016-06-12 18:54:06 +09:00
Tatsuhiro Tsujikawa
9f6c947a87 h2load: Use memchunks 2016-06-12 18:50:52 +09:00
Tatsuhiro Tsujikawa
1a2dc1e822 h2load: Add content-length header field for HTTP/2 and SPDY as well 2016-06-12 17:52:47 +09:00
Tatsuhiro Tsujikawa
9bdf214f48 Merge branch 'h2load-http1-upload' 2016-06-12 17:45:42 +09:00
Tatsuhiro Tsujikawa
7469139dda h2load: Implement HTTP/1 upload
h2load has supported uploading a file quite a while, but it turns out
that it worked with HTTP/2 and SPDY only.  HTTP/1 with upload did not
work.  This commit fixes this bug, and implement HTTP/1 upload.  Due
to architectural limitation of h2load, when -d option is used, the
number of in-flight pipe-lined requests is set to 1.
2016-06-12 17:42:12 +09:00
Tatsuhiro Tsujikawa
51c7a13cee Merge branch 'nghttpx-rev-wildcard-router' 2016-06-11 18:47:27 +09:00
Tatsuhiro Tsujikawa
c06e8c89ff nghttpx: Use BlockAllocator in match_downstream_addr_group 2016-06-11 18:41:43 +09:00
Tatsuhiro Tsujikawa
a809da68a3 nghttpx: Aggregate router configuration into one struct 2016-06-11 18:25:38 +09:00
Tatsuhiro Tsujikawa
084206bace nghttpx: Handle edge case wildcard pattern and add tests
Suppose the wildcard patterns follows:

- *.nghttp2.org/foo
- *.img.nghttp2.org/bar

Previously, s.img.nghttp2.org/foo does not match anything.  Now it
matches first pattern.
2016-06-11 13:33:59 +09:00
Tatsuhiro Tsujikawa
288449b9bc nghttpx: Rewrite wildcard router 2016-06-10 23:43:44 +09:00
Tatsuhiro Tsujikawa
11e66510e4 Update man pages 2016-06-09 23:36:30 +09:00
Tatsuhiro Tsujikawa
38f4f50e93 nghttpx: Erase wildcard patterns with http2 proxy enabled 2016-06-09 23:32:27 +09:00
Tatsuhiro Tsujikawa
d36afb7cdb Merge branch 'nghttpx-session-affinity' 2016-06-09 23:23:56 +09:00
Tatsuhiro Tsujikawa
f9897f8ccd nghttpx: Fix bugs and crash when affinity is enabled 2016-06-09 23:17:41 +09:00
Tatsuhiro Tsujikawa
143d0b69b7 nghttpx: Implement client IP based session affinity 2016-06-09 22:35:59 +09:00
Tatsuhiro Tsujikawa
ac97c122d4 nghttpx: Fix memory leak 2016-06-06 00:16:25 +09:00
Tatsuhiro Tsujikawa
7751f4fb3b Add API integration tests with http/1.1 and SPDY 2016-06-05 23:36:04 +09:00
Tatsuhiro Tsujikawa
3cd0b87685 nghttpx: Make API endpoint work with SPDY 2016-06-05 23:35:30 +09:00
Tatsuhiro Tsujikawa
2867f03861 nghttpx: Close TODO comments 2016-06-05 23:02:50 +09:00
Tatsuhiro Tsujikawa
8248598601 Add integration tests for nghttpx API endpoint 2016-06-05 22:51:28 +09:00
Tatsuhiro Tsujikawa
4ef3f9d11c Update doc 2016-06-05 13:17:48 +09:00
Tatsuhiro Tsujikawa
c3817913ee Update man pages 2016-06-04 18:58:04 +09:00
Tatsuhiro Tsujikawa
6214c1b4b6 Update doc 2016-06-04 18:57:46 +09:00
Tatsuhiro Tsujikawa
2499b36801 Update bash_completion 2016-06-04 18:53:27 +09:00
Tatsuhiro Tsujikawa
d196639aed Update man pages 2016-06-04 18:53:13 +09:00
Tatsuhiro Tsujikawa
2c33da36cc Merge branch 'nghttpx-api-endpoint' 2016-06-04 18:51:56 +09:00
Tatsuhiro Tsujikawa
708c99c052 nghttpx: Describe api parameter in --frontend option 2016-06-04 18:48:16 +09:00
Tatsuhiro Tsujikawa
fbdfecc143 Add nghttpx API section 2016-06-04 18:42:30 +09:00
Tatsuhiro Tsujikawa
d3495405d9 nghttpx: Change API endpoint URI 2016-06-04 18:37:37 +09:00
Tatsuhiro Tsujikawa
aad2a24a22 nghttpx: Use JSON for API resposne body 2016-06-04 18:18:07 +09:00
Tatsuhiro Tsujikawa
27fa9c3c12 nghttpx: Only allow POST and PUT for API request 2016-06-04 17:55:48 +09:00
Tatsuhiro Tsujikawa
92db6820d8 nghttpx: Close API request connection for 400 and 413 response 2016-06-04 17:43:48 +09:00
Tatsuhiro Tsujikawa
851cbd49f4 nghttpx: Only parse backend option for API request for now 2016-06-04 17:43:37 +09:00
Tatsuhiro Tsujikawa
8288f5713b nghttpx: Add --api-max-request-body option to set maximum API request body size 2016-06-04 17:24:54 +09:00
Tatsuhiro Tsujikawa
951ef0c6d5 nghttpx: Fix typo 2016-06-04 17:23:47 +09:00
Tatsuhiro Tsujikawa
9653ae98a6 nghttpx: Send 100-continue for API request 2016-06-04 17:23:21 +09:00
Tatsuhiro Tsujikawa
d837887af6 nghttpx: Avoid copy 2016-06-04 16:23:50 +09:00
Tatsuhiro Tsujikawa
2a504224de nghttpx: Rename BlockAllocator::destroy as BlockAllocator::reset 2016-06-04 16:23:31 +09:00
Tatsuhiro Tsujikawa
d0bf247419 nghttpx: Refactor graceful shutdown in Http2Upstream
Instead of using bool flag, just stop prepare watcher.
2016-06-04 12:43:17 +09:00
Tatsuhiro Tsujikawa
9237d30e34 nghttpx: Remove flow_control_ from Http2Session
This is a legacy of SPDY era where it can disable flow control.
2016-06-04 12:38:39 +09:00
Tatsuhiro Tsujikawa
ef3fa23b2e nghttpx: Send GOAWAY for retired h2 backend connection 2016-06-04 12:36:22 +09:00
Tatsuhiro Tsujikawa
cb7269f334 nghttpx: Close and disallow h1 backend connection on backend replacement 2016-06-04 12:16:31 +09:00
Tatsuhiro Tsujikawa
0ca7c4cb38 nghttpx: Send notice to replace downstream via ConnectionHandler 2016-06-04 01:02:57 +09:00
Tatsuhiro Tsujikawa
43913838b4 nghttpx: Retain memory in Router 2016-06-03 23:52:44 +09:00
Tatsuhiro Tsujikawa
845aa7a710 nghttpx: Share downstream config object
This is the unit of sharing configurations to change
2016-06-03 19:57:43 +09:00
Tatsuhiro Tsujikawa
fe58614b23 nghttpx: Use std::shared_ptr for downstream addresses so that we can swap them 2016-06-03 01:20:49 +09:00
Tatsuhiro Tsujikawa
2fd095d036 nghttpx: Share the code to configure backends 2016-06-03 00:22:55 +09:00
Tatsuhiro Tsujikawa
09150a7927 nghttpx: Pass pointer to Config object to store parsed configurations 2016-06-02 23:59:59 +09:00
Tatsuhiro Tsujikawa
667c8b0e27 nghttpx: Add APIDownstreamConnection to handle API request
For those connections via frontend with api parameter, they use solely
APIDownstreamConnection.

In this commit, APIDownstreamConnection just consumes all request
body, and do nothing.  The next few commits implements our first API
endpoint: /v1/api/dynamicconfig.
2016-06-02 23:50:56 +09:00
Tatsuhiro Tsujikawa
2a0d0e798b nghttpx: Add api parameter to --frontend option to mark API endpoint 2016-06-02 23:50:00 +09:00
Tatsuhiro Tsujikawa
8b6947eda5 Merge pull request #605 from alagoutte/misc
fix warning: declaration of 'free' shadows a global declaration
2016-06-02 00:22:47 +09:00
Alexis La Goutte
88e635e0b9 fix warning: declaration of 'free' shadows a global declaration
With some old OS X release
2016-06-01 08:45:13 +02:00
Tatsuhiro Tsujikawa
3753b47475 src: Fix compiler warnings 2016-05-31 21:26:21 +09:00
Tatsuhiro Tsujikawa
be06f1d428 Add missing rst file 2016-05-30 00:13:04 +09:00
Tatsuhiro Tsujikawa
e4dc6cf432 src: Use nghttp2_session_set_local_window_size() 2016-05-29 23:34:38 +09:00
Tatsuhiro Tsujikawa
204f9a3ec7 Add nghttp2_session_set_local_window_size() API function 2016-05-29 23:13:11 +09:00
Tatsuhiro Tsujikawa
f68dc02d6b nghttpx: Remove unused private field from Connection object 2016-05-28 22:46:56 +09:00
Tatsuhiro Tsujikawa
2ca3bf7a7e nghttpx: Fix bug that timeout on h1 backend makes that backend unavailable 2016-05-28 22:41:24 +09:00
Tatsuhiro Tsujikawa
43b045e84c nghttpx: Fix compile error with gcc 2016-05-28 19:50:36 +09:00
Tatsuhiro Tsujikawa
852a320586 nghttpx: Cleanup code where request content-length is involved 2016-05-28 16:44:04 +09:00
Tatsuhiro Tsujikawa
631f977236 Update http-parser to f2c26ee500ab3921010fa7ec66243365611e77dd 2016-05-28 12:17:17 +09:00
Tatsuhiro Tsujikawa
046ec307c3 Bump up version number to 1.12.0-DEV 2016-05-26 23:04:46 +09:00
Tatsuhiro Tsujikawa
50083f0d22 Update man pages 2016-05-26 22:35:51 +09:00
Tatsuhiro Tsujikawa
c4fba5139c Bump up version number to 1.11.0, LT revision to 22:0:8 2016-05-26 22:33:17 +09:00
Tatsuhiro Tsujikawa
81b3e3811b nghttpx: Fix bug that 503 is returned if backend proto is not mixed 2016-05-26 04:49:36 +00:00
Tatsuhiro Tsujikawa
26eb983cf0 nghttpx: Fix bug that h2 is used while there is no h2 backend 2016-05-26 00:14:11 +09:00
Tatsuhiro Tsujikawa
e0491c2ee8 nghttpx: Refactor protocol selection in backend 2016-05-25 23:07:04 +09:00
Tatsuhiro Tsujikawa
fce7908fe6 Merge branch 'mix-backend-proto-tls' 2016-05-24 23:49:21 +09:00
Tatsuhiro Tsujikawa
2a4bf9f615 nghttpx: Allow mixed protocol and TLS settings among backends under same pattern 2016-05-24 23:36:43 +09:00
Tatsuhiro Tsujikawa
45f7c17932 nghttpx: Make backend fail if connect attempt is timed out 2016-05-24 21:59:24 +09:00
Tatsuhiro Tsujikawa
f2a1fadda9 nghttpx: Make backend fail if connect operation was timed out 2016-05-24 21:24:30 +09:00
Tatsuhiro Tsujikawa
98396f00ff nghttpx: Cleane up bit more of save_pid() 2016-05-24 01:32:11 +09:00
Tatsuhiro Tsujikawa
e7d5cfff30 nghttpx: Fix crash introduced in the previous commit 2016-05-24 00:10:53 +09:00
Tatsuhiro Tsujikawa
c308be39de nghttpx: Write PID in temporary file then rename
Write PID in temporary file first.  Then rename it as the real
destination.  It will avoid the issue that the external process may
read the empty PID file because of race condition.
2016-05-23 22:39:38 +09:00
Tatsuhiro Tsujikawa
65135bc319 nghttpx: Check null just in case 2016-05-22 21:57:24 +09:00
Tatsuhiro Tsujikawa
944297df28 Update bash_completion 2016-05-21 14:26:31 +09:00
Tatsuhiro Tsujikawa
f725e419e8 Update man pages 2016-05-21 14:25:03 +09:00
Tatsuhiro Tsujikawa
0fca352114 nghttpx: Make SETTINGS timeout value configurable
SETTINGS timeout can be configurable using
--frontend-http2-settings-timeout and
--backend-http2-settings-timeout.
2016-05-21 14:13:57 +09:00
Tatsuhiro Tsujikawa
9a3461e2b6 nghttpx: Use ev_timer_start intead of ev_timer_again for settings_timer_
Since we only use it once, we don't have to use ev_timer_again, and
stop timer manually.
2016-05-21 13:48:41 +09:00
Tatsuhiro Tsujikawa
0b9ee38db6 nghttpx: Handle corner case where session is going down just after ACK recved 2016-05-21 13:44:53 +09:00
Tatsuhiro Tsujikawa
a224aba577 nghttpx: No need to check activeness of SETTINGS ACK timer
We don't have to check activeness of SETTINGS ACK timer since we only
send SETTINGS frame without ACK only once per session at the moment.
2016-05-21 13:18:22 +09:00
Tatsuhiro Tsujikawa
9f770fec36 nghttpx: Save PID file after it is ready to accept connections 2016-05-21 10:42:09 +09:00
Tatsuhiro Tsujikawa
c39a669671 Merge branch 'nghttpx-settings-timeout-as-failure' 2016-05-21 10:41:52 +09:00
Tatsuhiro Tsujikawa
e6dfd4ff27 nghttpx: Call downstream_failure rather than on_failure in HTTP/1 backend 2016-05-21 10:34:47 +09:00
Tatsuhiro Tsujikawa
e99f3c58f7 nghttpx: Call downstream_failure where it should be
Also, we say connection succeeded only when we got SETTINGS ACK from
peer, rather than when we just connected to the peer in TCP or TLS.
2016-05-21 10:30:09 +09:00
Tatsuhiro Tsujikawa
2a3b6c11eb nghttpx: Don't restart SETTINGS timer, and fix log message in HTTP/2 frontend 2016-05-21 10:29:11 +09:00
Tatsuhiro Tsujikawa
e26d6a2b27 nghttpx: Don't re-enter offline if it is already in offline mode 2016-05-21 10:28:16 +09:00
Tatsuhiro Tsujikawa
dce7288658 nghttpx: Wait for SETTINGS ACK to make sure that backend h2 server is alive 2016-05-21 00:30:54 +09:00
Tatsuhiro Tsujikawa
d1968c4465 nghttpx: Treat backend failure if SETTINGS is not received within timeout 2016-05-19 23:12:34 +09:00
Tatsuhiro Tsujikawa
863fbffda4 Fix typo 2016-05-18 01:25:37 +09:00
Tatsuhiro Tsujikawa
629f1e6f0f nghttpx: Add connection: close to mruby response in graceful shutdown period 2016-05-18 01:21:23 +09:00
Tatsuhiro Tsujikawa
7a3c656adf nghttpx: Refactor 2016-05-15 21:05:20 +09:00
Tatsuhiro Tsujikawa
2a96d433ec Add nghttp2_hd_inflate_hd2() and deprecate nghttp2_hd_inflate_hd()
The difference between them are former has const qualifier to the |in|
parameter, which is desirable since it is effectively read-only.
2016-05-14 18:25:20 +09:00
Tatsuhiro Tsujikawa
796160cb77 nghttpx: Don't add chunked encoded response body for HEAD request 2016-05-14 17:47:58 +09:00
Tatsuhiro Tsujikawa
5c82a36072 nghttpd: Set content-length in status response 2016-05-14 17:29:50 +09:00
Tatsuhiro Tsujikawa
b011012d8f nghttpx: Use NGHTTP2_DATA_FLAG_NO_COPY for backend HTTP/2 session 2016-05-14 17:17:27 +09:00
Tatsuhiro Tsujikawa
8026bdd45a nghttpx: Don't keep backend connection if request buffer is not empty 2016-05-14 17:16:50 +09:00
Tatsuhiro Tsujikawa
5ff6da11b1 Refactor map remove 2016-05-14 11:34:51 +09:00
Tatsuhiro Tsujikawa
de3f2951b3 h2load: Robust error handling in POST data 2016-05-14 00:40:35 +09:00
Tatsuhiro Tsujikawa
d00788ceeb nghttp: More robust error handling while reading file 2016-05-14 00:23:44 +09:00
Tatsuhiro Tsujikawa
e0df95a1d8 nghttp: Eliminate zero length DATA frame at the end if possible 2016-05-14 00:18:22 +09:00
Tatsuhiro Tsujikawa
6d22898936 src: Compile with OpenSSL 1.1.0-pre5
* don't use CRYPTO_LOCK stuff (they are sorted out by openssl, and no
  application intervention is required, just like boringSSL)
* don't use OPENSSL_config
* use provided API to access BIO member
2016-05-07 16:18:58 +09:00
Tatsuhiro Tsujikawa
15a9dfbaea nghttpd: Enable kqueue if it is available on the running platform 2016-05-06 23:45:56 +09:00
Tatsuhiro Tsujikawa
c6facaf662 h2load: Enable kqueue if it is available in the running platform 2016-05-06 23:40:55 +09:00
Tatsuhiro Tsujikawa
60e443b90b h2load: Fix crash on exit on FreeBSD 2016-05-06 23:38:15 +09:00
Tatsuhiro Tsujikawa
d39335829d nghttpx: Enable kqueue by default
We enabled libev kqueue backend in nghttpx by default.  Since it might
not work on some platforms, we also added --no-kqueue option to
disable it.
2016-05-06 23:10:09 +09:00
Tatsuhiro Tsujikawa
5d4f3f36e3 Fix bug that PING flags are ignored in nghttp2_submit_ping 2016-05-05 23:11:10 +09:00
Tatsuhiro Tsujikawa
752b5b3d44 nghttpx: Just call execv instead of execve 2016-05-05 23:08:42 +09:00
Tatsuhiro Tsujikawa
70e8dc3761 ngttpx: Pass environ to execve 2016-05-02 23:39:14 +09:00
Tatsuhiro Tsujikawa
0ee80be995 Update man pages 2016-04-29 23:27:20 +09:00
Tatsuhiro Tsujikawa
3712c89a66 nghttpx: Use parameter instead of keyword for consistency 2016-04-29 22:47:49 +09:00
Tatsuhiro Tsujikawa
8e33f0a535 Update doc 2016-04-29 22:45:47 +09:00
Tatsuhiro Tsujikawa
fd801864e3 nghttpx: Add sni keyword to --backend option
The --backend-tls-sni-field is deprecated in favor of sni keyword.
--backend-tls-sni-field still works, and it overrides all sni keyword
in --backend option.  But it will be removed in the future release.
2016-04-29 14:42:18 +09:00
Tatsuhiro Tsujikawa
99f7e7e2a5 nghttpx: Add mruby env.server_addr and env.tls_used attributes 2016-04-29 12:17:25 +09:00
Tatsuhiro Tsujikawa
6c999e6fb5 nghttpx: Enable TLS session cache again in memcached connection 2016-04-28 22:57:34 +09:00
Tatsuhiro Tsujikawa
4aa4fe56e1 nghttpx: Destroy SSL object, and always lookup TLS session cache 2016-04-28 22:25:55 +09:00
Tatsuhiro Tsujikawa
09b97a3313 nghttpx: Add mruby env.server_port to return frontend server side port 2016-04-28 00:19:30 +09:00
Tatsuhiro Tsujikawa
d2f4e4e325 nghttpx: Always expect response trailer fields 2016-04-27 23:00:36 +09:00
Tatsuhiro Tsujikawa
dba0f35ee1 Avoid 0-length DATA if NGHTTP2_DATA_FLAG_NO_END_STREAM is set 2016-04-27 22:57:19 +09:00
Tatsuhiro Tsujikawa
2d2b72d4eb nghttpx: Don't add 0-length DATA when response HEADERS bears END_STREAM flag 2016-04-27 21:19:28 +09:00
Tatsuhiro Tsujikawa
b39ad3135d nghttpx: Don't use CN if we have dNSName or iPAddress field 2016-04-26 22:32:55 +09:00
Tatsuhiro Tsujikawa
13f97ccf45 integration: Workaround runtime error: cgo argument has Go pointer to Go pointer 2016-04-25 23:16:36 +09:00
Tatsuhiro Tsujikawa
43bbcd35aa Update releasechk 2016-04-25 22:41:48 +09:00
Tatsuhiro Tsujikawa
220f49b157 Bump up version number to 1.11.0-DEV 2016-04-25 22:41:48 +09:00
Tatsuhiro Tsujikawa
918ca4ca7c Update man pages 2016-04-25 22:02:56 +09:00
Tatsuhiro Tsujikawa
7d7dc830ef Bump up version number to 1.10.0, LT revision to 21:0:7 2016-04-25 22:01:26 +09:00
Tatsuhiro Tsujikawa
f939000ad9 Update man pages 2016-04-25 21:58:37 +09:00
Tatsuhiro Tsujikawa
4b34bc583d Update AUTHORS 2016-04-25 21:53:03 +09:00
Tatsuhiro Tsujikawa
91fce2f0e6 Merge branch 'bsuh-master' 2016-04-25 21:51:45 +09:00
Brian Suh
5487b64fa6 nghttpx: Fix downstream connect callback called early 2016-04-24 20:49:38 -07:00
Tatsuhiro Tsujikawa
b27107385e Update AUTHORS 2016-04-24 18:00:41 +09:00
Tatsuhiro Tsujikawa
3d00dd6537 nghttpx: Fix erroneous division by sizeof(...) 2016-04-24 17:42:24 +09:00
Tatsuhiro Tsujikawa
e85bc70bef clang-format 2016-04-24 13:49:57 +09:00
Tatsuhiro Tsujikawa
b0e98718f5 src: Handle return value of getsockopt 2016-04-24 00:42:11 +09:00
Tatsuhiro Tsujikawa
3d4a4cb617 Disable integration tests due to golang build failure 2016-04-23 20:50:49 +09:00
Tatsuhiro Tsujikawa
86777defa8 nghttpx: Workaround for some older gcc4.9 2016-04-23 18:20:50 +09:00
Tatsuhiro Tsujikawa
52b455cfeb Mention the removal of --backend-http2-connections-per-worker in migration guide 2016-04-23 00:46:10 +09:00
Tatsuhiro Tsujikawa
add182b495 Merge branch 'meconlen-data_unset' 2016-04-23 00:35:55 +09:00
Tatsuhiro Tsujikawa
3d948fd3d7 Zero fill in nghttp2_session_mem_send 2016-04-23 00:32:23 +09:00
Mike Conlen
e04e24c1c2 in nghttp2_session_send() data is declared uninitialized and used
after a call to nghttp2_session_mem_send_internal() which should
set it, however in nghttp2_session_mem_send_internal() it is
possible to return before setting the pointer.

This change initializes the variable to NULL where delcared and
sets the variable in nghttp2_session_mem_send_internal() to
NULL before possibly returning rather than after.

both options are not necessary but are both ideal practice
2016-04-21 22:53:19 +00:00
Tatsuhiro Tsujikawa
68059ccda9 nghttp: Use nghttp2_session_mem_recv 2016-04-21 23:30:35 +09:00
Tatsuhiro Tsujikawa
bc2b941866 nghttpx: Wildcard match for CN 2016-04-21 22:53:07 +09:00
Tatsuhiro Tsujikawa
9b81eec944 nghttpx: Remove trailing "." from SAN DNS name and CN 2016-04-21 22:44:26 +09:00
Tatsuhiro Tsujikawa
00bf701600 nghttpx: Truncate too long -b option signature 2016-04-18 23:45:33 +09:00
Tatsuhiro Tsujikawa
5339c1774c nghttpx: Log when backend group is shared 2016-04-16 22:04:35 +09:00
Tatsuhiro Tsujikawa
e41d8c2f62 Update man pages 2016-04-16 19:12:12 +09:00
Tatsuhiro Tsujikawa
73740477fb Update doc 2016-04-16 18:58:18 +09:00
Tatsuhiro Tsujikawa
f86a9d654d Update doc 2016-04-16 18:52:32 +09:00
Tatsuhiro Tsujikawa
6f52da834b nghttpx: Fix bug that server push from mruby script did not work 2016-04-16 18:52:14 +09:00
Tatsuhiro Tsujikawa
4041d1eb26 Don't send ALTSVC if stream is closing 2016-04-15 00:59:05 +09:00
Tatsuhiro Tsujikawa
81f81e6b70 nghttpx: Error handling without assert 2016-04-13 19:22:32 +09:00
Tatsuhiro Tsujikawa
a16daf109b nghttpx: Try next HTTP/1 backend address when connection cannot be made 2016-04-13 00:38:21 +09:00
Tatsuhiro Tsujikawa
b6708a4b87 nghttpx: Retry next HTTP/2 backend address when connection cannot be made 2016-04-13 00:38:08 +09:00
Tatsuhiro Tsujikawa
bda352bf73 Update http-parser 2016-04-11 23:14:15 +09:00
Tatsuhiro Tsujikawa
ca261a7971 Update sphinx_rtd_theme 2016-04-11 23:05:05 +09:00
Tatsuhiro Tsujikawa
0819716332 Update doc 2016-04-11 23:00:38 +09:00
Tatsuhiro Tsujikawa
a14cea6363 nghttpx: Enable link header field based push for non-final response 2016-04-10 18:58:54 +09:00
Tatsuhiro Tsujikawa
2cac7bb838 Update bash_completion 2016-04-10 17:00:11 +09:00
Tatsuhiro Tsujikawa
65378f80ea Update man pages 2016-04-10 16:59:57 +09:00
Tatsuhiro Tsujikawa
40f3779eb1 Pass unknown SETTINGS values to nghttp2_on_frame_recv_callback 2016-04-10 16:36:04 +09:00
Tatsuhiro Tsujikawa
d88f962565 Add test for altsvc frame 2016-04-09 22:32:48 +09:00
Tatsuhiro Tsujikawa
9c0bd8c60a Fix compile error (again) with gcc and --enable-werror 2016-04-09 22:01:15 +09:00
Tatsuhiro Tsujikawa
9e64d10223 nghttpx: Move fall/rise configuration to --backend option
This commit removes --backend-fall and --backend-rise options.  The
these configurations are now set as fall and rise parameters in
--backend option.
2016-04-09 21:58:08 +09:00
Tatsuhiro Tsujikawa
94c8a8fbde doc: Add missing rst files for cleaning 2016-04-09 19:43:10 +09:00
Tatsuhiro Tsujikawa
16647622f5 Fix compile error with gcc and --enable-werror 2016-04-09 19:37:35 +09:00
Tatsuhiro Tsujikawa
9028512a5f Merge branch 'altsvc' 2016-04-09 19:29:17 +09:00
Tatsuhiro Tsujikawa
3086d65657 altsvc: Update doc 2016-04-09 19:27:09 +09:00
Tatsuhiro Tsujikawa
d4144a7475 altsvc: Add tests, ignore altsvc if stream does not exist 2016-04-09 19:14:15 +09:00
Tatsuhiro Tsujikawa
6638ca9333 altsvc: Reduce bitfield size 2016-04-09 18:23:15 +09:00
Tatsuhiro Tsujikawa
b924ef5fff altsvc: Discard altsvc when it is received by server in earlier point 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
df56f55f84 Assign nghttp2_frame.ext.payload early 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
31595c2416 Embed nghttp2_ext_frame_payload into nghttp2_outbound_item 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
795ee8c20f altsvc: Receive ALTSVC frame 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
efbd48b122 altsvc: Add tx tests 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
9b4089c244 src: Log ALTSVC 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
8b5a85ae1d altsvc: Add error handling about origin and stream_id 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
ecabef2dc7 altsvc: Add ALTSVC frame support 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
4a6fc6cede src: Add missing source file to CMakeLists.txt 2016-04-08 23:19:54 +09:00
Tatsuhiro Tsujikawa
287d4e35f3 Merge branch 'nghttpx-downstream-live-check' 2016-04-08 23:07:30 +09:00
Tatsuhiro Tsujikawa
a803be9171 nghttpx: Check negotiated ALPN in LiveCheck 2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
ece3654139 nghttpx: Remove unused function declaration 2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
bf5392dafe nghttpx: Use exponential backoff between failed connection attempts in LiveCheck 2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
7bc35044c7 nghttpx: Add --backend-fall and --backend-rise options
These options are analogous to fall and rise parameter found in
haproxy.
2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
f9b872ab78 nghttpx: Detect online/offline state of backend servers 2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
ffddefc177 nghttpx: Refactor handling of negotiated ALPN 2016-04-08 23:06:37 +09:00
Tatsuhiro Tsujikawa
2a59c832c1 nghttpx: Set 0 to next_proto_len explicitly for clarification 2016-04-08 23:03:42 +09:00
Tatsuhiro Tsujikawa
ea5f424dec nghttpx: Use gRPC's exponential backoff algorithm 2016-04-05 22:31:27 +09:00
Tatsuhiro Tsujikawa
46514074a4 nghttpx: Better load balancing between backend HTTP/2 servers 2016-04-03 15:09:01 +09:00
Tatsuhiro Tsujikawa
1816af4fb2 Update authors 2016-04-03 10:26:00 +09:00
Tatsuhiro Tsujikawa
b1662a31f4 nghttpx: Fix crash with backend failure 2016-04-03 00:23:44 +09:00
Tatsuhiro Tsujikawa
5974abad75 Run error callback when peer does not send initial SETTINGS frame 2016-04-02 18:20:49 +09:00
Tatsuhiro Tsujikawa
344541dd89 nghttpx: Better distribute load to backend h2 servers 2016-04-02 00:02:48 +09:00
Tatsuhiro Tsujikawa
c17b3b8517 clang-format 2016-03-31 20:06:14 +09:00
Tatsuhiro Tsujikawa
b26503f51c Merge branch 'jchampio-dev/expect-continue' 2016-03-31 20:05:08 +09:00
Tatsuhiro Tsujikawa
2b22ec42c7 Merge branch 'dev/expect-continue' of https://github.com/jchampio/nghttp2 into jchampio-dev/expect-continue 2016-03-31 20:00:27 +09:00
Jacob Champion
dfdeeb3815 nghttp: only stop ContinueTimers if they exist
Fix a crash on disconnect if --expect-continue isn't actually in use.
2016-03-29 16:02:10 -07:00
Jacob Champion
4bed7854b5 nghttp: move ownership of ContinueTimer to Request
Each Request now owns its own (optional) ContinueTimer for
Expect/Continue handshakes. This removes the need for
shared_ptr/weak_ptr logic.
2016-03-29 13:11:27 -07:00
Jacob Champion
aa64e7ad3c nghttp: stop ContinueTimers on response or reset
If the stream itself is reset, or the server sends a final response
immediately, any Expect/Continue handshake should be cancelled.
2016-03-29 12:41:28 -07:00
Tatsuhiro Tsujikawa
8667bbb823 Don't send WINDOW_UPDATE if session is being closed 2016-03-29 23:30:55 +09:00
Tatsuhiro Tsujikawa
1fef49aaa4 Merge branch 'tsing-patch-1' 2016-03-29 22:11:58 +09:00
Tatsuhiro Tsujikawa
e30edb096a clang-format 2016-03-29 22:11:42 +09:00
Tatsuhiro Tsujikawa
cdb466956d nghttpx: One more fix for usage help 2016-03-29 22:10:30 +09:00
Jianqing Wang
199600af73 Fix error messages on deprecated mode 2016-03-29 12:09:52 +08:00
Jacob Champion
edb874e659 nghttp: move ContinueTimer start to on_frame_send
The ContinueTimer could expire before the full HEADERS frame was
actually sent. By moving the call to timer->start() to the
on_frame_send_callback(), this race is fixed.
2016-03-28 15:24:20 -07:00
Tatsuhiro Tsujikawa
fe0843be88 nghttpx: Fix bug that logger wrote string which was not NULL-terminated 2016-03-28 22:22:26 +09:00
Tatsuhiro Tsujikawa
ff07018720 nghttpx: Fix bug that proxy with HTTP/1.1 CONNECT did not work
This was a regression in 5fbe4cc225.
2016-03-28 22:05:38 +09:00
Tatsuhiro Tsujikawa
402eccf06d Bump up version number to 1.10.0-DEV 2016-03-27 22:29:09 +09:00
Tatsuhiro Tsujikawa
0641d314a6 Update man pages 2016-03-27 22:07:50 +09:00
Tatsuhiro Tsujikawa
2928afa51f Bump up version number to 1.9.1 2016-03-27 22:04:26 +09:00
Tatsuhiro Tsujikawa
757bcf1310 nghttpx: Fix bug that backend tls keyword did not work with -s option 2016-03-27 17:11:44 +09:00
Tatsuhiro Tsujikawa
c9aba4ea0c nghttpx: Don't use data_prd.source.ptr 2016-03-27 16:57:43 +09:00
Tatsuhiro Tsujikawa
2cee80acf0 nghttpx: Fix handing stream after connection check was failed 2016-03-27 15:53:26 +09:00
Tatsuhiro Tsujikawa
d9a2ff278c src: Use len instead of n for clarity 2016-03-27 15:52:24 +09:00
Tatsuhiro Tsujikawa
8a539420c2 Bump up version number to 1.10.0-DEV 2016-03-26 23:19:13 +09:00
Tatsuhiro Tsujikawa
371497968b Update bash_completion 2016-03-26 23:03:59 +09:00
Tatsuhiro Tsujikawa
388d7a944a Update man pages 2016-03-26 23:03:48 +09:00
Tatsuhiro Tsujikawa
afe724ecda Bump up version number to 1.9.0, LT revision to 20:0:6 2016-03-26 22:59:09 +09:00
Tatsuhiro Tsujikawa
0d636893f1 Update AUTHORS 2016-03-26 22:08:28 +09:00
Tatsuhiro Tsujikawa
4ac9417d8d Update doc 2016-03-26 21:45:38 +09:00
Tatsuhiro Tsujikawa
75110320ab Update doc 2016-03-26 21:43:34 +09:00
Tatsuhiro Tsujikawa
8691ec4899 Update github links 2016-03-26 00:58:32 +09:00
Tatsuhiro Tsujikawa
b6e2214903 Update doc 2016-03-26 00:09:02 +09:00
Tatsuhiro Tsujikawa
7ec50e55c9 Update doc 2016-03-25 23:53:59 +09:00
Tatsuhiro Tsujikawa
ad8be7d474 src: parse_link_header takes StringRef 2016-03-25 23:51:42 +09:00
Tatsuhiro Tsujikawa
07926cffca src: Remove lookup_method_token(const std::string&) 2016-03-25 23:31:46 +09:00
Tatsuhiro Tsujikawa
00b2d7d513 src: Remove lookup_token(const std::string&) 2016-03-25 23:29:16 +09:00
Tatsuhiro Tsujikawa
f74d7ea119 src: Don't allow const char * in starts_with 2016-03-25 23:20:48 +09:00
Tatsuhiro Tsujikawa
2bca6360b6 src: Don't allow const char * in istarts_with and istarts_with_l 2016-03-25 23:18:31 +09:00
Tatsuhiro Tsujikawa
841b3c87db src: Don't allow const char * in ends_with and ends_with_l 2016-03-25 23:04:44 +09:00
Tatsuhiro Tsujikawa
2ab79f4938 src: Don't allow const char * in iends_with and iends_with_l 2016-03-25 23:00:34 +09:00
Tatsuhiro Tsujikawa
2182a85875 src: Make strifind functin template 2016-03-25 22:56:23 +09:00
Tatsuhiro Tsujikawa
72d8d78d36 src: Don't allow const char * in 2nd argument of streq_l(S[N], T) 2016-03-25 22:53:31 +09:00
Tatsuhiro Tsujikawa
dad61d032e src: Don't allow const char * in 2nd argument of strieq_l(S[N], T) 2016-03-25 22:51:20 +09:00
Tatsuhiro Tsujikawa
1bbb241baa src: Make streq(T, S) function template 2016-03-25 22:48:13 +09:00
Tatsuhiro Tsujikawa
3e6c38e3be src: Made strieq(T, S) template 2016-03-25 22:45:33 +09:00
Tatsuhiro Tsujikawa
9272e80fa6 nghttpx: Fix compile error on travis 2016-03-25 02:28:10 +09:00
Tatsuhiro Tsujikawa
333dd73a18 Update man pages 2016-03-25 02:15:29 +09:00
Tatsuhiro Tsujikawa
8e84bbd781 Update doc 2016-03-25 02:15:02 +09:00
Tatsuhiro Tsujikawa
44af3dab50 nghttpx: Update doc 2016-03-25 02:14:39 +09:00
Tatsuhiro Tsujikawa
22128767e6 nghttpx: Fix formatting issue on manual page 2016-03-25 02:08:25 +09:00
Tatsuhiro Tsujikawa
f6b78a027c Update doc 2016-03-25 01:57:00 +09:00
Tatsuhiro Tsujikawa
a46c815e4e src: StringRef-fy 2016-03-25 01:41:06 +09:00
Tatsuhiro Tsujikawa
186d440168 nghttpx: More StringRef-fy 2016-03-25 01:19:42 +09:00
Tatsuhiro Tsujikawa
a9e365ad7d fixup! nghttpx: More StringRef-fy 2016-03-25 01:10:48 +09:00
Tatsuhiro Tsujikawa
a104d8a80b fixup! nghttpx: Use StringRef for SHRPX_UNIX_PATH_PREFIX 2016-03-25 01:10:25 +09:00
Tatsuhiro Tsujikawa
a5029d1eed nghttpx: More StringRef-fy 2016-03-25 01:07:22 +09:00
Tatsuhiro Tsujikawa
848e45e333 nghttpx: Use StringRef for SHRPX_UNIX_PATH_PREFIX 2016-03-25 01:00:04 +09:00
Tatsuhiro Tsujikawa
7972593586 integration: Fix tests 2016-03-25 00:56:20 +09:00
Tatsuhiro Tsujikawa
79968c6374 src: Rewrite strifind 2016-03-25 00:27:59 +09:00
Tatsuhiro Tsujikawa
1699aef609 src: Remove strcompare 2016-03-25 00:16:25 +09:00
Tatsuhiro Tsujikawa
2d2d6c3cc0 src: Remove istarts_with(const char*) overload 2016-03-25 00:14:12 +09:00
Tatsuhiro Tsujikawa
bfccab9b9f src: Remove starts_with(const char*, const char*) overload 2016-03-25 00:09:53 +09:00
Tatsuhiro Tsujikawa
17ccbae084 src: Don't compare against c-string 2016-03-25 00:07:21 +09:00
Tatsuhiro Tsujikawa
0875e66aab src: Remove streq(const char *) overload 2016-03-25 00:02:07 +09:00
Tatsuhiro Tsujikawa
4dfae3484f nghttpx: Refactor CertLookupTree interface 2016-03-24 23:35:15 +09:00
Tatsuhiro Tsujikawa
372123c178 nghttpx: Remove strieq(const char*, cosnt char*) overload, and fix unittests 2016-03-24 23:34:56 +09:00
Tatsuhiro Tsujikawa
13596bde90 nghttpx: Refactor option handling using StringRef 2016-03-24 22:15:58 +09:00
Jacob Champion
3b7b6a660e nghttp: prevent ContinueTimer double-invocation
If a 100 Continue interim response was received after the continue
timeout was reached, dispatch_continue() would force a double submission
of DATA frames. This patch prevents dispatch_continue() from doing
anything if the timer callback has already been invoked. This makes
ContinueTimer a single-shot mechanism, as originally intended.
2016-03-23 09:09:13 -07:00
Tatsuhiro Tsujikawa
daa1ae3a45 nghttpx: Cosmetic change 2016-03-24 00:38:10 +09:00
Tatsuhiro Tsujikawa
44ee67ff71 nghttpx: Refactor split_host_port 2016-03-24 00:35:13 +09:00
Tatsuhiro Tsujikawa
144ae3af9d nghttpx: Memcached connection encryption with tls keyword
Like frontend and backend options, encryption for memcached
connections is configured using tls keyword in
tls-session-cache-memcached and tls-ticket-key-memcached options.
tls-session-cache-memcached-tls and tls-ticket-key-memcached-tls
options are deprecated.
2016-03-24 00:22:13 +09:00
Tatsuhiro Tsujikawa
eec0b04a33 nghttpx: Enable/disable TLS per frontend address
This change allows user to disable TLS per frontend address using
no-tls keyword in --frontend option.  We removed --frontend-no-tls in
favor of this new feature.
2016-03-23 23:56:09 +09:00
Tatsuhiro Tsujikawa
58b06f32a2 nghttpx: Configure TLS per backend routing pattern
We added "tls" parameter to --backend option to enable TLS on that
backend connection.  --backend-tls options was deprecated, now is
noop.
2016-03-23 22:56:18 +09:00
Tatsuhiro Tsujikawa
5b58db39ff nghttpx: Fix failure case when comparing backend address set 2016-03-23 22:13:53 +09:00
Jacob Champion
1bc5cf5ee4 nghttp: time out on long Expect/Continue waits
To deal with servers that don't conform to RFC 7231 (or, potentially,
connections with a large round-trip time), don't wait forever for a 100
Continue status to come back. Currently, the timeout is hard-coded to
one second.

A ContinueTimer encapsulates the handshake timeout logic for a single
request. Somewhat counterintuitively, ContinueTimers are owned by the
HttpClient instead of the Request object, because their lifetime must be
bound to the life of the connection (which is owned by the HttpClient
and not the Requests). A Request is associated with its corresponding
ContinueTimer through a std::weak_ptr.
2016-03-22 13:10:00 -07:00
Jacob Champion
f4c7ebcbca nghttp: implement Expect/Continue handshake
Requests that expect a 100 Continue will not submit their DATA frames
until the server sends the interim response.
2016-03-22 13:10:00 -07:00
Jacob Champion
feb3d1b478 nghttp: add an --expect-continue option
Add a placeholder for the expect-continue option, which will perform an
Expect/Continue handshake for DATA uploads.
2016-03-22 13:10:00 -07:00
Tatsuhiro Tsujikawa
7c954c1ea7 nghttpx: Workaround for Ubuntu 15.04 which does not value-initialize on std::make_shared. 2016-03-23 01:32:17 +09:00
Tatsuhiro Tsujikawa
e9f4d0eec2 nghttpx: Properly log incoming GOAWAY from backend 2016-03-23 01:16:44 +09:00
Tatsuhiro Tsujikawa
4f9c78799c nghttpd: Fix compile error with Android NDK 2016-03-23 01:16:02 +09:00
Tatsuhiro Tsujikawa
0f9ed40bd9 nghttpx: Share connection among different patterns if address set are same 2016-03-23 00:01:27 +09:00
Tatsuhiro Tsujikawa
4bb88b35ec nghttpx: "*" must match at least one character 2016-03-22 22:40:23 +09:00
Tatsuhiro Tsujikawa
04145e22a2 Revert "nghttpx: Call setsid after executing new binary"
This reverts commit 6680d8b792.
2016-03-22 00:21:32 +09:00
Tatsuhiro Tsujikawa
cca7e398fd Update doc 2016-03-21 16:11:35 +09:00
Tatsuhiro Tsujikawa
3d04fe2a87 Update doc 2016-03-21 13:08:53 +09:00
Tatsuhiro Tsujikawa
c459034ae9 Update doc 2016-03-20 18:28:01 +09:00
Tatsuhiro Tsujikawa
442bd47535 Update bash_completion 2016-03-20 18:15:02 +09:00
Tatsuhiro Tsujikawa
5cea3e227c Update man pages 2016-03-20 18:14:40 +09:00
Tatsuhiro Tsujikawa
db0a22e991 Update doc 2016-03-20 18:13:44 +09:00
Tatsuhiro Tsujikawa
dc3119303a Rewrite concat_string_ref 2016-03-20 17:55:17 +09:00
Tatsuhiro Tsujikawa
d2b55ad1a2 nghttpx: Allow '*' in --error-page to be used as wildcard 2016-03-19 23:49:15 +09:00
Tatsuhiro Tsujikawa
d7051f5207 nghttpx: Add custom error pages 2016-03-19 23:41:21 +09:00
Tatsuhiro Tsujikawa
db1ee3aa88 nghttpd: Use StringRef 2016-03-19 20:57:40 +09:00
Tatsuhiro Tsujikawa
a1e0bd134e nghttpx: Create at least the same number of h2 session as load balancing hosts 2016-03-19 12:00:27 +09:00
Tatsuhiro Tsujikawa
7a1e0eb618 integration: Disable tests that sometimes break randomly on travis 2016-03-19 11:50:01 +09:00
Tatsuhiro Tsujikawa
65b59bd78a Include config.h from tests/*.h 2016-03-19 11:46:49 +09:00
Tatsuhiro Tsujikawa
dcae6efaa2 nghttpx: Rewrite Downstream::assemble_request_cookie using StringRef 2016-03-19 11:38:09 +09:00
Tatsuhiro Tsujikawa
71cc7a96c2 Merge branch 'Lekensteyn-cmake' 2016-03-19 11:35:27 +09:00
Tatsuhiro Tsujikawa
8da0d649e4 Merge branch 'cmake' of https://github.com/Lekensteyn/nghttp2 into Lekensteyn-cmake 2016-03-19 11:20:31 +09:00
Peter Wu
08c7656e47 travis: remove -DCMAKE_BUILD_TYPE=None
It was added because the default RelWithDebInfo type disabled
assertions, but now that -DNDEBUG is removed from its flags, it is not
necessary to change the build type anymore.
2016-03-17 23:34:14 +01:00
Peter Wu
bd253e1bdd cmake: fix Windows build with CUnit
failmalloc and main tests succesfully pass the test now.
2016-03-17 23:32:07 +01:00
Peter Wu
d10f149161 cmake: fix Windows support
Fix Windows build by defining `ssize_t` when missing and adjusting the
install commands.

Add support for ENABLE_WERROR=1 while at it.

Tested with MSVC 2013 on Windows 7 x64.
2016-03-16 17:33:20 +01:00
Peter Wu
3a2a943fe9 cmake: do not fail without libxml2
Avoid adding a LIBXML2_LIBRARIES-NOTFOUND to the libraries list when it
is not found. Likewise for OpenSSL.
2016-03-16 17:33:10 +01:00
Peter Wu
f34971774b cmake: use -std=c++11 instead of -std=gnu+11
Matches autotools behavior. The m4_if logic was misread...
2016-03-16 14:52:42 +01:00
Peter Wu
f8a9a21428 cmake: add _U_ and NGHTTP2_NORETURN to config.h
Do not add _U_ and NGHTTP2_NORETURN definitions to the command line,
instead add it to config.h. This matches what autotools does.
2016-03-16 14:25:58 +01:00
Peter Wu
0c49e5d56e cmake: enable assertions by default
Users can disable this by setting -DCMAKE_C_FLAGS=-DNDEBUG or
-DCMAKE_CXX_FLAGS=-DNDEBUG to disable assertions as desired.
2016-03-16 14:10:42 +01:00
Tatsuhiro Tsujikawa
e84755eb35 Merge pull request #542 from Lekensteyn/build-fixes
src/Makefile.am: fix missing allocator.h
2016-03-15 23:44:20 +09:00
Peter Wu
b348a02b85 cmake: fix printed C/CXX flags
Build type-specific flags are added before other flags, reflect this in
the output.
2016-03-15 13:58:53 +01:00
Peter Wu
439636c579 cmake: set CMAKE_BUILD_TYPE=RelWithDebInfo by default
NOTE: RelWithDebInfo *disables* assertions by default. To keep
assertions, use CMAKE_BUILD_TYPE=Debug or CMAKE_BUILD_TYPE=None.
2016-03-15 13:40:15 +01:00
Peter Wu
162b1c5e03 cmake: only install ASIO headers when requested 2016-03-15 00:02:46 +01:00
Peter Wu
dc56b951df src/Makefile.am: fix missing allocator.h
Fix regression from v1.8.0-38-gbae37e3 breaking distcheck.
2016-03-14 17:49:23 +01:00
Peter Wu
4d801cd696 travis: add cmake to build matrix
Add Nathan's PPA for cmake 3.2.3 (3.0 or newer is required).
2016-03-14 17:26:59 +01:00
Peter Wu
7c55c335cc Merge branches 'master' and 'cmake-updated' into cmake
Update to latest master with appropriate cmake changes at the same time.
2016-03-14 17:26:15 +01:00
Peter Wu
2ddb83206b cmake: sync with v1.8.0-63-g37b09f6
Adds missing source files and configure.ac changes since
v1.7.0-93-g093eb51.
2016-03-14 17:20:37 +01:00
Tatsuhiro Tsujikawa
ab734f09b6 nghttpx: Fix possible crash in rare case 2016-03-15 00:46:15 +09:00
Tatsuhiro Tsujikawa
dd2bdf3e31 nghttpx: Update doc 2016-03-14 23:53:10 +09:00
Tatsuhiro Tsujikawa
a909bb3eca nghttpx: Initialize proto field 2016-03-14 23:47:29 +09:00
Tatsuhiro Tsujikawa
aaebeceded Merge pull request #538 from Jan-E/master
Fixes and improvements for Makefile.MSVC
2016-03-14 23:00:23 +09:00
Tatsuhiro Tsujikawa
3de435d7b8 contrib: Use simple form in prerequisites 2016-03-14 22:57:26 +09:00
Tatsuhiro Tsujikawa
01408209d8 nghttpx: Fix the bug that forwarded query contains duplicated '?'
This change also fixes that bug that the multiple '/' at the start of
request were not coalesced into one.
2016-03-14 22:20:00 +09:00
Jan-E
e8b62c620d Revert change of NGHTTP2_VERSION_NUM, keep the parentheses around VERSION_NUM, not in the sed -e 2016-03-14 14:13:19 +01:00
Tatsuhiro Tsujikawa
2eb7137e04 Merge branch 'Lekensteyn-autotools-it' 2016-03-14 21:15:59 +09:00
Tatsuhiro Tsujikawa
caa12ec587 Merge branch 'autotools-it' of https://github.com/Lekensteyn/nghttp2 into Lekensteyn-autotools-it 2016-03-14 21:12:33 +09:00
Jan-E
0f71fbce8d Generate nghttp2ver.h before compiling 2016-03-13 18:57:58 +01:00
Jan-E
4e2972a5dc Use string for NGHTTP2_VERSION_NUM, e.g 0x010800: do not add parentheses 2016-03-13 18:43:44 +01:00
Jan-E
78e5417ff2 Remove -nologo: not used in VC11/VC14, throws error in VC9 2016-03-13 18:31:14 +01:00
Jan-E
77852cf572 Use string for NGHTTP2_VERSION_NUM, e.g 0x010800 2016-03-13 18:24:32 +01:00
Jan-E
fa36537f82 Detect version for releases en dev versions 2016-03-13 18:18:22 +01:00
Jan-E
4cde76c9c3 Do not use Cython by default 2016-03-13 18:13:46 +01:00
Jan-E
e02512032b Fix missing external symbol nghttp2_rcbuf_new2 2016-03-13 18:12:39 +01:00
Peter Wu
b092166bc6 cmake: clean more files, fix python dependency
Remove generated documentation, python and mruby build artifacts.
Note that this does not work for Ninja, Makefile works fine though.
2016-03-13 17:36:03 +01:00
Tatsuhiro Tsujikawa
e58db4f8b0 Attempt to fix compile error with msvc 2016-03-14 00:54:02 +09:00
Peter Wu
dad222b8f4 cmake: fix jemalloc, libevent include dirs
Caught with cmake --warn-uninitialized.
2016-03-13 16:42:35 +01:00
Peter Wu
e80977c812 integration-tests: do not use recursive target
Older automake (travis, *cough*) do not support the
AM_EXTRA_RECURSIVE_TARGETS option, this results in invoking "it-local"
directly in the travis script which relies on an implementation detail.

Since the "it" target is only used by the integration-tests directory,
just avoid the recursive targets. The README.rst suggests to enter the
integration-tests directory anyway.
2016-03-13 15:40:17 +01:00
Peter Wu
2b3bc710fc cmake: fix version checks for external packages
The name passed to find_package should match the one that is passed to
find_package_handle_standard_args, otherwise the version matching is not
properly done. The names are based on the FindXXX.cmake filename.

This also simplifies components reporting for Libevent (done by
find_package_handle_standard_args) and results in reporting a library
instead of include directory when found.
2016-03-13 15:06:56 +01:00
Peter Wu
a45540fd79 Lower libev version requirement
libev 4.11 seems to build fine as demonstrated by Travis with autotools.
2016-03-13 13:15:50 +01:00
Peter Wu
7f8110601e cmake: fix compatibility with cmake before 3.3
The COMPILE_LANGUAGE generator expression is only supported since CMake
3.3. Moreover, it does not work with all generators (works with Makefile
and Ninja, but not with Visual Studio).

target_compile_options would only work if a target does not mix C and
C++ sources, since the flags are intended to be set for a specific
language, use set_source_files_properties instead. This approach is also
less repetitive.

Drop the idea of using lists and COMPILE_OPTIONS,
set_source_files_properties only understands COMPILE_FLAGS (a single
string, not a list).
2016-03-13 12:30:41 +01:00
Tatsuhiro Tsujikawa
37b09f6785 Use %u for uint8_t for formatting 2016-03-13 18:25:30 +09:00
Tatsuhiro Tsujikawa
2a606bae4c Add nghttp2_error_callback to tell application human readable error message 2016-03-13 18:22:52 +09:00
Tatsuhiro Tsujikawa
3b2811bfc4 nghttpx: Remove AltSvc ctor 2016-03-13 14:01:59 +09:00
Tatsuhiro Tsujikawa
27275a02ac nghttpx: Remove unused EMPTY_STRING 2016-03-13 13:59:06 +09:00
Tatsuhiro Tsujikawa
34d209b30b nghttpx: Add wildcard host routing
This change allows host pattern in --backend to include '*' to
indicate wildcard match.  The wildcard match is made in suffix match
only.
2016-03-13 01:01:34 +09:00
Tatsuhiro Tsujikawa
94f52d49dc BlockAllocator: Delete copy ctor and assignment operator 2016-03-12 21:25:53 +09:00
Tatsuhiro Tsujikawa
0720671e0a Merge branch 'nghttpx-block-allocator' 2016-03-12 21:21:34 +09:00
Tatsuhiro Tsujikawa
0ee09320e0 src: Remove unused value_to_str 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
78fcb2143f Update doc 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
755b14de5d src: Unify path_join implementation 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
3455cb35e4 nghttpx: Rewrite create_forwarded to use BlockAllocator 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
c1571a3209 src: Rewrite xff handling 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
67569486d1 src: Rewrite http:create_via_header_value 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
d64051fedc src: Return StringRef from http2::stringify_status 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
c897d5b294 src: Use StringRef in parse_http_date 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
863a944179 src: Add specialization for char to avoid reinterpret_cast in constexpr 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
3db9c2c796 Remove extra tokenization of header names; they are not effective at best 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
12dad32890 Add nghttp2_on_header_callback2 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
689d2a1afb Fix compile error with --enable-debug 2016-03-12 21:12:27 +09:00
Tatsuhiro Tsujikawa
ff0d137fb3 Reference counted HPACK name/value pair 2016-03-12 21:12:27 +09:00
Tatsuhiro Tsujikawa
8da20975f9 Always allocate buffer for name, and value 2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
eb393985b7 nghttpx: Make a copy before adding header to Downstream 2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
7a412df9a5 nghttpx: Fix tests 2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
b1b57cc740 nghttpx: Use StringRef for authority, scheme and path 2016-03-12 21:12:26 +09:00
Peter Wu
bdb6581990 Add CMake-related files to EXTRA_DIST 2016-03-12 01:38:12 +01:00
Peter Wu
618073e2b4 cmake: add "check" target
Add a "check" target that builds tests before running them.
2016-03-12 00:57:30 +01:00
Tatsuhiro Tsujikawa
fa601e5ba3 Add isolation_threshold, use field to store block size rather than template parameter 2016-03-09 21:25:11 +09:00
Tatsuhiro Tsujikawa
bae37e3e4a nghttpx: Add custom memory allocator mainly for header related objects 2016-03-09 21:16:28 +09:00
Tatsuhiro Tsujikawa
907eeeda8a src: Return StringRef from util::get_uri_field 2016-03-08 21:38:15 +09:00
Tatsuhiro Tsujikawa
fe6ccd16da nghttpx: Change read timeout reset timing 2016-03-05 19:11:36 +09:00
Tatsuhiro Tsujikawa
10ec00126c src: Don't process rel=preload again once we found it 2016-03-04 23:00:33 +09:00
Tatsuhiro Tsujikawa
2d6211c455 asio: Fix bug that server event loop breaks with exception
This can happen when we call throwing version of
basic_stream_socket::remote_endpoint() call while client disconnected.
2016-03-04 22:43:36 +09:00
Tatsuhiro Tsujikawa
e302cc9c16 src: Simplify function parameter using StringRef 2016-03-04 00:38:43 +09:00
Tatsuhiro Tsujikawa
3f2b54cfc4 src: Refactor using StringRef 2016-03-04 00:33:35 +09:00
Tatsuhiro Tsujikawa
acbf38fd3c src: Refactor using StringRef, simplify function parameters 2016-03-04 00:26:59 +09:00
Tatsuhiro Tsujikawa
1e8bea15e5 src: Use StringRef inside LinkHeader 2016-03-03 23:31:44 +09:00
Tatsuhiro Tsujikawa
aaf0177318 src: Use str_size 2016-03-03 23:23:51 +09:00
Tatsuhiro Tsujikawa
9afc017532 src: Don't push if Link header field includes nopush 2016-03-03 23:20:32 +09:00
Tatsuhiro Tsujikawa
5da38b22c0 h2load: Fix bug that it did not try to connect to server again 2016-03-02 22:24:14 +09:00
Tatsuhiro Tsujikawa
ce61f62644 h2load: Fix bug that initial max concurrent streams was too large 2016-03-02 21:18:42 +09:00
Peter Wu
2c525f2471 cmake: ignore "make install" artifact 2016-02-29 16:20:31 +01:00
Peter Wu
5bbcb7148c cmake: update .gitignore files 2016-02-29 16:13:19 +01:00
Peter Wu
8bca2d1048 cmake: fix libevent binary names
Match the output produced by autotools (libevent-client instead of
libevent_client).
2016-02-29 16:11:26 +01:00
Peter Wu
d6c3b6e84c cmake: fix mruby dependency
Ensure that the mruby build is triggered when the surrogate "mruby-lib"
target is used. Fixes building nghttpx when mruby is missing.
2016-02-29 16:00:08 +01:00
Tatsuhiro Tsujikawa
e453759637 Add nghttp2_option_set_no_auto_ping_ack() option
This option prevents the nghttp2 library from sending PING frame with
ACK flag set in the reply to incoming PING frame.  To allow the
application to send PING with ACK flag set, nghttp2_submit_ping() now
recognizes NGHTTP2_FLAG_PING in its flags parameter.
2016-02-29 23:39:50 +09:00
Tatsuhiro Tsujikawa
a21c87d11c Add nghttp2_http2_strerror() to return HTTP/2 error code string 2016-02-29 23:10:20 +09:00
Tatsuhiro Tsujikawa
478fde5fef nghttpx: Fix compile error 2016-02-29 01:16:45 +09:00
Tatsuhiro Tsujikawa
bffc0ec87a Update doc 2016-02-29 01:00:03 +09:00
Tatsuhiro Tsujikawa
1b9b03b68f Update man pages 2016-02-29 00:55:16 +09:00
Tatsuhiro Tsujikawa
a59445ccff Merge branch 'nghttpx-rewrite-h2-coalesce' 2016-02-29 00:52:19 +09:00
Tatsuhiro Tsujikawa
c2ec73302d integration: Fix tests + gofmt 2016-02-29 00:37:51 +09:00
Tatsuhiro Tsujikawa
284691253f nghttpx: Use StringRef for http::create_forwarded parameter 2016-02-29 00:05:32 +09:00
Tatsuhiro Tsujikawa
124d4c9fad src: Fix tests 2016-02-29 00:05:32 +09:00
Tatsuhiro Tsujikawa
5fbe4cc225 nghttpx: Clear upgrade_request flag when Downstream is attached to HTTP/2 backend 2016-02-28 23:21:57 +09:00
Tatsuhiro Tsujikawa
df6466cfbd nghttpx: Update doc 2016-02-28 23:15:57 +09:00
Tatsuhiro Tsujikawa
2326337d32 nghttpx: Deprecate backend-http1-connections-per-host in favor of backend-connections-per-host 2016-02-28 22:15:49 +09:00
Tatsuhiro Tsujikawa
06921f35f3 nghttpx: Restructure mode settings
It is very hard to support multiple protocols in backend while
retaining multiple mode settings.  Therefore, we dropped modes except
for default and HTTP/2 proxy mode.  The other removed modes can be
emulated using combinations of options.  Now the backend connection is
not encrypted by default.  To enable encryption on backend connection,
use --backend-tls option.
2016-02-28 21:35:26 +09:00
Tatsuhiro Tsujikawa
44d3801760 nghttpx: Deprecate backend-http1-connections-per-frontend in favor of backend-connections-per-frontend 2016-02-28 17:11:12 +09:00
Tatsuhiro Tsujikawa
1832f78684 nghttpx: Move downstream proto to DownstreamAddrGroup 2016-02-28 16:56:14 +09:00
Tatsuhiro Tsujikawa
e7601cde8a nghttpx: Don't share session which is already in draining state 2016-02-28 12:41:34 +09:00
Tatsuhiro Tsujikawa
36f6a009b8 nghttpx: Effectively disable backend HTTP/2 connection flow control
This is required to avoid session stall because of too slow frontend
connection.
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
1e1752266f Update doc 2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
aafcc55006 nghttpx: Deprecate --http2-max-concurrent-streams option
We added 2 new option instead: --frontend-http2-max-concurrent-streams
and --backend-http2-max-concurrent-streams.
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
c731d1fea5 nghttpx: Deprecate --backend-http2-connections-per-worker option 2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
aa892e4d37 nghttpx: Share TLS session cache between HTTP/2 and HTTP/1 backend 2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
8ca3e5f6ba nghttpx: Separate Downstream address group from config to runtime 2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
21007da392 nghttpx: Rewrite backend HTTP/2 connection coalesce strategy
Previously, we use one Http2Session object per DownstreamAddrGroup.
This is not flexible, and we have to provision how many HTTP/2
connection is required in advance.  The new strategy is we add
Http2Session object on demand.  We measure the number of attached
downstream connection object and server advertised concurrency limit.
As long as former is smaller than the latter, we attach new downstream
connection to it.  Once the limit is reached, we create new
Http2Session object.  If the number lowers the limit, we start to
share Http2Session object again.
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
9eeac27966 makerelease.sh: Remove duplicate git module update --init 2016-02-26 00:57:34 +09:00
Tatsuhiro Tsujikawa
e6ff7e1e4a Bump up version number to 1.9.0-DEV 2016-02-26 00:53:42 +09:00
Tatsuhiro Tsujikawa
d1f9f9a3aa makerelease.sh: Add autoreconf 2016-02-26 00:00:52 +09:00
Tatsuhiro Tsujikawa
2415a22757 h2load: Fix uninitialized fields 2016-02-26 00:00:24 +09:00
Tatsuhiro Tsujikawa
887d4d2a41 Update bash_completion 2016-02-25 23:35:44 +09:00
Tatsuhiro Tsujikawa
1c8e625045 Update man pages 2016-02-25 23:35:23 +09:00
Tatsuhiro Tsujikawa
36e931e0d7 Bump up version number to 1.8.0, LT revision to 19:0:5 2016-02-25 23:33:16 +09:00
Tatsuhiro Tsujikawa
31d4077638 Remove files copied in the rule for apiref.rst target 2016-02-25 23:18:21 +09:00
Tatsuhiro Tsujikawa
c098b4ac70 nghttpx: Remove --backend-tls-session-cache-per-worker option 2016-02-25 22:46:25 +09:00
Tatsuhiro Tsujikawa
32446a5197 Revert "Update doc"
This reverts commit 8aac5d6af2.
2016-02-25 21:19:38 +09:00
Tatsuhiro Tsujikawa
40c1b29f36 Handle extension frame in session_inbound_frame_reset 2016-02-25 21:18:59 +09:00
Tatsuhiro Tsujikawa
bc933e9981 src: Use lowercase to show it is not the name of frame 2016-02-25 21:18:09 +09:00
Tatsuhiro Tsujikawa
ba34e911e1 Merge branch 'simple-extensions' 2016-02-25 01:00:35 +09:00
Tatsuhiro Tsujikawa
8aac5d6af2 Update doc 2016-02-25 00:58:50 +09:00
Tatsuhiro Tsujikawa
56bdfd1df2 Revert "Handle extension frame in session_inbound_frame_reset"
This reverts commit dbffb8995b.
2016-02-25 00:58:24 +09:00
Tatsuhiro Tsujikawa
dbffb8995b Handle extension frame in session_inbound_frame_reset 2016-02-25 00:45:24 +09:00
Tatsuhiro Tsujikawa
ebfae904ab Fix typo 2016-02-25 00:32:17 +09:00
Tatsuhiro Tsujikawa
827abb57e9 Simplified bitfield calculation of extension frame 2016-02-24 23:59:01 +09:00
Tatsuhiro Tsujikawa
9aee43f7d8 Update doc for extension frames 2016-02-24 23:51:00 +09:00
Tatsuhiro Tsujikawa
34bf153653 Merge branch 'master' into simple-extensions 2016-02-24 23:21:03 +09:00
Tatsuhiro Tsujikawa
2782ef67de nghttpd: Remove unused function 2016-02-23 01:18:52 +09:00
Tatsuhiro Tsujikawa
9d15f9b00d nghttpd: Start SETTINGS timer after it is written to output buffer 2016-02-23 01:18:07 +09:00
Tatsuhiro Tsujikawa
3e72711e23 Cap 100 limit for remembering idle streams 2016-02-23 01:09:45 +09:00
Tatsuhiro Tsujikawa
f4bb8776d0 mruby: Clean up mrbgems as well 2016-02-23 01:06:23 +09:00
Tatsuhiro Tsujikawa
95ffb4565f Update nghttpx documentation 2016-02-21 18:20:53 +09:00
Tatsuhiro Tsujikawa
f3a415f623 Update nghttpx documentation 2016-02-21 17:47:27 +09:00
Tatsuhiro Tsujikawa
936d4aca1a Update h2load documentation 2016-02-21 17:46:48 +09:00
Tatsuhiro Tsujikawa
216ae0a328 Update nghttpx documentation 2016-02-21 17:36:10 +09:00
Tatsuhiro Tsujikawa
9672bc322f src: Remove unused functions 2016-02-21 16:51:46 +09:00
Tatsuhiro Tsujikawa
b68be1e1fb src: Make token of type int32_t; we have no reason to use int16_t 2016-02-21 16:44:00 +09:00
Tatsuhiro Tsujikawa
f2a7275700 nghttpx: Cache TLS session inside DownstreamAddr object 2016-02-21 16:35:43 +09:00
Tatsuhiro Tsujikawa
177d0a513f nghttpx: More logging for backend connection initiation 2016-02-21 16:11:50 +09:00
Tatsuhiro Tsujikawa
dfc02843b6 src: Rename and rewrite numeric_hostport as to_numeric_addr and support AF_UNIX path 2016-02-21 15:28:11 +09:00
Tatsuhiro Tsujikawa
11c8803b92 nghttpx: Worker wide blocker which is used when socket(2) is failed 2016-02-21 15:27:19 +09:00
Tatsuhiro Tsujikawa
c9a4f293a1 nghttpx: ConnectBlocker per backend address 2016-02-21 14:53:06 +09:00
Tatsuhiro Tsujikawa
61579ad20f nghttpx: Use StringRef for shrpx::add_header 2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
9678daa46a nghttpx: Rename index_headers() as parse_content_length() 2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
23ecfd412d nghttpx: Fix mruby compile error, clean up add_header interface 2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
3ff148811b nghttpx: Use StringRef for add_hedeader 2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
6f1347fc8b nghttpx: Tokenize trailer field as well so that we can ditch prohibited headers in HTTP/2 2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
1703201084 nghttpx: Get rid of hdidx 2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
7921029e33 Tokenize extra HTTP header fields
The extra HTTP header fields are compiled from
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers,
https://en.wikipedia.org/wiki/List_of_HTTP_header_fields, and
https://www.owasp.org/index.php/List_of_useful_HTTP_headers.
2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
b7159f80b2 Eliminate the possibility of nghttp2_stream.cycle overflow 2016-02-18 23:56:29 +09:00
Peter Wu
9c874bf9b5 cmake: rename nghttpx-bin target to nghttpx
`ninja nghttpx` would create the static library, but I expected a binary
`nghttpx` instead. Rename the nghttpx target to nghttpx_static and
nghttpx-bin to nghttpx.
2016-02-18 14:20:35 +01:00
Peter Wu
9ab5ef3b5b cmake: make find_package non-QUIET
Also fix useless MRUBY_LIBRARIES output and add the CMake build type
(e.g. Release, Debug, etc.)
2016-02-16 16:29:39 +01:00
Tatsuhiro Tsujikawa
f0b5a8db8c Add unistd.h to test initgroups() declaration 2016-02-17 00:26:34 +09:00
Peter Wu
4814d14db5 cmake: fix installing nghttp2_asio.pc, manpages, README.rst 2016-02-16 16:25:50 +01:00
Peter Wu
77e8190b6c cmake: fix symbol visibility issues
libnghttp2.so was missing -fvisibility=hidden. libnghttp2_asio.so on the
other hand had hidden visibility which resulted in no exported symbols
and a broken asio client examples.

Just build a static nghttp2 library to solve this issue.
2016-02-16 16:04:01 +01:00
Peter Wu
f4b2a4ab00 cmake: always enable warnings without -Werror
Warnings are useful, let's enable them by default.
2016-02-16 14:57:05 +01:00
Peter Wu
a909eb6b23 cmake: fix linking http-parser into shared libs 2016-02-16 14:09:10 +01:00
Peter Wu
3dd57e1f59 cmake: fix feature availability reporting
Some detected libraries were not reported when a feature is disabled.
This change removes unnecessary second find_package calls and sets
HAVE_xxx immediately based on xxx_FOUND.
2016-02-16 14:01:44 +01:00
Peter Wu
1b67b2d33e cmake: improve Spdylay detection
Auto-detect spdylay availability using CMake, making pkg-config
completely optional.
2016-02-16 12:48:36 +01:00
Peter Wu
9bc6dc7113 cmake: add python support
FindCython.cmake was taken from
https://github.com/thewtex/cython-cmake-example. The UseCython module
works, but since it is lacking an installation target setup.py will be
used instead.
2016-02-16 12:17:49 +01:00
Peter Wu
f407f7f406 cmake: add mruby support, fix tests dir
mruby is always invoked now (mirrors the autotools behavior). It could
be optimized though to only trigger the mruby build when the static
library is missing.

Also fix typo in NGHTTP2_TESTS_DIR macro definition (detected when
invoking the Ninja generator).
2016-02-15 23:14:27 +01:00
Tatsuhiro Tsujikawa
094168a58f Merge branch 'Lekensteyn-tests-fixes' 2016-02-16 00:08:08 +09:00
Peter Wu
474ecc4b47 cmake: add neverbleed support 2016-02-15 10:50:31 +01:00
Peter Wu
0afc21c9d8 cmake: fix compilation in lib
Need to add -fPIC to objects that will be put in a shared library.
2016-02-15 10:49:55 +01:00
Peter Wu
63e43bff99 tests: remove unused macros
Since v0.6.2-7-g1d138ac ("Unify DATA and other frames in
nghttp2_outbound_item and save malloc()"), the macros are unused and the
builds fails on -Werror=unused-macros.
2016-02-15 10:20:13 +01:00
Peter Wu
8c46d9181f cmake: process tests directory
Split the nghttp2 library into objects and a shared library from those
objects. This is needed because of symbol visibility. An advantage over
the autotools build is that there are no worries about static versus
static library builds.

Test:

    cmake $srcdir
    make nghttpx-unittest main failmalloc
    make test
2016-02-15 01:57:13 +01:00
Peter Wu
cc92ebf471 cmake: add auto-detection, improve library search
Add auto-detection to the most important features (app, hpack, etc.).
Move options to a separate file for easier search.

Add cmake-based Libevent, jansson and CUnit search. Move pkg-config
handling for Libev and jemalloc to their cmake files.

Note: duplicates find_package before including CMakeOptions.txt and when
checking for features. Maybe that can be cleaned up later...
2016-02-15 01:12:07 +01:00
Tatsuhiro Tsujikawa
02b7116d42 Merge branch 'nghttpx-replace-unique-ptr-char-with-immutable-string' 2016-02-14 22:36:48 +09:00
Tatsuhiro Tsujikawa
aa3373a107 nghttpx: Use ImmutableString for mruby_file 2016-02-14 22:27:59 +09:00
Tatsuhiro Tsujikawa
7aabc6b125 nghttpx: Use ImmutableString for user 2016-02-14 22:21:55 +09:00
Tatsuhiro Tsujikawa
466e4b7a1e nghttpx: Use ImmutableString for conf_path 2016-02-14 22:20:10 +09:00
Tatsuhiro Tsujikawa
76a425226f nghttpx: Use ImmutableString for pid_file 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
2b707bff27 nghttpx: Use ImmutableString for log file 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
9055323b67 nghttpx: Use ImmutableString for request_header_file and response_header_file 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
67804cfc8c nghttpx: Use ImmutableString for ciphers 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
2344932b45 nghttpx: Use ImmutableString for dh_param_file 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
35ebdd35bc nghttpx: Use ImmutableString for private_key_file 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
ac81003669 nghttpx: Use ImmutableString for cert_file 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
c999987baf nghttpx: Use ImmutableString for private_key_file 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
529a59d309 nghttpx: Use ImmutableString for tls.client_verify.cacert 2016-02-14 22:17:10 +09:00
Tatsuhiro Tsujikawa
52f6417813 nghttpx: Use ImmutableString for tls.cacert 2016-02-14 22:17:00 +09:00
Peter Wu
c96cf1b303 cmake: improve final variable list
Remove build/host/target by a single target system name (CMake is
different for cross-compiling, you are suggested to set
CMAKE_TOOLCHAIN_FILE).

Fix various library variables, remove CFLAGS (INCLUDE_DIRS could be used
instead though, but I consider that minor information that could be
added later if wanted).

Fix various variable names (prefix, boost, etc.).
2016-02-14 13:22:32 +01:00
Tatsuhiro Tsujikawa
660bc389e6 nghttpx: Use ImmutableString for fetch_ocsp_response_file 2016-02-14 21:01:54 +09:00
Tatsuhiro Tsujikawa
bfc26e8299 nghttpx: Use ImmutableString to store memcached server host 2016-02-14 20:59:10 +09:00
Tatsuhiro Tsujikawa
47106c0756 Merge branch 'nghttpx-refactor-downstream-addr-group' 2016-02-14 20:49:30 +09:00
Tatsuhiro Tsujikawa
49fa914db5 nghttpx: Use StringRef for string parameters in match_downstream_addr_group 2016-02-14 20:48:06 +09:00
Tatsuhiro Tsujikawa
93eabc642b nghttpx: Use StringRef for parameter in Router::match 2016-02-14 19:07:22 +09:00
Tatsuhiro Tsujikawa
2d273f8237 nghttpx: Use StringRef for pattern paramter in Router::add_route 2016-02-14 18:55:53 +09:00
Tatsuhiro Tsujikawa
a53f0f0a17 nghttpx: Refactor DownstreamAddrGroup and router API 2016-02-14 18:47:24 +09:00
Tatsuhiro Tsujikawa
1bd98dcf4f nghttpx: Remove user defined ctor/assignment op from DownstreamAddr 2016-02-14 18:31:08 +09:00
Tatsuhiro Tsujikawa
eebed206c9 Add Architecture doc 2016-02-14 18:23:28 +09:00
Tatsuhiro Tsujikawa
fe74600a5f List all contributors in AUTHORS 2016-02-14 17:40:58 +09:00
Tatsuhiro Tsujikawa
08e2d7cdb3 Merge branch 'Lekensteyn-build-fixes' 2016-02-14 16:59:30 +09:00
Peter Wu
503f0a29a7 cmake: add integration-tests 2016-02-13 20:13:43 +01:00
Peter Wu
ee285fa5da cmake: process script/ 2016-02-13 20:13:43 +01:00
Peter Wu
8c562bd38d cmake: process contrib/ 2016-02-13 20:13:43 +01:00
Peter Wu
15adc23277 cmake: working doc (sphinx-build), out-of-tree! 2016-02-13 20:13:43 +01:00
Peter Wu
a2ec695ec9 cmake: add python stub
Might not be the best approach, maybe use thewtex/cython-cmake-example?
2016-02-13 20:13:43 +01:00
Peter Wu
55b270587b cmake: build examples 2016-02-13 20:13:43 +01:00
Peter Wu
5297136bc0 cmake: use PRIVATE instead of PUBLIC
Avoids leaking compile flags to dependents.
2016-02-13 20:13:43 +01:00
Peter Wu
61bb6428fd cmake: add third-party and src
Remaining work:
 - integrate mruby and neverbleed
 - integrate cunit
2016-02-13 20:13:42 +01:00
Peter Wu
ccd2d34160 cmake: Install headers 2016-02-13 20:13:42 +01:00
Peter Wu
ea6eed10c7 cmake: fix version in soname 2016-02-13 20:13:42 +01:00
Peter Wu
7a86758edb cmake: Fix libnghttp2.pc paths
Must be absolute instead of relative
2016-02-13 20:13:42 +01:00
Peter Wu
90d66ea4a9 cmake: fix detection of -Werror flag
Do not use minus sign in macro names.
2016-02-13 20:13:42 +01:00
Peter Wu
5b21c39bb2 cmake: add lib, add versioning info, install lib
Also remove some headers which were not checked anyway and add macros to
cmakeconfig.h.in (based on the headers list in the CMakeLists.txt file).
2016-02-13 20:13:42 +01:00
Peter Wu
744e80d579 cmake: Fill in auto-tools compatible paths 2016-02-13 20:13:42 +01:00
Peter Wu
3842fe175c cmake: attempt to get diagnostic output right 2016-02-13 20:13:42 +01:00
Peter Wu
900667a998 cmake: moar .in file via configure_file 2016-02-13 20:13:42 +01:00
Peter Wu
147e098827 cmake: test for warning flags 2016-02-13 20:13:42 +01:00
Peter Wu
5819d03c68 cmake: more functions
AC_CHECK_TYPES and AC_C_BIGENDIAN were removed because nothing checks
the resulting macros...
2016-02-13 20:13:42 +01:00
Peter Wu
90f5bf796d cmake: check more headers and sizeof 2016-02-13 20:13:42 +01:00
Peter Wu
2b63980758 cmake: more dependency checks 2016-02-13 20:13:42 +01:00
Peter Wu
65d33c553c CMake WIP
Not working:
 - option(... check)
 - not finished everything (see XXX and FIXME)
 - still halway converting
2016-02-13 20:13:42 +01:00
Peter Wu
2593036053 integration-tests: support out-of-tree tests
`go test` requires both config.go and the test files in the same
directory. For out-of-tree builds, config.go is normally not placed next
to the source files, so copy the tests to the build directory as a
workaround.
2016-02-13 20:11:50 +01:00
Peter Wu
a6effb4d23 doc: fix out-of-tree doc builds
Fixes multiple errors while making docs:

    Could not import extension sphinxcontrib.rubydomain (exception: No module named 'sphinxcontrib')

and

    ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'nghttp.1'
    ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'nghttpd.1'
    ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'nghttpx.1'
    ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'h2load.1'
    ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'programmers-guide'
2016-02-13 20:11:50 +01:00
Peter Wu
17215002a1 examples: fix compile warnings
Fixes the following two warnings:

    examples/client.c:292:0: error: macro "MAX_OUTLEN" is not used [-Werror=unused-macros]
    examples/tiny-nghttpd.c:298:13: error: function declaration isn’t a prototype [-Werror=strict-prototypes]

Caught using cmake as the autoconf check fails due to unused macros
(HAVE_xxx in conftest.c) and a main function without parameters
respectively.
2016-02-13 20:11:50 +01:00
Peter Wu
0e469ed221 Fix typo in HAVE_CONFIG_H name
Only used by lib/nghttp2_npn.c where the presence of config.h does not
seem to make a difference though.
2016-02-13 20:11:50 +01:00
Tatsuhiro Tsujikawa
093eb51f8c Update default cipher list 2016-02-14 00:44:50 +09:00
Tatsuhiro Tsujikawa
5f1866fd6b Update man pages 2016-02-14 00:29:07 +09:00
Tatsuhiro Tsujikawa
d8c8a4631d nghttpx: Interleave text/html pushed resources with associated resource 2016-02-14 00:28:08 +09:00
Tatsuhiro Tsujikawa
6b12f17f44 Wrap AM_PATH_XML2 by m4_ifdef to handle the case when AM_PATH_XML2 is not found 2016-02-14 00:05:12 +09:00
Tatsuhiro Tsujikawa
eb0c82d91f nghttpx: More log output when resolving addresses for better debugging 2016-02-13 23:21:32 +09:00
Tatsuhiro Tsujikawa
7adfa5dea7 Add note about --enable-app automatic behaviour 2016-02-13 22:39:24 +09:00
Tatsuhiro Tsujikawa
17758126fa nghttpx: Add headers given in add-response-headers for mruby response 2016-02-13 22:31:38 +09:00
Tatsuhiro Tsujikawa
b440f585bc nghttpx: Use Header to store custom request/response header fields 2016-02-13 22:19:05 +09:00
Tatsuhiro Tsujikawa
63a13ccb18 src: Add constexpr to StringRef ctors 2016-02-13 19:15:14 +09:00
Tatsuhiro Tsujikawa
72877379ec nghttpx: Deprecate --backend-ipv4 and --backend-ipv6 in favor of --backend-address-family 2016-02-13 19:09:39 +09:00
Tatsuhiro Tsujikawa
8449958425 doc: Mention encryption for memcached connections 2016-02-13 18:50:15 +09:00
Tatsuhiro Tsujikawa
9037641592 Merge branch 'nghttpx-memcached-tls' 2016-02-13 18:47:06 +09:00
Tatsuhiro Tsujikawa
c0078ab45a nghttpx: Add options to specify address family of memcached connections 2016-02-13 18:46:07 +09:00
Tatsuhiro Tsujikawa
3a41e4dd1a nghttpx: Add encryption support for TLS ticket key retrieval 2016-02-13 18:46:07 +09:00
Tatsuhiro Tsujikawa
3297a303bf nghttpx: Add client auth options for session cache memcached TLS connection 2016-02-13 18:46:07 +09:00
Tatsuhiro Tsujikawa
f1580f95d4 nghttpx: Add TLS support for session cache memcached connection 2016-02-13 18:46:07 +09:00
Tatsuhiro Tsujikawa
1e150bcf61 Merge branch 'jay-refactor-blacklist' 2016-02-13 17:46:11 +09:00
Jay Satiro
ca371e3ba9 nghttpx: Refactor blacklisted cipher suite check 2016-02-12 21:46:29 -05:00
Tatsuhiro Tsujikawa
61dda40b44 Don't pass NULL to memcpy 2016-02-12 22:31:47 +09:00
Tatsuhiro Tsujikawa
5ad753b90c Merge branch 'limit-incoming-headers' 2016-02-11 23:21:02 +09:00
Tatsuhiro Tsujikawa
0a1beea13a asio: client: Limit incoming response header field buffer size 2016-02-11 23:20:31 +09:00
Tatsuhiro Tsujikawa
00e722f02c Add warning 2016-02-11 23:20:31 +09:00
Tatsuhiro Tsujikawa
ff22862b9d nghttp: Limit incoming header field buffer 2016-02-11 23:20:31 +09:00
Tatsuhiro Tsujikawa
b2264ad57e asio: server: Limit incoming request header field buffer size 2016-02-11 23:20:31 +09:00
Tatsuhiro Tsujikawa
b0227d4051 nghttpd: Limit request header buffer 2016-02-11 23:20:31 +09:00
Tatsuhiro Tsujikawa
28b643e531 Fix configure script for non-gcc, clang build 2016-02-11 23:05:16 +09:00
Tatsuhiro Tsujikawa
82f942c3a3 nghttpx: Parameterize configuration values for client side TLS context 2016-02-11 18:34:31 +09:00
Tatsuhiro Tsujikawa
e4a727f86c nghttpx: Cache TLS client session after initial handshake was done 2016-02-11 17:56:20 +09:00
Tatsuhiro Tsujikawa
b624ca6dcd nghttpx: Rename client TLS session cache field 2016-02-11 17:12:57 +09:00
Tatsuhiro Tsujikawa
ba4c268172 nghttpx: Single SSL_SESSION cache entry for each address 2016-02-11 17:07:48 +09:00
Tatsuhiro Tsujikawa
00175eac33 nghttpx: Use Address* as a key for client side session cache 2016-02-11 12:40:15 +09:00
Tatsuhiro Tsujikawa
396dde1347 Mention libspdylay-dev package availability 2016-02-10 21:42:32 +09:00
Tatsuhiro Tsujikawa
042a59117d Merge pull request #504 from davidjb/master
Document compiling apps and include h2load in configure
2016-02-10 21:35:54 +09:00
David Beitey
b8717208c7 Document compiling apps and include h2load in configure 2016-02-10 08:37:43 +10:00
Tatsuhiro Tsujikawa
c3a5fe7185 Update bash_completion 2016-02-07 21:24:29 +09:00
Tatsuhiro Tsujikawa
c8b6a79225 Update man pages 2016-02-07 21:24:11 +09:00
Tatsuhiro Tsujikawa
92e66fc167 Bump up version number to 1.8.0-DEV 2016-02-07 21:20:44 +09:00
Tatsuhiro Tsujikawa
64ffc1fc73 Update README.rst 2016-02-07 21:20:05 +09:00
Tatsuhiro Tsujikawa
304ff6a6f9 Don't send extension frame in closing state 2016-02-07 21:12:36 +09:00
Tatsuhiro Tsujikawa
fc39f2d9d2 Merge branch 'master' into simple-extensions 2016-02-07 21:09:08 +09:00
Tatsuhiro Tsujikawa
0d806978e6 nghttpx: Set HTTP/1 backend read buffer to 16k 2016-02-07 21:07:27 +09:00
Tatsuhiro Tsujikawa
62c43ce2be nghttpx: Remove rb_ from HTTP/2 backend session 2016-02-07 19:20:17 +09:00
Tatsuhiro Tsujikawa
88eaeb5d1c nghttpx: Use memchunks for HTTP/2 backend 2016-02-07 18:54:44 +09:00
Tatsuhiro Tsujikawa
60c0c2dd56 src: Code cleanup 2016-02-07 18:41:38 +09:00
Tatsuhiro Tsujikawa
6c147aa1c5 nghttpx: Remove unnecessary condition 2016-02-07 18:39:06 +09:00
Tatsuhiro Tsujikawa
2a9b23bfab nghttpx: Store pointer to DownstreamAddr 2016-02-07 18:38:06 +09:00
Tatsuhiro Tsujikawa
4fb4617d20 src: Parameterize CharT 2016-02-07 18:16:47 +09:00
Tatsuhiro Tsujikawa
ede0f6aa32 src: Remove verbose const 2016-02-07 18:12:57 +09:00
Tatsuhiro Tsujikawa
4e7271a88f nghttpx: Fix regression which breaks WebSocket upgrade 2016-02-07 17:59:38 +09:00
Tatsuhiro Tsujikawa
6d49110a33 Rename FrontendAddr as UpstreamAddr 2016-02-07 17:51:53 +09:00
Tatsuhiro Tsujikawa
b540aa34d0 Merge branch 'nghttpx-backend-h1-tls' 2016-02-07 17:43:40 +09:00
Tatsuhiro Tsujikawa
15fa38c72f nghttpx: Rename backend_session_cache_per_worker as downstream_session_cache_per_worker 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
e7de5e9f6c nghttpx: Rename cl_tls_session as downstream_tls_session 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
5c10534b88 nghttpx: Fix crash when reusing cached SSL session 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
b3e5d49a3e Update doc 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
6806196404 nghttpx: Update doc for HTTP/1 TLS backend connections 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
2e38208d74 nghttpx: Fixups for HTTP/1 backend TLS support 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
cde79052dd nghttpx: Slightly faster version of HTTP/1 backend 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
e763770f3e nghttpx: Add option to specify maximum number of session cache 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
26d49c1dc3 nghttpx: Cache client session 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
bb4e2f6a24 nghttpx: Add TLS support for HTTP/1 backend 2016-02-07 17:43:30 +09:00
Tatsuhiro Tsujikawa
344cc1b5c3 Merge branch 'Sp1l-master' 2016-02-07 17:41:04 +09:00
Tatsuhiro Tsujikawa
21f9b6d8bb Merge branch 'master' of https://github.com/Sp1l/nghttp2 into Sp1l-master 2016-02-07 17:35:57 +09:00
Tatsuhiro Tsujikawa
024d0d09ee nghttpx: Fix unexpected failure due to missing address family 2016-02-06 23:28:04 +09:00
Bernard Spil
e4b2847d31 Don't check for dlopen/libdl on *BSD
This makes linking fail on -ldl as there is no libdl on in /usr/lib or /usr/local/lib on *BSD
Tested (and part of the proposed nghttp2 1.7.0) on [https://reviews.freebsd.org/D5218|FreeBSD]
2016-02-06 14:36:27 +01:00
Tatsuhiro Tsujikawa
ee07694783 nghttpx: Add request-header-field-buffer and max-request-header-fields options
This commit adds request-header-field-buffer and
max-request-header-fields, and deprecates header-field-buffer and
max-header-fields options.
2016-02-06 17:22:23 +09:00
Tatsuhiro Tsujikawa
8741503db1 nghttpx: Add --no-http2-cipher-black-list to allow black listed cipher suite 2016-02-06 17:05:14 +09:00
Tatsuhiro Tsujikawa
eec409dba7 nghttpx: Limit header fields from backend 2016-02-06 12:27:01 +09:00
Tatsuhiro Tsujikawa
95ca4f55d5 asio: client: Fix connect timeout does not work, return from cb if session stopped
This change removed client::session::connect_timeout() functon, and
connect timeout should be given to client::session constructor.  This
is required since async operation starts in the constructor.
2016-02-06 11:05:13 +09:00
Tatsuhiro Tsujikawa
231665d67b Don't use ac_save_* since they are overwritten by macro 2016-02-03 00:48:47 +09:00
Tatsuhiro Tsujikawa
4c05558273 Evaluate nghttp2_session_want_read and nghttp2_session_want_write when determining session is about to close 2016-02-03 00:25:11 +09:00
Tatsuhiro Tsujikawa
35c3b36549 nghttpx: Document special value localhost in Forwarded "by" and "for" params 2016-02-01 23:34:07 +09:00
Tatsuhiro Tsujikawa
03872bfacd nghttpx: Don't quote Forwarded "by" parameter if it is special value "localhost" 2016-02-01 23:31:21 +09:00
Tatsuhiro Tsujikawa
5e9bcbec9a nghttpx: Fix bug that IPv6 address in Forwarded "for" is not quoted-string 2016-02-01 23:29:17 +09:00
Tatsuhiro Tsujikawa
aa07fe7fa6 nghttpx: Support multiple frontend addresses
This commit allows nghttpx to listen to multiple address and port pair
by specifying -f option multiple times.
2016-02-01 23:10:29 +09:00
Tatsuhiro Tsujikawa
1d99b425ca Use ac_save_LIBS instead of LIBS_OLD 2016-01-30 18:46:17 +09:00
Tatsuhiro Tsujikawa
7a6a59178a Don't taint CXXFLAGS from AX_CXX_COMPILE_STDCXX_11 2016-01-30 18:42:48 +09:00
Tatsuhiro Tsujikawa
4e44fccdcf Fix compile error with gcc-6 which enables C++14 by default 2016-01-30 18:41:27 +09:00
Tatsuhiro Tsujikawa
703c77ec89 Fix markdown style linking 2016-01-29 12:36:15 +09:00
Tatsuhiro Tsujikawa
a06af3fa85 Add doc about release scheduling and versioning scheme 2016-01-29 12:35:09 +09:00
Tatsuhiro Tsujikawa
686a303cb5 Add script to ensure that packaging is good 2016-01-27 23:12:38 +09:00
Tatsuhiro Tsujikawa
b95df43384 Add genauthoritychartbl.py 2016-01-27 23:06:10 +09:00
Tatsuhiro Tsujikawa
5659e295b3 nghttpd: Add trailer header field to status responses 2016-01-27 22:47:30 +09:00
Tatsuhiro Tsujikawa
5b195092e1 nghttpd: Add -w and -W options to change window size 2016-01-27 22:34:17 +09:00
Tatsuhiro Tsujikawa
85bb37ab7c Enable ConstructorInitializerAllOnOneLineOrOnePerLine for better diff 2016-01-27 21:14:07 +09:00
Tatsuhiro Tsujikawa
c5f3eee3be Update http-parser to 4e382f96e6d3321538a78f2c7f9506d4e79b08d6 2016-01-27 20:50:08 +09:00
Tatsuhiro Tsujikawa
1cfdf386ff src: Faster base64 2016-01-27 15:31:09 +09:00
Tatsuhiro Tsujikawa
6d8fe72174 src: Faster percent encode/deocde 2016-01-27 15:31:09 +09:00
Tatsuhiro Tsujikawa
98253b1d0d nghttpx: Use DefaultMemchunks as HTTP/2 and SPDY frontend response buffer 2016-01-27 15:28:01 +09:00
Tatsuhiro Tsujikawa
ad93cea544 nghttpx: Fix possible data loss on backend connection upgrade 2016-01-27 15:26:46 +09:00
Tatsuhiro Tsujikawa
1739b5a0e6 nghttpx: Don't read frontend socket if read watcher is stopped 2016-01-27 15:26:06 +09:00
Tatsuhiro Tsujikawa
9ef8e24049 Merge pull request #490 from tavrez/master
Fixed Windows makefile version detection
2016-01-26 19:53:24 +09:00
Reza Tavakoli
7fbbaf01a9 Merge pull request #1 from tavrez/patch-1
Fixing window makefile version detection
2016-01-26 14:00:21 +03:30
Reza Tavakoli
5a6f312182 Fixing window makefile version detection 2016-01-26 13:57:21 +03:30
Tatsuhiro Tsujikawa
2b441ef9af Bump up version number to 1.7.1-DEV 2016-01-25 19:56:59 +09:00
Tatsuhiro Tsujikawa
7ba18df6cf Update bash_completion 2016-01-25 19:44:56 +09:00
Tatsuhiro Tsujikawa
196de5db89 Update man pages 2016-01-25 19:44:41 +09:00
Tatsuhiro Tsujikawa
25a3510501 Bump up version number to 1.7.0, LT revision to 18:1:4 2016-01-25 19:39:10 +09:00
Tatsuhiro Tsujikawa
4a78f59e7b Rename nghttp2_session.sent_stream_id as last_sent_stream_id
This is more accurate, and there is symmetric relation between
last_sent_stream_id and last_recv_stream_id, which is bettern fit in
my sense.
2016-01-23 14:47:39 +09:00
Tatsuhiro Tsujikawa
1f7032088d Add test which covers remote stream window size overflow case 2016-01-23 12:01:29 +09:00
Tatsuhiro Tsujikawa
4ceb9fd767 Cancel stream if flow control window gets overflow
Previously, we did terminate session, but it did not actually cancel
streams.  Now we just cancel streams in this case.
2016-01-23 00:24:12 +09:00
Tatsuhiro Tsujikawa
a964426fbc Update ax_check_compile_flag.m4 2016-01-22 23:21:06 +09:00
Tatsuhiro Tsujikawa
2f80c453bb Add C++ compiler flags with --enable-werror, remove -Wall from CPPFLAGS 2016-01-22 22:48:45 +09:00
Tatsuhiro Tsujikawa
cf06c3fbc5 Simplify 2016-01-22 22:37:45 +09:00
Tatsuhiro Tsujikawa
efc3206ae0 nghttpx: Revert accidental change 2016-01-21 22:14:10 +09:00
Tatsuhiro Tsujikawa
497ffc6387 nghttpx: Change pushed stream's priority
By default, as RFC 7540 calls for, pushed stream depends on its
associated (parent) stream.  There are some situations that this is
sub-optimal.  For example, if associated stream is HTML, and server is
configured to push css and javascript files which are in critical
rendering path.  Then the default priority scheme is sub-optimal,
since browser typically blocks rendering while waiting for critical
resources.  In this case, it is better to at least give pushed stream
the same priority of associated stream, and interleave these streams.

This change gives pushed stream the same priority of associated stream
if pushed stream has content-type "application/javascript" or
"text/css".  The pushed stream now depends on the stream which
associated stream depends on.  We use the same weight of associated
stream.
2016-01-21 21:11:57 +09:00
Tatsuhiro Tsujikawa
5a3ca7e700 nghttpx: Disallow user defined static obfuscated string for "for" parameter 2016-01-21 21:05:07 +09:00
Tatsuhiro Tsujikawa
9ac3e643d8 Revert "nghttpx: Add --curves option to specify supported elliptic curves"
This reverts commit e278893b64.

SSL_CONF_CTX functions are not working correctly with OpenSSL 1.0.2.
It requires 1.1.0 to make it work.
2016-01-21 19:50:38 +09:00
Tatsuhiro Tsujikawa
7ca2660a29 asio: Stop acceptor on server::http2::stop 2016-01-21 19:15:32 +09:00
Tatsuhiro Tsujikawa
e278893b64 nghttpx: Add --curves option to specify supported elliptic curves 2016-01-21 18:23:13 +09:00
Tatsuhiro Tsujikawa
6b8b426342 Revert accidental neverbleed revision change 2016-01-21 17:58:55 +09:00
Tatsuhiro Tsujikawa
03f7f8cb9c nghttpx: About implicit conversion from ImmutableString and std::string to StringRef
This is required to avoid creation of temporary ImmutableString
like so:

std::string x;
ImmutableString y = ...;
StringRef ref = !x.empty() ? x : y;

First, temporary ImmutableString is created with x since
ImmutableString has constructor to accept std::string.  After
StringRef gets this, the temporary ImmutableString is destroyed, and
ref has dangling pointer.
2016-01-21 17:12:40 +09:00
Tatsuhiro Tsujikawa
2faf9623ce nghttpx: Fix crash with http2 backend 2016-01-21 17:09:50 +09:00
Tatsuhiro Tsujikawa
eb8649bf9b nghttpx: Don't greedily read data from backend
This might help throughput, but it interfere stream priority.  The
throughput issue is generally caused by the small buffer size to store
response body, which was 16K.  We increased it to 128K to compensate
this change.
2016-01-20 11:20:15 +09:00
Tatsuhiro Tsujikawa
6377c51f9c Add missing files 2016-01-19 23:31:17 +09:00
Tatsuhiro Tsujikawa
db8de490a0 nghttpx: Omit Forwarded for and by parameter if UNIX domain socket is used 2016-01-19 23:26:04 +09:00
Tatsuhiro Tsujikawa
acb38b726f nghttpx: Don't quote Forwarded params if it is not required 2016-01-19 22:43:56 +09:00
Tatsuhiro Tsujikawa
f44128774c nghttpx: Update doc 2016-01-19 21:01:34 +09:00
Tatsuhiro Tsujikawa
e428bff961 Update man pages 2016-01-19 20:55:08 +09:00
Tatsuhiro Tsujikawa
d162f7c137 Merge branch 'h2load-unix-domain-socket' 2016-01-19 19:24:42 +09:00
Tatsuhiro Tsujikawa
933e0f40bb h2load: Support UNIX domain socket 2016-01-19 19:24:15 +09:00
Tatsuhiro Tsujikawa
3ad9f9e730 nghttpx: Fix compiler warning without --with-mruby 2016-01-19 19:07:13 +09:00
Tatsuhiro Tsujikawa
a390bd4ce0 nghttpx: Fix compile error with --with-neverbleed 2016-01-19 19:04:24 +09:00
Tatsuhiro Tsujikawa
dc0f0123e9 Merge branch 'nghttpx-reorganize-config' 2016-01-19 18:21:18 +09:00
Tatsuhiro Tsujikawa
f3946ae314 nghttpx: Remove assignment of zero values
Because of zero initialization, these assignments are unnecessary.
2016-01-19 17:27:56 +09:00
Tatsuhiro Tsujikawa
2f9946327a nghttpx: Fix bug that --listener-disable-timeout option is not used 2016-01-19 17:03:01 +09:00
Tatsuhiro Tsujikawa
0402481be4 nghttpx: Organize connection related configuration into struct 2016-01-19 16:56:12 +09:00
Tatsuhiro Tsujikawa
35feae3b0c nghttpx: Group up logging related options 2016-01-18 17:26:27 +09:00
Tatsuhiro Tsujikawa
a053d10839 nghttpx: Move option handling code to separate function 2016-01-18 17:08:28 +09:00
Tatsuhiro Tsujikawa
16549bb276 nghttpx: Structured configurations for http and http2 2016-01-18 17:00:20 +09:00
Tatsuhiro Tsujikawa
f3e1dc7a4f nghttpx: Structured TLS related configurations 2016-01-18 14:21:09 +09:00
Tatsuhiro Tsujikawa
b12af8c410 nghttpx: Refactor backend proxy configuration 2016-01-17 22:51:40 +09:00
Tatsuhiro Tsujikawa
f5b4fd23da src: Fix compiler error on travis 2016-01-17 22:47:50 +09:00
Tatsuhiro Tsujikawa
ee43250015 nghttpx: Remove useless comment 2016-01-17 22:26:13 +09:00
Tatsuhiro Tsujikawa
9f0f5c60ad ImmutableString: Remove std::unique_ptr<char[]> ctor overload 2016-01-17 22:25:10 +09:00
Tatsuhiro Tsujikawa
09de332028 ImmutableString: Less fields 2016-01-17 22:25:10 +09:00
Tatsuhiro Tsujikawa
3d5f5b6a28 nghttpx: Fix compiler warning 2016-01-17 18:27:25 +09:00
Tatsuhiro Tsujikawa
eb7b3295d1 ImmutableString, StringRef: Add empty() and operator[]
We won't add operator[] to StringRef.  This is because it may be
undefined if pos == size(), and StringRef's base + len does not point
to the valid region.  This solely depends on the given buffer, so we
cannot do anything to fix.  For workaround, if we need this kind of
operator, we may add it under another name, like char_at(size_type).
2016-01-17 18:09:12 +09:00
Tatsuhiro Tsujikawa
5131b95c2f ImmutableString: Ensure that c_str() returns non-nullptr if it is default constructed 2016-01-17 18:00:36 +09:00
Tatsuhiro Tsujikawa
ba543e3895 memchunk: Add noexcept 2016-01-17 17:16:20 +09:00
Tatsuhiro Tsujikawa
ef5d981ab1 nghttpx: Simplify 2016-01-17 17:04:16 +09:00
Tatsuhiro Tsujikawa
d5efab4993 src: Add inequality operator for StringRef 2016-01-17 16:42:19 +09:00
Tatsuhiro Tsujikawa
919e9eee63 nghttpx: It is enough to check "chunked" in the suffix 2016-01-17 16:34:56 +09:00
Tatsuhiro Tsujikawa
e255468bdf nghttpx: Fix tests 2016-01-17 16:33:23 +09:00
Tatsuhiro Tsujikawa
39c0a71065 src: Add tests for ImmutableString and StringRef 2016-01-17 16:32:55 +09:00
Tatsuhiro Tsujikawa
7b2d4b6ae6 nghttpx: Optimize logging further 2016-01-17 15:04:09 +09:00
Tatsuhiro Tsujikawa
4f07db8bcb src: Rename our new string classes 2016-01-17 11:33:45 +09:00
Tatsuhiro Tsujikawa
959d378f2a nghttpx: Optimize accesslog write 2016-01-17 11:19:19 +09:00
Tatsuhiro Tsujikawa
506de55475 src: Less strlen 2016-01-17 01:29:52 +09:00
Tatsuhiro Tsujikawa
045578989c src: Update doc 2016-01-17 01:21:58 +09:00
Tatsuhiro Tsujikawa
d16ff1f519 nghttpx: Use StringAdaptor for Config::server_name 2016-01-17 01:15:11 +09:00
Tatsuhiro Tsujikawa
2c7ed01f0c nghttpx: Use std::string for Downstream::backend_tls_sni_name 2016-01-17 01:00:15 +09:00
Tatsuhiro Tsujikawa
34d5382d66 nghttpx: Use VString for DownstreamAddr::host and hostport to remember size 2016-01-17 00:52:41 +09:00
Tatsuhiro Tsujikawa
dbbf3a4a10 nghttpx: Refactor TLS hostname match 2016-01-16 23:54:21 +09:00
Tatsuhiro Tsujikawa
f25fd09bbb nghttpx: Don't emit :authority if request dones not contain authority info
RFC 7540 says that proxy should not emit :authority when translating
HTTP/1 request in origin or asterisk form to HTTP/2.  To keep this
semantics in tact, we should also refrain from emitting :authority if
it is missing (host header field is required in this case).
2016-01-16 21:12:51 +09:00
Tatsuhiro Tsujikawa
7be0217bc0 nghttpx: Simplify xff handling 2016-01-16 16:48:41 +09:00
Tatsuhiro Tsujikawa
e4816c5ba9 nghttpx: Add clarification of quotes in configuration file 2016-01-16 16:11:41 +09:00
Tatsuhiro Tsujikawa
584567cacc Merge branch 'validate-authority-scheme' 2016-01-16 16:04:07 +09:00
Tatsuhiro Tsujikawa
b202e066fd nghttpx: Don't allow certain characters in host and :scheme header field
For HTTP/2, we do this validation in libnghttp2.  http-parser does
this partially, when it parses URI, but it does not do anything for
Host header field.  libspdylay does not perform anything.  So do some
additional validation for HTTP/1 and SPDY cases.  integration tests
were also added to make sure they work.
2016-01-16 16:00:05 +09:00
Tatsuhiro Tsujikawa
c7de58d865 Validate :authroity, host, and :scheme value more strictly 2016-01-16 15:11:48 +09:00
Tatsuhiro Tsujikawa
74c77926a8 nghttpx: Refactor and simplify Downstream::rewrite_location_response_header 2016-01-16 12:49:18 +09:00
Tatsuhiro Tsujikawa
198e253e9d integration: Add X-Forwarded-For tests with HTTP/2 backend 2016-01-16 12:25:12 +09:00
Tatsuhiro Tsujikawa
f26e213dcd integration: Additional tests for Forwarded header fields 2016-01-16 12:19:19 +09:00
Tatsuhiro Tsujikawa
9f318d1249 integration: Validate status code explicitly
Without this validation, test spuriously succeeds, but in fact it
doesn't.  This might occur if stream is closed with RST_STREAM or
GOAWAY.
2016-01-16 12:06:41 +09:00
Tatsuhiro Tsujikawa
deacc202ff Merge branch 'nghttpx-forwarded' 2016-01-16 11:59:06 +09:00
Tatsuhiro Tsujikawa
25570367b3 nghttpx: Document Forwarded related options 2016-01-16 11:58:02 +09:00
Tatsuhiro Tsujikawa
4c884da222 nghttpx: Reset config when Forwarded related option is used 2016-01-16 11:53:18 +09:00
Tatsuhiro Tsujikawa
f72e496f96 nghttpx: Add integration tests for Forwarded header field support 2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa
41047aece0 nghttpx: Implement Forwarded in HTTP/2 backend 2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa
54f5ea9d6e Update doc 2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa
d678c07ddf nghttpx: Allow user to specify static obfuscated value via command-line 2016-01-16 11:32:26 +09:00
Tatsuhiro Tsujikawa
5c3f74b424 nghttpx: Add RFC 7239 Forwarded header field support 2016-01-16 11:32:14 +09:00
Tatsuhiro Tsujikawa
1550d709e0 nghttpx: Use std::mt19937 instead of std::random_device directly 2016-01-15 18:48:14 +09:00
Tatsuhiro Tsujikawa
a23c9244d4 Make sure that upgraded response can be received from server 2016-01-15 17:03:13 +09:00
Tatsuhiro Tsujikawa
3c7038dfe1 nghttpx: Simplify
We only change req_.upgrade_request once, so just using else is
suffice.
2016-01-15 00:22:11 +09:00
Tatsuhiro Tsujikawa
f8472f4709 nghttpx: Remove backend priority handling code
Currently, this does not do anything useful.
2016-01-15 00:17:40 +09:00
Tatsuhiro Tsujikawa
698f00596d Update doc 2016-01-15 00:05:56 +09:00
Tatsuhiro Tsujikawa
5a8cf94361 nghttpx: Refactor Downstream::response_sent_bodylen_ 2016-01-14 23:54:28 +09:00
Tatsuhiro Tsujikawa
3218c160be nghttpx: Refactor Downstream::response_datalen_ 2016-01-14 23:49:21 +09:00
Tatsuhiro Tsujikawa
fa31d0940c nghttpx: Refactor Downstream::request_datalen_ 2016-01-14 23:36:47 +09:00
Tatsuhiro Tsujikawa
e7e52b11ce nghttpx: Refactor Downstream::response_bodylen_ 2016-01-14 23:20:44 +09:00
Tatsuhiro Tsujikawa
bdef0e0b1a nghttpx: Refactor Downstream::request_bodylen_ 2016-01-14 23:14:58 +09:00
Tatsuhiro Tsujikawa
543f2d58fc Merge branch 'nghttpx-refactor-downstream' 2016-01-14 01:06:45 +09:00
Tatsuhiro Tsujikawa
0a76b45eca nghttpx: Fix bug that key_prev is not updated 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa
6d6a00f1f5 nghttpx: Return assemble cookie on the fly 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa
3b8889a2a1 nghttpx: Extract response related fields to Response struct 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa
a7fd37ffdf nghttpx: Remove FieldStore::set_last_{header,trailer}_value
Use FieldStore::append_last_{header,trailer}_value instead.
2016-01-14 01:04:53 +09:00
Tatsuhiro Tsujikawa
919f08eb38 nghttpx: Extract request related fields to Request struct
Header field related functions are now gathered into FieldStore class.
This commit only handles request.  Subsequent commit will do the same
thing for response.
2016-01-14 01:04:32 +09:00
Tatsuhiro Tsujikawa
6cc5d71ffe Merge branch 'ploppy-fix_ipv6_crash' 2016-01-13 22:55:59 +09:00
Vernon Tang
6fddefe252 shrpx_worker_process: worker_process_event_loop: Fix FD test.
This fixes a crash in nghttpx when running on IPv6 only.
2016-01-12 17:38:17 +00:00
Tatsuhiro Tsujikawa
15ea11d5db Fix bug that HTTP upgrade was not working 2016-01-12 21:05:05 +09:00
Tatsuhiro Tsujikawa
fe8005327a src: Make util::utos_with_unit and utos_with_funit names shorter 2016-01-11 18:12:31 +09:00
Tatsuhiro Tsujikawa
0697de4691 h2load: Improve readability of traffic numbers 2016-01-11 18:06:26 +09:00
Tatsuhiro Tsujikawa
afc6f556d1 Update doc 2016-01-11 17:47:46 +09:00
Tatsuhiro Tsujikawa
6566ea7d6b nghttpx: Update doc 2016-01-11 17:36:47 +09:00
Tatsuhiro Tsujikawa
e14da859b6 Merge branch 'master' into simple-extensions 2016-01-11 16:39:35 +09:00
Tatsuhiro Tsujikawa
863addcd5a Update man pages 2016-01-11 16:23:32 +09:00
Tatsuhiro Tsujikawa
bb6f842b37 Check request/response submission error based side of session
Disallow request from server, and response from client respectively.
When the violation is detected, return NGHTTP2_ERR_PROTO from
nghttp2_submit_request, nghttp2_submit_response,
nghttp2_submit_headers.

We also did some refactoring, and now self-dependency detection is
placed where it is only required.
2016-01-11 16:18:39 +09:00
Tatsuhiro Tsujikawa
8f225ae88d Fix broken test_nghttp2_session_pop_next_ob_item 2016-01-11 00:46:44 +09:00
Tatsuhiro Tsujikawa
9cea986819 Strict outgoing idle stream detection
Previously, we use session->next_stream_id to detect that given stream
ID was idle or not.  But this was suboptimal, since it was updated
when stream ID was assigned, and it did not necessarily mean that it
actually has been sent to the peer.  Now we introduced
session->sent_stream_id, which only updated when HEADERS/PUSH_PROMISE
has sent.  Using sent_stream_id instead of next_stream_id tightens
idle stream detection, and misbehaved peer which sends frame with
stream ID that has not been generated.

This commit also overhauls test code which involves opening streams.
Now we have some wrapper functions for nghttp2_session_open_stream()
which also take care of updating next_stream_id and
last_recv_stream_id.  They are crucial for some tests.
2016-01-11 00:31:52 +09:00
Tatsuhiro Tsujikawa
0248d979fe Add missing nghttp2_option_set_user_recv_extension_type.rst 2016-01-10 17:08:03 +09:00
Tatsuhiro Tsujikawa
0caefe20ef Merge branch 'master' into simple-extensions 2016-01-09 19:08:28 +09:00
Tatsuhiro Tsujikawa
a7ec90506f Happy new year! 2016-01-09 18:28:38 +09:00
Tatsuhiro Tsujikawa
c58a621fc7 Add LICENSE file to point to COPYING
Some people feel uncomfortable when they could not find LICENSE file.
2016-01-09 18:26:45 +09:00
Tatsuhiro Tsujikawa
b64fc3ac49 nghttpd: Add --no-content-length option to omit content-length in response 2016-01-07 22:51:47 +09:00
Tatsuhiro Tsujikawa
027256d0b1 h2load: Distribute MAX_SAMPLES across workers 2016-01-07 22:41:37 +09:00
Tatsuhiro Tsujikawa
425c794f89 h2load: Rename MAX_STATS as MAX_SAMPLES 2016-01-07 22:21:39 +09:00
Tatsuhiro Tsujikawa
acac5ec6ea h2load: Remove "auto" for -m option
Because http/1.1 support, default "auto" behaviour of -m option is not
desirable, since it is used as HTTP pipelining, and it is not used in
practice.
2016-01-06 23:16:53 +09:00
Tatsuhiro Tsujikawa
13bd566eb7 h2load: Remove RequestStat ctor 2016-01-06 23:10:46 +09:00
Tatsuhiro Tsujikawa
a52920cec0 h2load: Perform Sampling for client as well 2016-01-06 23:03:37 +09:00
Tatsuhiro Tsujikawa
9cbb8174bb h2load: Refactor systematic sampling method 2016-01-06 22:43:09 +09:00
Tatsuhiro Tsujikawa
23ac0429be h2load: Show progress in rate mode 2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa
7ed26afe75 h2load: Delete Client when it finished 2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa
60bbb5cae0 h2load: Perform sampling for request timings to reduce memory consumption 2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa
da85910028 Merge pull request #472 from kumagi/fix-typo
fix typos in documents.
2016-01-06 00:03:23 +09:00
kumagi
f3a37b2ef1 fix typos: heder->header alreay->already reponse->response 2016-01-05 22:19:33 +09:00
Tatsuhiro Tsujikawa
2f50bc1b3c nghttpx: Take into account of trailers when applying max_header_fields 2016-01-05 16:47:44 +09:00
Tatsuhiro Tsujikawa
848f8fbe54 nghttpx: Don't apply max_header_fields and header_field_buffer limit to response
We modeled max_header_fields and header_field_buffer limit from Apache
configuration directives.  In Apache, they are only applied to request
header fields, while we applied both request and response.  Since
nghttpx is used as reverse proxy and backend server is relatively
"trusted", this commit removes the application to response header
fields.
2016-01-05 16:44:44 +09:00
Tatsuhiro Tsujikawa
4f06ccd17d Add -ldl to APPLDFLAGS for static openssl linking 2015-12-31 00:22:26 +09:00
Tatsuhiro Tsujikawa
3a9cb85d7a Add test to make sure idle streams are reduced 2015-12-26 00:30:55 +09:00
Tatsuhiro Tsujikawa
8716dd05d4 Return error from nghttp2_submit_{headers,request} when self dependency is made
Return NGHTTP2_ERR_INVALID_ARGUMENT from nghttp2_submit_headers() if
given stream ID and pri_spec->stream_id are the same (thus trying to
depend on itself).

Also return NGHTTP2_ERR_INVALID_ARGUMENT from nghttp2_submit_request()
and nghttp2_submit_headers() with stream_id == 1, when new stream ID
equals to pri_spec->stream_id.

Previously, these cases are not checked, and just sent to peer.
2015-12-25 21:37:18 +09:00
Tatsuhiro Tsujikawa
dd4d549dc1 asio: Rename http2::get_io_services() as http2::io_services()
The naming convention in asio lib does not use get_something.
2015-12-25 21:06:25 +09:00
Tatsuhiro Tsujikawa
486dba8d8a nghttpx: Strict validation for header fields given in configuration 2015-12-25 20:57:24 +09:00
Tatsuhiro Tsujikawa
e677e37876 Merge pull request #461 from ayanamist/ayanamist-patch-1
header value should not be inp_strlower
2015-12-25 20:47:11 +09:00
ayanamist
5ec6066fdd header value should not be inp_strlower
http header keys are case-insensitive, but header values are case-sensitive, so it should not be changed.
2015-12-25 11:03:55 +08:00
Tatsuhiro Tsujikawa
894c1bd02e Create idle stream on client side
With the presence of idle stream related API (e.g.,
nghttp2_create_idle_stream()), it is more predictable for client to
create idle streams with its dependency to another idle stream.
Previously, we didn't create complete parent idle stream in this case.
Now we create idle streams as we do on server side.
2015-12-25 00:10:37 +09:00
Tatsuhiro Tsujikawa
8919c8c139 Check initgroups with AC_CHECK_DECLS for cygwin 2015-12-24 21:15:46 +09:00
Tatsuhiro Tsujikawa
685f1772fc Bump up version number to 1.6.1-DEV 2015-12-23 22:56:39 +09:00
Tatsuhiro Tsujikawa
fe8998ab5c Update man pages 2015-12-23 22:52:11 +09:00
Tatsuhiro Tsujikawa
4988cd26b5 Bump up version number to 1.6.0, LT revision to 18:0:4 2015-12-23 22:49:39 +09:00
Tatsuhiro Tsujikawa
1b15bb7a56 Update neverbleed 2015-12-23 22:48:37 +09:00
Tatsuhiro Tsujikawa
8122bc5aef Fix compile error with gcc ASAN enabled 2015-12-23 17:14:36 +09:00
Tatsuhiro Tsujikawa
bd9a19e23b Add test for 92a56d034f 2015-12-23 17:10:33 +09:00
Tatsuhiro Tsujikawa
92a56d034f Fix bug that idle/closed stream may be destroyed while it is referenced 2015-12-23 16:38:30 +09:00
Tatsuhiro Tsujikawa
5de2c7a8c1 Detect availability of initgroups 2015-12-23 14:21:31 +09:00
Tatsuhiro Tsujikawa
7c5ef0613d asio: Add configurable connect/read timeout for client
This commit includes backward incompatible change, since we change
private field in public API class.
2015-12-23 00:08:55 +09:00
Tatsuhiro Tsujikawa
1ee1122d40 asio: Add configurable tls handshake/read timeout to server 2015-12-23 00:08:16 +09:00
Tatsuhiro Tsujikawa
09bd9c94a3 asio: client: Should call shutdown_socket() on read error 2015-12-22 00:40:22 +09:00
Tatsuhiro Tsujikawa
ca4a40b8e0 Don't schedule response HEADERS with priority tree
Previously we scheduled the transmission of response HEADERS using
priority tree in the belief that it allows more better utilization of
bandwidth for prioritized streams.  But to reduce the overhead of
reconstruction of priority queue when connection level flow control
window is depleted, we just don't check priority tree in this case.
This means that response HEADERS frames are not sent even though they
are not flow controlled.  This could waste bandwidth.  To improve this
situation, we stop scheduling response HEADERS with priority tree for
now.  Now they are just sent in the order they submitted.  The
response body DATA continued to be scheduled with priority tree as
before.
2015-12-21 21:33:58 +09:00
Tatsuhiro Tsujikawa
cb73ba948d Simplify HEADERS handling; handle push response in one function 2015-12-20 23:47:16 +09:00
Tatsuhiro Tsujikawa
e957147249 Make obvious implementation error connection error 2015-12-20 23:29:24 +09:00
Tatsuhiro Tsujikawa
010726a875 Simplify error handling in nghttp2_session_on_headers_received
return session_inflate_handle_invalid_stream(...) case is for streams
for INITIAL state, but this is rare case.  In general, we'd like to
reduce RST_STREAM transmission, and it is suffice to ignore this frame
for now.
2015-12-20 23:20:14 +09:00
Tatsuhiro Tsujikawa
6c1a76af6e asio: Use std::move for remote_endpoint assignment 2015-12-20 14:00:58 +09:00
Tatsuhiro Tsujikawa
19146211d7 Update doc 2015-12-20 13:20:21 +09:00
Tatsuhiro Tsujikawa
9f0083309e Fix strange use of session_detect_idle_stream 2015-12-20 13:19:29 +09:00
Tatsuhiro Tsujikawa
dd93b29397 clang-format 2015-12-20 12:48:39 +09:00
Tatsuhiro Tsujikawa
c5ea2b4ab5 Merge branch 'apohl79-master' 2015-12-19 23:38:37 +09:00
Tatsuhiro Tsujikawa
e71948d611 Merge branch 'master' of https://github.com/apohl79/nghttp2 into apohl79-master 2015-12-19 23:33:33 +09:00
Tatsuhiro Tsujikawa
5a2d75551d h2load: Remove "(client)" from per-client req/s stat for simplicity 2015-12-19 22:56:10 +09:00
Andreas Pohl
9f2d064d7c libnghttp2_asio: Optimized remote endpoint interface to const ref where possible 2015-12-19 14:08:15 +01:00
Tatsuhiro Tsujikawa
2d2188e77b src: Add 451 status code
https://datatracker.ietf.org/doc/draft-ietf-httpbis-legally-restricted-status/
2015-12-19 18:35:01 +09:00
Tatsuhiro Tsujikawa
feae76fbc0 Remove unused commented lines 2015-12-18 22:44:08 +09:00
Tatsuhiro Tsujikawa
80f7abb565 Fix crash caused by the regression in 9f8fc7b2bb 2015-12-17 22:25:28 +09:00
Tatsuhiro Tsujikawa
9f8fc7b2bb Strict error handling for frames which are not allowed after closed (remote)
This makes h2spec strict mode a bit happier.  We still one failing
test with h2spec -S (strict mode).
2015-12-17 21:31:20 +09:00
Tatsuhiro Tsujikawa
9cfda0c070 Update doc 2015-12-17 18:04:16 +09:00
Andreas Pohl
a30dad4f5e libnghttp2_asio: Added access to a requests remote endpoint 2015-12-16 18:38:21 +01:00
Tatsuhiro Tsujikawa
15d9f222ed Add --lib-only configure option
This is a short hand for --disable-app --disable-examples
--disable-hpack-tools --disable-python-bindings, for users who want to
build libnghttp2 only.
2015-12-16 21:31:43 +09:00
Tatsuhiro Tsujikawa
ef7d6e8a0c nghttpx: Loose HTTP Upgrade condition 2015-12-16 00:38:30 +09:00
Tatsuhiro Tsujikawa
71012fe83a nghttpx: Add constexpr 2015-12-15 22:47:05 +09:00
Tatsuhiro Tsujikawa
228d92244a Optimize nghttp2_pq swap 2015-12-15 22:07:51 +09:00
Tatsuhiro Tsujikawa
248a64f0b2 Compile with OpenSSL 1.1.0-pre1 2015-12-14 21:12:25 +09:00
Tatsuhiro Tsujikawa
68c5deea5a Clarify the condition when opening new stream from remote is allowed 2015-12-11 21:23:49 +09:00
Tatsuhiro Tsujikawa
ab93db2259 Add test when client sends push response to server 2015-12-11 00:18:27 +09:00
Tatsuhiro Tsujikawa
f14ac74316 At least check stream ID is valid when PUSH_PROMISE is received in goaway mode 2015-12-10 23:54:54 +09:00
Tatsuhiro Tsujikawa
0c70ff5658 Simplify 2015-12-10 23:18:02 +09:00
Tatsuhiro Tsujikawa
ba671a8473 Merge branch 'apohl79-master' 2015-12-10 21:29:00 +09:00
Tatsuhiro Tsujikawa
66bbb5c76f Merge branch 'master' of https://github.com/apohl79/nghttp2 into apohl79-master 2015-12-10 21:09:28 +09:00
Andreas Pohl
a4392d4a7f libnghttp2_asio: Make io_service accessors const 2015-12-09 23:11:40 +01:00
Tatsuhiro Tsujikawa
86505b1c54 Update h2load howto and all manual pages 2015-12-08 23:56:21 +09:00
Andreas Pohl
924fef1f32 libnghttp2_asio: Added io_service accessors
To allow the asio wrapper to work with boost.fiber it is required
to access the underlying io_service objects.
2015-12-08 15:54:22 +01:00
Tatsuhiro Tsujikawa
7cc2d22ab5 Fix compile error with gcc 2015-12-08 23:33:26 +09:00
Tatsuhiro Tsujikawa
abcdbf0039 Take into account remainder due to integer division when calculating cycle 2015-12-08 23:15:55 +09:00
Tatsuhiro Tsujikawa
4bcc14fc67 Reschedule stream when only weight is changed
Previously, we only updated stream's weight field when only weight was
changed by PRIORITY frame.  If stream is queued, it would be better to
actually reschedule it based on new weight.  This could be especially
useful if weight is increased.
2015-12-07 23:14:22 +09:00
Tatsuhiro Tsujikawa
72f815d535 Update descendant_last_cycle on nghttp2_stream_next_outbound_item
Previously, we updated descendant_last_cycle in
nghttp2_stream_reschedule, which is called after non-zero DATA frame.
But this was not optimal since we still had old descendant_last_cycle,
and new stream was scheduled based on it.  Now descendant_last_cycle
is updated in nghttp2_stream_next_outbound_item, which is called when
stream with highest priority is selected from queue.  And new stream
is scheduled based on it.  This commit also removes 0-reset of
descendant_last_cycle and cycle in nghttp2_stream_reschedule.  This
could help making them lower, so that they are not overflow.  But
there is a pattern that it doesn't work, and we are not sure they are
really useful at this moment.
2015-12-07 22:48:50 +09:00
Tatsuhiro Tsujikawa
9c84f60ba0 Merge branch 'master' into simple-extensions 2015-12-04 23:48:40 +09:00
Tatsuhiro Tsujikawa
7ca9ead36b nghttp: Update doc for default value of -M 2015-12-04 23:08:58 +09:00
Tatsuhiro Tsujikawa
e67987404b Merge branch 'sunpoet-master' 2015-12-04 23:04:33 +09:00
Sunpoet Po-Chuan Hsieh
90b5a5856b Fix build when OpenSSL 1.0.2 is not available 2015-12-04 17:38:04 +08:00
Tatsuhiro Tsujikawa
a151a44caf Set max number of outgoing concurrent streams to 100 by default
Instead of using nonsensical large value for max outgoing concurrent
streams, use more sensible value, 100.
2015-12-03 23:45:03 +09:00
Tatsuhiro Tsujikawa
478a423bcf Reduce nghttp2_stream size 2015-12-03 22:53:02 +09:00
Tatsuhiro Tsujikawa
93d8636fb0 Keep incoming streams only at server side
We should only keep incoming closed streams because we only keep at
most max concurrent streams, which only applied to incoming streams.
2015-12-03 22:48:41 +09:00
Tatsuhiro Tsujikawa
2288ee8060 Create stream object for pushed resource during nghttp2_submit_push_promise()
Previously, stream object for pushed resource was not created during
nghttp2_submit_push_promise().  It was created just before
nghttp2_before_frame_send_callback was called for that PUSH_PROMISE
frame.  This means that application could not call
nghttp2_submit_response for the pushed resource before
nghttp2_before_frame_send_callback was called.  This could be solved
by callback chaining, but for web server with back pressure from
backend stream, it is a bit unnecessarily hard to use.

This commit changes nghttp2_submit_push_promise() behaviour so that
stream object is created during that call.  It makes application call
nghttp2_submit_response right after successful
nghttp2_submit_push_promise call.
2015-12-02 21:16:30 +09:00
Tatsuhiro Tsujikawa
6beaf4d9f3 h2load: Add req/s min, max, mean and sd for clients 2015-12-01 23:54:21 +09:00
Tatsuhiro Tsujikawa
d1d1c83e56 h2load: Fix broken connection times 2015-12-01 22:29:30 +09:00
Tatsuhiro Tsujikawa
cbad05e0de src: Fix compile error with gcc-4.7 2015-12-01 21:21:50 +09:00
Tatsuhiro Tsujikawa
e01d213636 Update man pages 2015-11-29 19:12:53 +09:00
Tatsuhiro Tsujikawa
e1e7840b2c doc: Fix broken layout in ascii art 2015-11-29 19:08:17 +09:00
Tatsuhiro Tsujikawa
2754d9e2bb Update doc 2015-11-28 15:24:13 +09:00
Tatsuhiro Tsujikawa
12b2e0a2b3 Add nghttp2_session_create_idle_stream() API
See GH-436
2015-11-28 15:23:44 +09:00
Tatsuhiro Tsujikawa
aacac613af Assert dep_stream is non-null to shut up scan-build 2015-11-28 00:50:29 +09:00
Tatsuhiro Tsujikawa
ba9e912cf6 src: Rename isAlpha, isDigit, and isHexDigit as is_... 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa
d867fe64e3 src: Rename endsWith as ends_with 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa
de247f7d33 src: Rename startsWith as starts_with 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa
1ba28bef1f util: Remove unused functions; rename regacy camel-case function names 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa
c0858d8c1a src: Minor optimization for appending single character 2015-11-28 00:03:16 +09:00
Tatsuhiro Tsujikawa
863493766d Fix in_attr_char(); cleanup const char array iteration 2015-11-27 23:54:07 +09:00
Tatsuhiro Tsujikawa
a70445e122 Retain stream in reserved state on client side
Application may use it using nghttp2_stream_* functions, and traverse
its dependency.
2015-11-27 22:54:55 +09:00
Tatsuhiro Tsujikawa
f23e34fa3c Handle response in nghttp2_on_begin_frame_callback
Previously, nghttp2_session_end_request_headers_received assumes
stream is still writable (in other words, local endpoint has not sent
END_STREAM).  But this assumption is false, because application can
send response in nghttp2_on_begin_frame_callback.  Probably, this
assumption was made before the callback was introduced.  This commit
addresses this issue.  Since all
nghttp2_session_end_*_headers_received functions are identical, we
refactored them into one function.
2015-11-27 22:50:13 +09:00
Tatsuhiro Tsujikawa
3d1d54e2ce Remove dead code 2015-11-27 21:13:44 +09:00
Tatsuhiro Tsujikawa
c87a062dba Bump up version number to v1.5.0-DEV 2015-11-26 22:28:45 +09:00
Tatsuhiro Tsujikawa
0d52097213 Update bash_completion 2015-11-26 22:25:34 +09:00
Tatsuhiro Tsujikawa
6444f0c5cd Update man pages 2015-11-26 22:25:22 +09:00
Tatsuhiro Tsujikawa
1e74ee2d54 Bump up version number to 1.5.0, LT revision to 17:0:3 2015-11-26 22:21:58 +09:00
Tatsuhiro Tsujikawa
ba9e96b829 h2load: Avoid copy of h1 request 2015-11-26 22:04:31 +09:00
Tatsuhiro Tsujikawa
bd041bcbb0 h2load: Add --h1 option to force http/1.1 for both http and https URI 2015-11-26 21:33:27 +09:00
Tatsuhiro Tsujikawa
8e06e37375 h2load: Fix crash when dealing connection: close with HTTP/1.1 server 2015-11-26 21:26:00 +09:00
Tatsuhiro Tsujikawa
faad041868 Use seq to break a tie for stream weight
Because of the nature of heap based priority queue, and our compare
function, streams with the same weight and same parent are handled in
the reverse order they pushed to the queue.  To allow stream pushed
earlier to be served first, secondary key "seq" is introduced to break
a tie.  "seq" is monotonically increased integer per parent stream,
and it is assigned to stream when it is pused to the queue, and gets
incremented.
2015-11-25 22:26:56 +09:00
Tatsuhiro Tsujikawa
3048bb9d90 Fix test: stream_id is not incremented 2015-11-25 22:18:54 +09:00
Tatsuhiro Tsujikawa
9088e4a16a Bump up version number to 1.5.0-DEV 2015-11-24 23:55:19 +09:00
Tatsuhiro Tsujikawa
b08d5b1975 Explicitly treat stream_id 0 as error in nghttp2_session_change_stream_priority 2015-11-24 22:34:36 +09:00
Tatsuhiro Tsujikawa
b53b1381b7 Fix bug that nghttp2_session_find_stream(session, 0) returned NULL
Previously, nghttp2_session_find_stream(session, 0) returned NULL
despite the fact that documentation said that it should return root
stream.  Now it is corrected, and it returns root stream as
documented.
2015-11-24 22:30:12 +09:00
Tatsuhiro Tsujikawa
c44ee44cc3 nghttpd: Fix compile error due to incomplete FileEntry 2015-11-23 21:25:12 +09:00
Tatsuhiro Tsujikawa
8f970dec0e Update doc 2015-11-23 21:05:25 +09:00
Tatsuhiro Tsujikawa
2fee05242e Merge branch 'change-stream-priority' 2015-11-23 20:13:02 +09:00
Tatsuhiro Tsujikawa
f0443d3398 Merge branch 'master' into change-stream-priority 2015-11-23 20:11:24 +09:00
Tatsuhiro Tsujikawa
5744acc2ca Merge branch 'shukitchan-master' 2015-11-23 20:06:04 +09:00
Tatsuhiro Tsujikawa
84e23bff10 h2load: clang-format 2015-11-23 20:05:40 +09:00
Tatsuhiro Tsujikawa
d62bc26b62 Add test for nghttp2_session_change_stream_priority() 2015-11-23 19:48:51 +09:00
Kit Chan
718f7a5f7e h2load goes into infinite loop when timing script file starts with 0.0 in first line 2015-11-23 09:58:38 +00:00
Tatsuhiro Tsujikawa
e95ad297ed travis: Enable integration tests and neverbleed
We added spdylay build since integration tests require it.
2015-11-23 16:15:31 +09:00
Tatsuhiro Tsujikawa
dff2a19950 nghttpx: Don't send RST_STREAM to h2 backend if backend is disconnected state
This avoid establishing HTTP/2 backend connection again w/o pending
request.

See GH-431
2015-11-22 15:49:11 +09:00
Tatsuhiro Tsujikawa
aa317c89ea Add API to change stream priority without sending PRIORITY frame
The added API is nghttp2_session_change_stream_priority().  This
provides the same functionality to re-prioritize stream when PRIORITY
frame.  is received, but we do it without PRIORITY frame.  This could
be useful for server to change pushed stream's priority silently.
2015-11-21 18:32:42 +09:00
Tatsuhiro Tsujikawa
72f2c4b272 Add nghttp2_session_check_server_session.rst to APIDOCS 2015-11-21 18:31:39 +09:00
Tatsuhiro Tsujikawa
c7304317d4 nghttpd: Check validity of cached file descriptor periodically
This commit adds ability to check status of cached file descriptor to
make sure that it can be reused.  We inspect last modification time
and number of hard links.  If last modification is changed from the
last validation time, or number of hard links gets 0, we don't reuse
file descriptor.  We also capped upper limit of the cached file
descriptors.  If the limit is reached, we will close file descriptor
which is least recently used, and its usecount is 0.
2015-11-21 16:05:08 +09:00
Tatsuhiro Tsujikawa
3673b1303a python: Do the same thing in 8481bc6 with HEADERS + END_STREAM flag set 2015-11-21 15:44:12 +09:00
Tatsuhiro Tsujikawa
b27b002a3f python: Use nghttp2_session_get_stream_remote_close 2015-11-21 15:40:05 +09:00
Tatsuhiro Tsujikawa
8481bc6e93 python: Send RST_STREAM if remote side is not closed and response finished 2015-11-21 15:09:06 +09:00
Tatsuhiro Tsujikawa
63a50b1ccf Add nghttp2_session_check_server_session() API
This is very simple API, and it returns nonzero if session is
initialized as server.
2015-11-21 15:07:55 +09:00
Tatsuhiro Tsujikawa
63aa3466e9 nghttpd: Fix crash with CONNECT request 2015-11-21 12:54:04 +09:00
Tatsuhiro Tsujikawa
d7b0768ab8 Fix bug that dep_stream->sum_dep_weight was not updated 2015-11-20 21:24:54 +09:00
Tatsuhiro Tsujikawa
4db3828fa6 Reset last_writelen to 0 when stream is removed from tree
When stream is removed from tree, stream is either closed, or its
remote flow control window is depleted.  In the latter case, we
schedule this stream as fast as possible if its remote window gets
positive, since it did not sent anything in its turn.  To achieve
this, reset last_writelen to 0 when stream is removed from tree.
2015-11-20 00:19:17 +09:00
Tatsuhiro Tsujikawa
3bbb05f59b Optimize the case when only weight is changed 2015-11-20 00:19:02 +09:00
Tatsuhiro Tsujikawa
ab1e8305a1 asio: client: call on_error when connection is dropped
When connection is dropped, we get "nonzero" error code ec in
read_socket callback.  We can just call on_error callback if ec is
nonzero.  But there is a problem when we did ordered shutdown.  In
this case, we also get EOF in ec, but we don't want to call on_error
because it is not an error.  To workaround this, we check return value
of should_stop().  If it is true, then we assume that HTTP/2 session
cleanly ended, and we don't call on_error.
2015-11-19 00:04:10 +09:00
Tatsuhiro Tsujikawa
8b4f6f1778 nghttpd: Defered eviction of cached fd using timer
To make use cache fd more robust manner (e.g. among several
connections), eviction of cached file descriptor now takes place using
timer.  The timer is started when there is no handler (no
connections).  The timeout value is hard-coded and 2 seconds.
2015-11-18 23:21:57 +09:00
Tatsuhiro Tsujikawa
8c94341c18 h2load: Override user-agent with -H option
This commit allows user to override user-agent with -H option.  We
also enabled custom header support for http/1.1 requests.  We also did
minor optimizations (std::vector::reserve).
2015-11-18 22:25:02 +09:00
Tatsuhiro Tsujikawa
79ee999f1b Update mruby to 1.2.0 2015-11-17 23:23:53 +09:00
Tatsuhiro Tsujikawa
83cc2511e3 Remove flags parameter from nghttp2_pack_extension_callback
It has no usecase at the moment.  It is most likely that applications
know the flags when it submitted extension frame, no need to modify it
later.  Possibly feature bloat.
2015-11-17 21:29:21 +09:00
Tatsuhiro Tsujikawa
dcf060198b Merge branch 'http2-backend-push' 2015-11-16 23:13:35 +09:00
Tatsuhiro Tsujikawa
1753bea692 nghttpx: Support server push from HTTP/2 backend
This commits enables HTTP/2 server push from HTTP/2 backend to be
relayed to HTTP/2 frontend.  To use this feature, --http2-bridge or
--client is required.  Server push via Link header field contiues to
work.
2015-11-16 23:12:25 +09:00
Tatsuhiro Tsujikawa
b95a3c4b28 Consider to use CANCEL error code when closing streams with GOAWAY
For clients, CANCEL is more appropriate for both incoming/outgoing
streams.  For servers, CANCEL is appropriate for its pushed stream
(outgoing), but REFUSED_STREAM is more appropriate for incoming
stream.
2015-11-16 22:53:31 +09:00
Tatsuhiro Tsujikawa
b918f9650a Don't send push response if GOAWAY has been received 2015-11-16 22:47:12 +09:00
Tatsuhiro Tsujikawa
7463493259 Use error code CANCEL to reset pushed reserved stream from remote 2015-11-16 22:20:27 +09:00
Tatsuhiro Tsujikawa
c3459c9e86 nghttpx: Clarify return value of nghttp2_submit_push_promise is stream ID 2015-11-16 21:44:36 +09:00
Tatsuhiro Tsujikawa
eb4e402aae Merge branch 'master' into simple-extensions 2015-11-14 22:31:52 +09:00
Tatsuhiro Tsujikawa
fe8720341d nghttpx: Fix crash on non-final response from backend server 2015-11-13 23:59:36 +09:00
Tatsuhiro Tsujikawa
c6ef1c02b9 Switch to clang-format-3.6 2015-11-13 00:53:29 +09:00
Tatsuhiro Tsujikawa
7c613386db Update man pages 2015-11-12 23:14:45 +09:00
Tatsuhiro Tsujikawa
a13c5a6bfb Merge branch 'syohex-misspelling' 2015-11-09 21:46:26 +09:00
Tatsuhiro Tsujikawa
c711a80411 src: Fix typo
Apply typo fixes to the original source files in the previous commit
which were done in generated text.
2015-11-09 21:43:25 +09:00
Tatsuhiro Tsujikawa
7e8dc73f2f Merge branch 'misspelling' of https://github.com/syohex/nghttp2 into syohex-misspelling 2015-11-09 21:40:56 +09:00
Tatsuhiro Tsujikawa
dbbed64146 nghttpx: Fix bug that causes connection failure with backend proxy URI
This is a regression when we introduced SSL/TLS session resumption in
HTTP/2 backend.  Before the introduction of session resumption,
conn_.tls.ssl is always nullptr when connection is made to proxy.  But
we have to keep conn_.tls.ssl to enable session resumption, so our
code breaks when it is reused.  This commit fixes this issue.

See GH-421
2015-11-09 21:35:53 +09:00
Syohei YOSHIDA
a93e0016ff Correct misspellings 2015-11-09 11:40:35 +09:00
Tatsuhiro Tsujikawa
9b18e47671 nghttpx: Use --backend-tls-sni-field to verify certificate hostname 2015-11-08 00:22:44 +09:00
Tatsuhiro Tsujikawa
aecddc2cda Merge pull request #418 from thinred/pr-apparmor
added apparmor profile
2015-11-07 22:59:43 +09:00
Tatsuhiro Tsujikawa
b89f1f5869 asio: ALPN support 2015-11-07 22:53:25 +09:00
Tomasz Buchert
a4012b594b added apparmor profile 2015-11-07 12:45:57 +01:00
Tatsuhiro Tsujikawa
ab1f70dcd7 Merge branch 'upgrade2' 2015-11-07 16:13:20 +09:00
Tatsuhiro Tsujikawa
eaefce3792 nghttp: Record request method to output it in har correctly 2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa
558934cee5 src: Use nghttp2_session_upgrade2 2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa
269a100081 Add nghttp2_session_upgrade2(), deprecate nghttp2_session_upgrade()
To validate actual response body length against the value declared in
content-length response header field, we first check request method.
If request method is HEAD, respose body must be 0 regardless of the
value in content-length.  nghttp2_session_upgrade() has no parameter
to indicate the request method is HEAD, so we failed to validate
response body if HEAD is used with HTTP Upgrade.  New
nghttp2_session_upgrade2() accepts new parameter to indicate that
request method is HEAD or not to fix this issue.  Although, this issue
affects client side only, we deprecate nghttp2_session_upgrade() in
favor of nghttp2_session_upgrade2() for both client and server side.
2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa
af4c3cb2cf Fix travis gcc build 2015-11-07 11:34:05 +09:00
Tatsuhiro Tsujikawa
6958d0b55d nghttp: Use method given in -H with ":method" in HTTP Upgrade 2015-11-07 11:14:28 +09:00
Tatsuhiro Tsujikawa
5e7e479c6c Workaround HTTP upgrade with HEAD request
By default, we check the length of response body matches
content-length.  For HEAD request, this is not necessarily true, so we
sniff request method, and if it is HEAD, make sure that response body
length is 0.  But this does not work for HTTP Upgrade, since
nghttp2_session_upgrade() has no parameter to tell the request method
was HEAD.  This commit disables this response body length validation
for the stream upgraded by HTTP Upgrade.  We will add new version of
nghttp2_session_upgrade with the parameter to pass the request method
information so that we can handle this situation properly.
2015-11-07 10:56:40 +09:00
Tatsuhiro Tsujikawa
dfbbb08124 Silence warning with scan-build 2015-11-06 20:07:40 +09:00
Tatsuhiro Tsujikawa
7755c2827c nghttpx: Reserve headers vector 2015-11-05 23:47:22 +09:00
Tatsuhiro Tsujikawa
ac41946533 nghttpx: Use NGHTTP2_NV_FLAG_NO_COPY_NAME and NGHTTP2_NV_FLAG_NO_COPY_VALUE
For both HTTP/2 frontend and backend.

Also adds http2::stringify_status to optimize status code
serialization.
2015-11-05 23:47:11 +09:00
Tatsuhiro Tsujikawa
43b230685f Introduce NGHTTP2_NV_FLAG_NO_COPY_NAME and NGHTTP2_NV_FLAG_NO_COPY_VALUE 2015-11-05 22:48:30 +09:00
Tatsuhiro Tsujikawa
cb73fa1d3b h2load: Return SSL_TLSEXT_ERR_NOACK if there is protocol list overlap in NPN 2015-11-05 21:26:38 +09:00
Tatsuhiro Tsujikawa
0dc7fee713 h2load: Print "space savings" to measure header compression efficiency 2015-11-04 01:04:56 +09:00
Tatsuhiro Tsujikawa
58d636abdb Revert 918f8cca36
For first scheduling, we might ignore weight.  This is OK since weight
is just a distribution of resource, rather than strict priority
ordering.
2015-11-02 23:38:29 +09:00
Tatsuhiro Tsujikawa
be0d0e2995 Rename nghttp2_session_request_allowed as nghttp2_session_check_request_allowed 2015-10-30 22:48:27 +09:00
Tatsuhiro Tsujikawa
5d611d2e24 Merge branch 'master' into simple-extensions 2015-10-29 23:24:34 +09:00
Tatsuhiro Tsujikawa
6ff9c4d8f9 Update doc
With 4825009e42, static lib is no longer
required for unit tests.
2015-10-29 23:13:11 +09:00
Tatsuhiro Tsujikawa
1e7f0d833e nghttpd: Don't show read error if mime types file is not set by user manually 2015-10-29 23:08:52 +09:00
Tatsuhiro Tsujikawa
41002a77d4 Remove bogus debug log 2015-10-29 23:01:02 +09:00
Tatsuhiro Tsujikawa
1c37abc0dd Add nghttp2_session_request_allowed() API function
This function is useful for the client application to know that there
is a chance that request can be sent.  If this function returns 0,
there is zero chance to make a request.

This commit also set error_code passed to
nghttp2_on_stream_close_callback to NGHTTP2_REFUSED_STREAM if request
is not sent.
2015-10-29 22:53:30 +09:00
Tatsuhiro Tsujikawa
ad395f0603 h2load: Handle request submission failure
If request submission is failed, make all remaining requests for that
client fail.
2015-10-29 22:31:03 +09:00
Tatsuhiro Tsujikawa
e3878b619f h2load: Update doc 2015-10-29 21:16:47 +09:00
Tatsuhiro Tsujikawa
3641b123f3 h2load: Stream error should be counted toward errored 2015-10-29 21:15:22 +09:00
Tatsuhiro Tsujikawa
f29ccc9c20 nghttpd: Read /etc/mime.types to set content-type header field
User can change file name using --mime-types-file option.
2015-10-29 00:21:36 +09:00
Tatsuhiro Tsujikawa
ecb4a208fb nghttpx: Use ev_feed_event to signal write for HTTP backend
It seems that using ev_feed_event to signal write operation is much
faster than starting watcher.  This is probably due to the fact that
we don't need to wait in event loop.  The same thing cannot be done in
HTTP/2 frontend, since this will raise write operation for each stream
HEADER/DATA write, which leads to very small packets, hurting
performance.  Interestingly, HTTP/1 frontend also suffers the same
performance hit.
2015-10-28 23:26:41 +09:00
Tatsuhiro Tsujikawa
d9f73c36c3 nghttpx: Log :authority as $http_host if available 2015-10-28 23:12:16 +09:00
Tatsuhiro Tsujikawa
b915c24704 Merge pull request #414 from rraptorr/systemd-pidfile
Revert "add PIDFile directive to systemd service"
2015-10-28 22:17:18 +09:00
Tatsuhiro Tsujikawa
559b0cf729 Merge pull request #415 from LPardue/h2load-fix-proto-negotioation
h2load: do not overwrite protocol value
2015-10-28 21:22:52 +09:00
Lucas Pardue
76df93fdf4 h2load: do not overwrite protocol value 2015-10-28 11:04:09 +00:00
Janusz Dziemidowicz
2145ba4ca7 Revert "add PIDFile directive to systemd service"
This reverts commit 19c095a817.

See discussion at #375 for details.
2015-10-28 10:15:41 +01:00
Tatsuhiro Tsujikawa
1aa8e8cd9f nghttpx: Simplify add_header 2015-10-28 02:57:31 +09:00
Tatsuhiro Tsujikawa
b051ddec2a h2load: Show application protocol with OpenSSL < 1.0.2
This commit also fixes the problem that application protocol is not
shown if cleartext spdy is used.
2015-10-28 02:40:04 +09:00
Tatsuhiro Tsujikawa
55bf22081e Merge branch 'kdudka-pr410' 2015-10-27 21:35:22 +09:00
Kamil Dudka
4825009e42 tests: fix broken linkage with --disable-static 2015-10-26 20:33:36 +01:00
Tatsuhiro Tsujikawa
01c4916aa6 Merge branch 'alagoutte-scan-build' 2015-10-27 00:51:17 +09:00
Tatsuhiro Tsujikawa
1a545ed518 Merge branch 'scan-build' of https://github.com/alagoutte/nghttp2 into alagoutte-scan-build 2015-10-27 00:49:09 +09:00
Alexis La Goutte
b4f363ef53 Fix Value stored to 'rv' is never read found by Clang Analyzer 2015-10-26 15:22:13 +01:00
Tatsuhiro Tsujikawa
ad5c6945cf Bump up version number to 1.4.1-DEV 2015-10-25 17:38:04 +09:00
Tatsuhiro Tsujikawa
da1eb19a73 Add missing documents to APIDOCS 2015-10-25 17:24:10 +09:00
Tatsuhiro Tsujikawa
af3bc53332 Update bash_completion files 2015-10-25 17:11:03 +09:00
Tatsuhiro Tsujikawa
86911bd67d Update man pages 2015-10-25 17:10:41 +09:00
Tatsuhiro Tsujikawa
6b0bde6c31 Update doc so that we can use hyperlink to referred options 2015-10-25 17:10:41 +09:00
Tatsuhiro Tsujikawa
9231a4ba57 nghttpx: Replace old script file options with --mruby-file 2015-10-25 17:05:15 +09:00
Tatsuhiro Tsujikawa
0b2c139eaa clang-format-3.5 2015-10-25 17:04:54 +09:00
Tatsuhiro Tsujikawa
2b769bc162 Bump up version number to 1.4.0, LT revision to 16:0:2 2015-10-25 16:59:16 +09:00
Tatsuhiro Tsujikawa
5d3d377c03 Add missing NGHTTP2_EXTERN to public functions 2015-10-25 16:51:50 +09:00
Tatsuhiro Tsujikawa
8770c82832 Merge pull request #407 from 187j3x1/doc-update
Update doc for Debian 7.0 or above and add g++ requirement
2015-10-25 16:25:01 +09:00
Tatsuhiro Tsujikawa
4960583637 Increase NGHTTP2_MAX_OBQ_FLOOD_ITEM to avoid false positives 2015-10-25 16:23:29 +09:00
187j3x1
4e6eed9189 Update doc: rename python3.4-dev and add g++ build requirement 2015-10-25 10:55:36 +08:00
Tatsuhiro Tsujikawa
166433f780 Update README.rst 2015-10-25 11:33:29 +09:00
Tatsuhiro Tsujikawa
b832caccd4 Fix typo 2015-10-25 11:31:55 +09:00
Tatsuhiro Tsujikawa
907798707c nghttpx: Fix compile error with Android NDK 2015-10-24 19:31:09 +09:00
Tatsuhiro Tsujikawa
9c43acfd3a Update sphinx_rtd_theme 2015-10-24 19:30:51 +09:00
Tatsuhiro Tsujikawa
d1b8f60776 nghttp: Allow multiple -c option occurrence, and take min and last value 2015-10-24 18:11:47 +09:00
Tatsuhiro Tsujikawa
62a8132c02 Merge branch 'fix-hpack' 2015-10-24 17:58:46 +09:00
Tatsuhiro Tsujikawa
25bf567cd7 Don't always expect dynamic table size update
The encoder is not required to send dynamic table size update if the
table size is not changed from the previous value after accepting new
maximum value.
2015-10-24 17:49:51 +09:00
Tatsuhiro Tsujikawa
5bc3dfa1cd Shrink to the minimum table size seen in local SETTINGS 2015-10-24 17:49:50 +09:00
Tatsuhiro Tsujikawa
7eddf1975e src: Fix Memchunks move ctor 2015-10-23 01:03:43 +09:00
Tatsuhiro Tsujikawa
d3475f5fe2 nghttp: Remove redundant std::move 2015-10-23 00:17:00 +09:00
Tatsuhiro Tsujikawa
ce74a30990 Use -fvisibility=hidden for internal functions
This will improve performance since we can avoid indirect call of
internal functions.  The downside is we now require libnghttp2 static
library to run unit tests.
2015-10-23 00:08:15 +09:00
Tatsuhiro Tsujikawa
7b35c28c7d Merge branch 'LPardue-nghttpx-tls-dyn-rec-config' 2015-10-22 23:51:05 +09:00
Tatsuhiro Tsujikawa
fad1def7b9 Merge branch 'nghttpx-tls-dyn-rec-config' of https://github.com/LPardue/nghttp2 into LPardue-nghttpx-tls-dyn-rec-config 2015-10-22 23:50:07 +09:00
Lucas Pardue
dcc9aaaa24 Add TLS dynamic record size behaviour command line options 2015-10-22 14:07:18 +00:00
Tatsuhiro Tsujikawa
20ac0e3e48 src: Print out exception type 2015-10-22 01:34:01 +09:00
Tatsuhiro Tsujikawa
e3c95265a4 nghttpd: Fix leak when server failed to listen to given port 2015-10-21 22:27:15 +09:00
Tatsuhiro Tsujikawa
46d7c30c17 Update doc 2015-10-21 00:18:27 +09:00
Tatsuhiro Tsujikawa
1fdf208a28 Update man pages 2015-10-20 00:22:03 +09:00
Tatsuhiro Tsujikawa
f0bf2233d2 Remove the word "experimental" since HTTP/2 has been finalized 2015-10-20 00:19:49 +09:00
Tatsuhiro Tsujikawa
48edbc8687 nghttpx: Reduce default timeouts for read sockets to 1m 2015-10-18 00:15:58 +09:00
Tatsuhiro Tsujikawa
b9a9e3a596 src: s/custom/unknown/ 2015-10-18 00:10:08 +09:00
Tatsuhiro Tsujikawa
ad2c53c6d2 Update mruby 2015-10-17 23:49:57 +09:00
Tatsuhiro Tsujikawa
eff3dfd50b src: Move exception handling code to one function 2015-10-17 23:34:05 +09:00
Tatsuhiro Tsujikawa
11cb4ea214 h2load: Don't DOS our server! 2015-10-17 12:04:06 +09:00
Tatsuhiro Tsujikawa
5594e3df25 src: Handle exception in main 2015-10-17 11:52:33 +09:00
Tatsuhiro Tsujikawa
5d002ff6ca Fix make dist 2015-10-17 00:27:02 +09:00
Tatsuhiro Tsujikawa
4674a9f6fb Show more information in configure summary 2015-10-16 22:49:42 +09:00
Tatsuhiro Tsujikawa
85bc696c38 nghttpx: Add error handling for strdup and sigaction 2015-10-16 22:33:48 +09:00
Tatsuhiro Tsujikawa
54bf225692 clang-format-3.5 2015-10-15 21:42:11 +09:00
Tatsuhiro Tsujikawa
bb43b8e4c1 Update Firefox version as well 2015-10-15 21:31:56 +09:00
Tatsuhiro Tsujikawa
605a4e1317 Merge pull request #390 from wzyboy/patch-doc-update
Update doc for Chromium HTTP/2 proxy support
2015-10-15 21:28:23 +09:00
Zhuoyun Wei
751766a46f Update doc for Chromium HTTP/2 proxy support 2015-10-15 18:41:24 +08:00
Tatsuhiro Tsujikawa
e8c608a4d9 nghttpx: Fix bug that PUT is replaced with POST 2015-10-15 00:57:07 +09:00
Tatsuhiro Tsujikawa
837e716306 Fix compile error with gcc 2015-10-15 00:30:42 +09:00
Tatsuhiro Tsujikawa
061a557839 Add nghttp2_option_set_user_recv_extension_type to opt-in incoming extension type 2015-10-15 00:17:07 +09:00
Tatsuhiro Tsujikawa
338b4ba739 nghttpx: Don't use units to display fastopen default 2015-10-14 23:45:56 +09:00
Tatsuhiro Tsujikawa
41710bfc7e nghttpx: Add description about error message when TLS protocols do not overlap 2015-10-14 23:23:43 +09:00
Tatsuhiro Tsujikawa
0e87d464a2 clang-format 2015-10-14 23:23:34 +09:00
Tatsuhiro Tsujikawa
2fb8c260b3 Update OpenSSL version in Dockerfile.android 2015-10-14 22:34:59 +09:00
Tatsuhiro Tsujikawa
ed1e84fc0a nghttpx: Improve libssl error logging 2015-10-14 22:32:47 +09:00
Tatsuhiro Tsujikawa
1ca64788eb h2load: Use duration syntax for timeouts 2015-10-13 23:37:28 +09:00
Tatsuhiro Tsujikawa
eb3505af02 Merge branch 'h2load-subsecond-rate-period' 2015-10-13 23:35:47 +09:00
Tatsuhiro Tsujikawa
47f1d17ad3 h2load: Support subsecond rate period
This change adds subsecond rate period support to h2load.  Now
--rate-period option only accepts integer, but it can be followed by
units.  Currently, h, m, s, and ms are supported, which are hours,
minutes, seconds, and milliseconds respectively.  The underlying
functionality and usecase are already extensively used in nghttpx.
2015-10-13 23:35:33 +09:00
Tatsuhiro Tsujikawa
d9893d014c Add tests 2015-10-11 17:46:23 +09:00
Tatsuhiro Tsujikawa
3785cf07ba Add simple HTTP/2 extension framework
Application can utilize this framework to send/receive user defined
extension frames.  These frames are expected not to change existing
protocol behaviour.
2015-10-11 17:46:23 +09:00
Tatsuhiro Tsujikawa
3f4b6f2b1c Clean up 2015-10-11 17:29:29 +09:00
Tatsuhiro Tsujikawa
a0e884836e Fix wrong test name 2015-10-11 17:28:40 +09:00
Tatsuhiro Tsujikawa
ac317321fc h2load: Format doc 2015-10-10 11:16:36 +09:00
Tatsuhiro Tsujikawa
ca9e7c2c2d h2load: Start thread execution using conditional variable
When thread is created, we pause them.  After all threads are created,
master thread sends signal to all worker threads and let them start to
benchmark.  This will make thread start almost at the same time since
we can avoid thread creation overhead.  It also exclude thread
creating time from benchmark time.  We also simplified thread creation
routine, and now we always use dedicted worker thread to issue
requests even if -t1.
2015-10-10 11:14:55 +09:00
Tatsuhiro Tsujikawa
0d27a89915 Merge branch 'h2load-refactor-rate-mode' 2015-10-10 11:10:02 +09:00
Tatsuhiro Tsujikawa
4030060db8 h2load: Simplify rate mode
This change simplifies rate mode as proposed idea as plan B in GH-382.

In this change, we removed -C option.  Instead, -c option is used to
specify the number of connections to be made, and it is now required
argument if more than 1 clients are required (this is usually the
case).  The number of requests made per connection is calculated
simply by -n / -c.

-n option is handled specially when --timing-script-file is used.  If
-n is used with --timing-script, it specifies the number of requests
-each client will make rather than the total number of requests h2load
-will perform across clients.  This handling applies to rate mode too.

We also clarified the sematics about distribution of rate among the
threads.
2015-10-10 11:06:44 +09:00
Tatsuhiro Tsujikawa
509c515575 integration: Update go's http2 package URI 2015-10-09 00:09:45 +09:00
Tatsuhiro Tsujikawa
8e6b92bdd7 Merge branch 'nghttpx-mruby' 2015-10-08 23:32:42 +09:00
Tatsuhiro Tsujikawa
2b8b8f1ffd Update mruby doc 2015-10-08 23:32:15 +09:00
Tatsuhiro Tsujikawa
f1eb7638d1 nghttpx: Change mruby script handling
This commit changes nghttpx's mruby script handling.  Previously we
have 2 options to specify the mruby script file to be run on request
and on response.  Now they are merged into 1 option, namely
--mruby-file.  It now must return object.  On request, the object's
on_req(env) method is invoked with env object.  Similarly, on
response, the object's on_resp(env) method is invoked.  The
specification of Env object has not changed.
2015-10-08 23:32:15 +09:00
Tatsuhiro Tsujikawa
c71c357fa6 src: Call OpenSSL_add_all_algorithms to attempt to set up cpuid explicitly
See GH-377
2015-10-08 22:50:51 +09:00
Tatsuhiro Tsujikawa
10134097c3 Merge branch 'LPardue-h2load-rateperiod' 2015-10-08 00:13:55 +09:00
Tatsuhiro Tsujikawa
2f4395da22 Merge branch 'h2load-rateperiod' of https://github.com/LPardue/nghttp2 into LPardue-h2load-rateperiod 2015-10-07 22:37:04 +09:00
Lucas Pardue
afa14d36a8 h2load: Add option for user-definable rate period 2015-10-07 11:22:32 +00:00
Tatsuhiro Tsujikawa
758c29d3fa Merge branch 'serioussam-master' 2015-10-06 23:32:54 +09:00
Peeyush Aggarwal
349f3e2c7b Added support for RFC 7413 (TCP Fast Open) on nghttpx proxy listening connections.
Fixed code as per PR comments
2015-10-05 13:40:45 -07:00
Tatsuhiro Tsujikawa
e262c013bd Merge branch 'alagoutte-master' 2015-10-04 22:06:39 +09:00
Tatsuhiro Tsujikawa
ba08948307 Merge branch 'master' of https://github.com/alagoutte/nghttp2 into alagoutte-master 2015-10-04 22:02:47 +09:00
Alexis La Goutte
81addc77b4 Add (and fix) -Wredundant-decls 2015-10-04 14:48:32 +02:00
Tatsuhiro Tsujikawa
0155c9115a nghttpx: Fix so that --padding option works again 2015-10-04 10:36:20 +09:00
Tatsuhiro Tsujikawa
b1de6ca390 Update doc 2015-10-04 10:36:09 +09:00
Tatsuhiro Tsujikawa
49573e0aa2 Cleanup 2015-10-03 19:14:41 +09:00
Tatsuhiro Tsujikawa
e95b39d534 nghttpx: Fix sent bodylen logging 2015-10-03 19:14:26 +09:00
Tatsuhiro Tsujikawa
ccbaaa1e14 nghttpx: Fix freeze in large transfer 2015-10-03 19:00:16 +09:00
Tatsuhiro Tsujikawa
9fa5010eac Merge branch 'nghttpx-response-buffer' 2015-10-03 17:56:56 +09:00
Tatsuhiro Tsujikawa
777e1ee2c5 nghttpx: Use send_data_callback for higher throughput 2015-10-03 17:56:37 +09:00
Tatsuhiro Tsujikawa
45d4c9dece Add new error code NGHTTP2_ERR_PAUSE to send_data_callback
If application returns NGHTTP2_ERR_PAUSE from send_data_callback, it
means application processed all data, but wants to make
nghttp2_session_mem_send or nghttp2_session_send return immediately.
This is useful if application writes to fixed sized buffers, and there
is no room to write more data.
2015-10-03 17:16:42 +09:00
Tatsuhiro Tsujikawa
da89f9c150 nghttpx: Refactor client handler write
Move write buffer to Upstream objects
2015-10-03 11:09:42 +09:00
Tatsuhiro Tsujikawa
fe79b6d118 nghttpx: Avoid last buffer copy when HTTP/1.1 is used 2015-10-01 23:34:17 +09:00
Tatsuhiro Tsujikawa
a5b0ad04d3 Merge branch 'thinred-add-pidfile' 2015-10-01 23:32:00 +09:00
Tomasz Buchert
19c095a817 add PIDFile directive to systemd service 2015-10-01 11:09:11 +02:00
Tatsuhiro Tsujikawa
f7fdb65037 Pass OpenSSL flags to libneverbleed 2015-10-01 01:29:51 +09:00
Tatsuhiro Tsujikawa
cea76226b1 Avoid excessive WINDOW_UPDATE queuing 2015-10-01 01:19:57 +09:00
Tatsuhiro Tsujikawa
2aa8d9642c nghttpx: Fix crash on http2/client proxy mode 2015-09-30 23:45:43 +09:00
Tatsuhiro Tsujikawa
d22ced77c0 Return fatal error if flooding is detected to close session immediately
This change adds new return error code from nghttp2_session_mem_recv
and nghttp2_session_recv functions, namely NGHTTP2_ERR_FLOODED.  It is
fatal error, and is returned when flooding was detected.
2015-09-30 22:19:03 +09:00
Tatsuhiro Tsujikawa
0cb8c82125 Detect flooding and tear down session 2015-09-30 00:44:08 +09:00
Tatsuhiro Tsujikawa
f150f9aec4 Fix compile error without BoringSSL 2015-09-29 23:45:13 +09:00
Tatsuhiro Tsujikawa
22a89ff7a6 Fix compile error and warning with gcc 2015-09-29 23:38:26 +09:00
Tatsuhiro Tsujikawa
f0d2c9f94b Compile with BoringSSL
Compile with BoringSSL except for neverbleed and libnghttp2_asio.  The
former uses ENGINE and RSA_METHOD, and they are quite different
between OpenSSL and BoringSSL.  The latter uses boost::asio, which
calls OpenSSL functions deleted in BoringSSL.
2015-09-29 23:38:17 +09:00
Tatsuhiro Tsujikawa
49ef571ecf nghttpx: Stop watchers in ConnectionHandler dtor 2015-09-29 00:45:31 +09:00
Tatsuhiro Tsujikawa
75ff04f87a nghttpx: Don't stop default loop of worker process on graceful shutdown
To keep ipc channel being read from worker process, default loop
should not be stopped.  To join all worker threads, now we use
dedicated thread to do this.  When all worker threads are joined,
ev_async_send sends message to default loop, and it is finally
stopped.
2015-09-29 00:40:33 +09:00
Tatsuhiro Tsujikawa
3fca142e5f nghttpx: Exit immediately if IPC channel read failed on worker process 2015-09-29 00:08:46 +09:00
Tatsuhiro Tsujikawa
a28aee058f nghttpx: Don't need to trap SIGTERM and SIGINT signals 2015-09-29 00:07:29 +09:00
Tatsuhiro Tsujikawa
ad5d73738c Return type of nghttp2_submit_trailer is int 2015-09-29 00:06:20 +09:00
Tatsuhiro Tsujikawa
55075516c9 h2load: Reuse SSL/TLS session 2015-09-28 23:59:42 +09:00
Tatsuhiro Tsujikawa
ff87bf7584 h2load: Fix compile error 2015-09-28 23:57:58 +09:00
Tatsuhiro Tsujikawa
252df2d22c h2load: Reconnect server on connection: close 2015-09-28 23:50:44 +09:00
Tatsuhiro Tsujikawa
4e2ff875dc h2load: Don't exit in the case of no ALPN protocol overlap 2015-09-28 22:48:43 +09:00
Tatsuhiro Tsujikawa
3fafbfe1ed Fix gcc build 2015-09-27 00:51:32 +09:00
Tatsuhiro Tsujikawa
ef3e2c7764 Don't send WINDOW_UPDATE with 0 increment 2015-09-27 00:22:33 +09:00
Tatsuhiro Tsujikawa
b5427d9651 Remove unused nghttp2_memdup 2015-09-26 22:44:08 +09:00
Tatsuhiro Tsujikawa
2d5b42693d Don't expect NULL terminated name/value in nghttp2_hd_deflate_hd
If it is called through libnghttp2 internally, name/value pairs are
all NULL-terminated.  But it is one of public API, and we cannot
expect that applications always make NULL-terminated string for
name/value pairs.
2015-09-26 22:41:05 +09:00
Tatsuhiro Tsujikawa
c2eacc8b10 Update doc 2015-09-26 22:24:44 +09:00
Tatsuhiro Tsujikawa
8acf9a2802 nghttpx: Trie based routing 2015-09-26 22:19:10 +09:00
Tatsuhiro Tsujikawa
566b0476d7 nghttpx: Enable neverbleed for client private key; don't run nb without TLS 2015-09-26 21:28:46 +09:00
Tatsuhiro Tsujikawa
8dd5f7585e Update doc 2015-09-26 20:59:56 +09:00
Tatsuhiro Tsujikawa
45366ae9dc Merge branch 'neverbleed' 2015-09-26 19:02:24 +09:00
Tatsuhiro Tsujikawa
044385ab6e Add neverbleed support
neverbleed is disabled by default.  To enable it, use
--with-neverbleed configure option.
2015-09-26 19:01:31 +09:00
Tatsuhiro Tsujikawa
f337b94537 Add neverbleed as submodule 2015-09-26 18:55:02 +09:00
Tatsuhiro Tsujikawa
c749ae0cac Add doc 2015-09-26 18:54:38 +09:00
Tatsuhiro Tsujikawa
637288359e Ignore 0 length header partial block if it is not final 2015-09-25 22:53:35 +09:00
Tatsuhiro Tsujikawa
d618cd92cc Merge branch 'rraptorr-systemd' 2015-09-25 22:35:50 +09:00
Tatsuhiro Tsujikawa
86663ff333 Merge branch 'systemd' of https://github.com/rraptorr/nghttp2 into rraptorr-systemd 2015-09-25 22:35:37 +09:00
Tatsuhiro Tsujikawa
93ba75b602 Fix bug that headers in CONTINUATION were ignored after HEADERS with padding 2015-09-25 22:28:03 +09:00
Tatsuhiro Tsujikawa
1f72648b0e Fix compile error with --enable-debug and --enable-werror 2015-09-25 22:19:18 +09:00
Janusz Dziemidowicz
1cdd8b1c58 Fix daemon upgrade when running under systemd
Systemd assumes that service of type simple is stopped when the main
process exits. This causes systemd to kill all nghttpx processes when
doing a process upgrade (via USR2/QUIT signals). Change the service
type to forking which behaves correctly on upgrade.
2015-09-25 15:01:02 +02:00
Tatsuhiro Tsujikawa
d804780c25 Fix compile error with Android NDK and --enable-werror 2015-09-25 01:45:28 +09:00
Tatsuhiro Tsujikawa
6200bf3329 Bump up version number to 1.3.5-DEV 2015-09-25 01:25:04 +09:00
Tatsuhiro Tsujikawa
895da9a7aa Update man pages 2015-09-25 01:10:35 +09:00
Tatsuhiro Tsujikawa
f9eaaa9da5 Bump up version number to 1.3.4, LT revision to 15:4:1 2015-09-25 01:07:28 +09:00
Tatsuhiro Tsujikawa
6680d8b792 nghttpx: Call setsid after executing new binary 2015-09-25 00:55:08 +09:00
Tatsuhiro Tsujikawa
0b32df94a5 nghttpx: Log when worker process exits 2015-09-25 00:11:35 +09:00
Tatsuhiro Tsujikawa
913b95336b Fix warning 'this decimal constant is unsigned only in ISO C90' 2015-09-25 00:03:38 +09:00
Tatsuhiro Tsujikawa
c44587a70c nghttpx: Use _Exit when exiting from child process 2015-09-24 23:57:24 +09:00
Tatsuhiro Tsujikawa
938fa9a1e2 nghttpx: Fix compile error with --disable-threads 2015-09-24 23:57:06 +09:00
Tatsuhiro Tsujikawa
206eab3b33 Merge branch 'fix-signal-handling' 2015-09-24 23:43:43 +09:00
Tatsuhiro Tsujikawa
bb4ab7e333 integration: Robust process termination 2015-09-24 23:43:24 +09:00
Tatsuhiro Tsujikawa
f470d1cc06 Document that sending signal to nghttpx worker process may not work 2015-09-24 23:43:24 +09:00
Tatsuhiro Tsujikawa
3d5493c3f1 nghttpx-logrotate: Don't use killall since we have multiple processes 2015-09-24 23:43:24 +09:00
Tatsuhiro Tsujikawa
389a96483a nghttpx: Fix improper signal handling 2015-09-24 23:43:24 +09:00
Tatsuhiro Tsujikawa
bff59e09dc src: Robust make_array implementation
This is meant to be used for ints, but unfortunately std::forward is
not constexpr in C++11.
2015-09-24 23:43:07 +09:00
Tatsuhiro Tsujikawa
1e96a2d357 Merge branch 'rraptorr-init-upgrade' 2015-09-24 23:41:15 +09:00
Janusz Dziemidowicz
4a5d1b6708 Make traditional init script fail if new config file is broken
Instead of assuming that upgrade is always successful, check if a new
process actually started. Do not kill old process if the new one
failed.
2015-09-24 14:56:55 +02:00
Tatsuhiro Tsujikawa
b7fd0fdd96 Bump up version to 1.3.4-DEV 2015-09-24 00:40:35 +09:00
Tatsuhiro Tsujikawa
1d88f02b10 Update bash_completion 2015-09-24 00:17:26 +09:00
Tatsuhiro Tsujikawa
a0643b86eb Update man pages 2015-09-24 00:17:14 +09:00
Tatsuhiro Tsujikawa
53270fac88 Bump up version number to 1.3.3, LT revision to 15:3:1 2015-09-24 00:13:23 +09:00
Tatsuhiro Tsujikawa
25db23e3c8 integration: Workaround flaky test around signal 2015-09-24 00:11:14 +09:00
Tatsuhiro Tsujikawa
a54062bd5e nghttpx: Fix output glitch 2015-09-24 00:11:02 +09:00
Tatsuhiro Tsujikawa
c3283e1c6e Update tutorial 2015-09-23 22:57:53 +09:00
Tatsuhiro Tsujikawa
25e2adbfe9 Update mruby 2015-09-23 22:46:22 +09:00
Tatsuhiro Tsujikawa
fec7ef61d3 Merge branch 'rraptorr-unix-tcp-nodelay' 2015-09-23 19:55:57 +09:00
Tatsuhiro Tsujikawa
2269b99b4f Merge branch 'unix-tcp-nodelay' of https://github.com/rraptorr/nghttp2 into rraptorr-unix-tcp-nodelay 2015-09-23 19:54:50 +09:00
Janusz Dziemidowicz
84f96a2fd5 Do not try to set TCP_NODELAY when frontend is an UNIX socket
This silences warning log that otherwise spams logs on every accepted
connection.
2015-09-23 12:22:34 +02:00
Tatsuhiro Tsujikawa
50ec17c4af Add more tests for handling padding in DATA frame 2015-09-23 18:26:18 +09:00
Tatsuhiro Tsujikawa
170f2a144a Fix warning with gcc 2015-09-23 18:26:02 +09:00
Tatsuhiro Tsujikawa
28fe3e7e89 More warning flags for --enable-werror 2015-09-23 16:49:45 +09:00
Tatsuhiro Tsujikawa
2be6a94d70 nghttpx: Show textual signal description when worker process exited 2015-09-22 21:21:40 +09:00
Tatsuhiro Tsujikawa
e77f9d95d3 nghttpx: Set CLOEXEC for ipc fds 2015-09-22 19:52:35 +09:00
Tatsuhiro Tsujikawa
87a38bdf8d nghttpx: Chown UNIX domain socket to user specified as --user 2015-09-22 18:34:03 +09:00
Tatsuhiro Tsujikawa
03bb58006b nghttpx: Extract several chown() usages into 1 function 2015-09-22 18:32:40 +09:00
Tatsuhiro Tsujikawa
230b1f927f Use hash table for dynamic table lookup 2015-09-19 21:29:40 +09:00
Tatsuhiro Tsujikawa
4ac8edfe27 Update doc 2015-09-19 19:50:54 +09:00
Tatsuhiro Tsujikawa
ab824d1230 nghttpx: Add missing sys/wait.h 2015-09-19 19:50:29 +09:00
Tatsuhiro Tsujikawa
e67bb7ca62 Merge branch 'nghttpx-process' 2015-09-18 23:37:31 +09:00
Tatsuhiro Tsujikawa
da9e535c7a nghttpx: Log worker thread creating in NOTICE level 2015-09-18 23:35:25 +09:00
Tatsuhiro Tsujikawa
dbbc7296f5 strdup is not required here 2015-09-18 23:28:27 +09:00
Tatsuhiro Tsujikawa
ce1b11e3a0 nghttpx: Split monolithic one process into control and worker processes
The control process handles signals, reads configuration, reads
private keys, and bind port (which may be privileged one).  It never
drop privileges, so that it can execute new binary with the same
privilege.  It forks worker process.  The worker process handles all
incoming connections.  It drops privilege.
2015-09-18 23:28:26 +09:00
Tatsuhiro Tsujikawa
b57b0db5bf h2load: Fix npn defualt list 2015-09-18 23:03:36 +09:00
Tatsuhiro Tsujikawa
03b32d92b7 Merge branch 'LPardue-h2load-http1_a' 2015-09-18 22:58:42 +09:00
Tatsuhiro Tsujikawa
604732b650 Merge branch 'h2load-http1_a' of https://github.com/LPardue/nghttp2 into LPardue-h2load-http1_a 2015-09-18 22:53:29 +09:00
Lucas Pardue
ec47dfb9b8 Initial HTTP/1.1 capability. Add npn-list option to h2load. Make NPN/ALPN more runtime dependent 2015-09-17 14:49:27 +00:00
Tatsuhiro Tsujikawa
1c2fcc2a55 nghttpx: Handle SSL/TLS data following PROXY protocol line 2015-09-17 22:26:49 +09:00
Tatsuhiro Tsujikawa
83ff3de9ae Bump up version number to 1.3.3-DEV 2015-09-16 22:59:09 +09:00
Tatsuhiro Tsujikawa
818c3bcadc Update man pages 2015-09-16 22:35:11 +09:00
Tatsuhiro Tsujikawa
cd845ae111 Bump up version number to 1.3.2, LT revision to 15:2:1 2015-09-16 22:30:38 +09:00
Tatsuhiro Tsujikawa
c6785abd1f nghttp: Check req is null, found by coverity 2015-09-16 22:18:09 +09:00
Tatsuhiro Tsujikawa
ee4732a676 nghttp: Show error if HEADERS frame cannot be sent for whatever reason 2015-09-16 00:41:55 +09:00
Tatsuhiro Tsujikawa
eacd6eeed2 Check header block limit after new stream is opened 2015-09-16 00:40:31 +09:00
Tatsuhiro Tsujikawa
4aaf111c58 nghttpx: Fix assertion failure on TLS handshake 2015-09-15 23:24:30 +09:00
Tatsuhiro Tsujikawa
991352d201 Just assign stream->cycle to descendant_last_cycle 2015-09-14 22:20:08 +09:00
Tatsuhiro Tsujikawa
d22573086f nghttpx: Add x-http2-push header field for pushed resource
Fixes GH-352
2015-09-14 00:28:19 +09:00
Tatsuhiro Tsujikawa
1148584526 nghttpx: Reserve room for required header fields for PUSH_PROMISE 2015-09-14 00:26:50 +09:00
Tatsuhiro Tsujikawa
5005369f71 android-config: Use absolute path for compilers 2015-09-13 00:43:31 +09:00
Tatsuhiro Tsujikawa
33601f1a51 nghttpx: Fix compile error with --disable-threads 2015-09-13 00:42:59 +09:00
Tatsuhiro Tsujikawa
b97c088e87 Bump up version number to 1.3.2-DEV 2015-09-12 23:13:24 +09:00
Tatsuhiro Tsujikawa
e93a1bdf6d Call git submodule before creating packages 2015-09-12 23:12:51 +09:00
Tatsuhiro Tsujikawa
7f12f0671c Update bash_completion 2015-09-12 22:53:05 +09:00
Tatsuhiro Tsujikawa
39fb5972d4 Update man pages 2015-09-12 22:51:40 +09:00
Tatsuhiro Tsujikawa
063e1d7606 Bump up version number to 1.3.1, LT revision to 15:1:1 2015-09-12 22:43:21 +09:00
Tatsuhiro Tsujikawa
57aee184ca Update doc 2015-09-12 18:33:07 +09:00
Tatsuhiro Tsujikawa
4ae2850aa6 Add sphinx rubydomain files to EXTRA_DIST 2015-09-12 17:51:19 +09:00
Tatsuhiro Tsujikawa
f586797f7d Use INSTALL_DIR to customize mruby local installation directory
This change effectively makes `make distcheck` succeed.
2015-09-12 17:36:01 +09:00
Tatsuhiro Tsujikawa
0d8c8ca033 h2load: Record TTFB on first byte of response body, rather than first socket read 2015-09-12 11:18:54 +09:00
Tatsuhiro Tsujikawa
5ea90ba6bd nghttpx: Fix crash with signal QUIT if mruby is not initialized 2015-09-12 02:40:55 +09:00
Tatsuhiro Tsujikawa
fd8067be94 Merge branch 'thinred-fix-sysv-service' 2015-09-12 02:35:12 +09:00
Tatsuhiro Tsujikawa
ad34b45782 Merge branch 'fix-sysv-service' of https://github.com/thinred/nghttp2 into thinred-fix-sysv-service 2015-09-12 02:34:54 +09:00
Tatsuhiro Tsujikawa
d0f96da2c0 src: Cleanup 2015-09-12 02:10:07 +09:00
Tomasz Buchert
da57989cf6 start nghttpx with --daemon 2015-09-11 18:59:37 +02:00
Tatsuhiro Tsujikawa
f086b7b67e nghttpx: Fix busy loop 2015-09-12 01:22:40 +09:00
Tatsuhiro Tsujikawa
471fd688b9 Update mruby 2015-09-12 00:29:13 +09:00
Tatsuhiro Tsujikawa
02adaac368 nghttpx: Write h1 header into downstream buffer directly 2015-09-11 23:49:47 +09:00
Tatsuhiro Tsujikawa
1bbef4be74 Avoid usage of typeof and replace __builtin_offsetof with offsetof 2015-09-10 21:27:14 +09:00
Tatsuhiro Tsujikawa
918f8cca36 Honor stream->weight even if stream->last_writelen is 0 2015-09-09 21:20:59 +09:00
Tatsuhiro Tsujikawa
22b39f0337 Revert "last_write_len must not be 0, which makes weight useless"
This reverts commit e260006182.
2015-09-09 21:16:53 +09:00
Tatsuhiro Tsujikawa
e282462e1f Set have_mruby=no so that we can show it in summary 2015-09-09 21:16:11 +09:00
Tatsuhiro Tsujikawa
e4843201b0 Compile third-party libraries if hpack-tools is enabled 2015-09-09 21:11:42 +09:00
Tatsuhiro Tsujikawa
753f6d4a3e src: Fix compiler warning 2015-09-09 21:01:13 +09:00
Tatsuhiro Tsujikawa
aba2dbddc2 nghttpx: Don't allow partial PROXY protocol line 2015-09-09 00:21:54 +09:00
Tatsuhiro Tsujikawa
510dff4c39 Add mruby requirements 2015-09-08 02:37:51 +09:00
Tatsuhiro Tsujikawa
e260006182 last_write_len must not be 0, which makes weight useless 2015-09-08 02:27:59 +09:00
Tatsuhiro Tsujikawa
7d481db248 Merge branch 'nghttpx-proxyprotocol' 2015-09-07 23:52:39 +09:00
Tatsuhiro Tsujikawa
4f52f60b3c src: Inline some single character categorization functions 2015-09-07 23:28:31 +09:00
Tatsuhiro Tsujikawa
5afc25623e Pass CFLAGS, CXXFLAGS and LDFLAGS to mruby build 2015-09-07 23:28:31 +09:00
Tatsuhiro Tsujikawa
3ce1c1d39f nghttpx: Add date header field to error_reply and send_reply 2015-09-07 23:11:23 +09:00
Tatsuhiro Tsujikawa
21a3edfc60 nghttpx: Use 's' for param of Response::return 2015-09-07 23:00:01 +09:00
Tatsuhiro Tsujikawa
026ab797eb src: util::numeric_host: Use inet_pton instead of getaddrinfo 2015-09-07 22:40:37 +09:00
Tatsuhiro Tsujikawa
79945c0c45 nghttpx: Robust PROXY protocol implementation 2015-09-07 22:37:25 +09:00
Tatsuhiro Tsujikawa
f8c1da7f3c nghttpx: Add --accept-proxy-protocol usage to help message 2015-09-06 23:27:07 +09:00
Tatsuhiro Tsujikawa
a1bb48770c nghttpx: Add tests for PROXY protocol handling 2015-09-06 23:11:07 +09:00
Tatsuhiro Tsujikawa
d05b77b36c nghttpx: More logging for PROXY protocol handling 2015-09-06 21:44:45 +09:00
Tatsuhiro Tsujikawa
ce53bd239e nghttpx: Implement PROXY protocol version 1
Use --accept-proxy-protocol to enable PROXY protocol handling
2015-09-06 21:30:19 +09:00
Tatsuhiro Tsujikawa
39287314d3 nghttpx: Fix missing break 2015-09-06 18:34:10 +09:00
Tatsuhiro Tsujikawa
231db4a3e6 Update man pages 2015-09-06 17:41:37 +09:00
Tatsuhiro Tsujikawa
c30d252f94 nghttpx: Show warning if certain feature is not compiled in 2015-09-06 16:59:57 +09:00
Tatsuhiro Tsujikawa
6d46249b7b Merge branch 'nghttpx-mruby' 2015-09-06 16:39:21 +09:00
Tatsuhiro Tsujikawa
1b63e6d478 nghttpx: Call request phase hook for pushed resource as well 2015-09-06 15:21:36 +09:00
Tatsuhiro Tsujikawa
28defbfb4a nghttpx: Allow link header server push for HTTP/2 backend as well 2015-09-06 15:12:20 +09:00
Tatsuhiro Tsujikawa
75b98662be Don't use git submodule update --init in Makefile
This is because when we make tar ball, we are no longer under git
control.  git submodule does not work there.  We instead bundle mruby
source tree in archive.  git submodule command is only required when
building from git repository.
2015-09-06 01:23:11 +09:00
Tatsuhiro Tsujikawa
1df682140c nghttpx: Don't do mruby push with --no-server-push option 2015-09-06 00:06:48 +09:00
Tatsuhiro Tsujikawa
7273c7d688 Document mruby push 2015-09-06 00:05:07 +09:00
Tatsuhiro Tsujikawa
ef1595672c nghttpx: Add Request#push in mruby scripting
Refactor Http2Upstream so that we can share code between link header
field based push and mruby push.
2015-09-06 00:05:07 +09:00
Tatsuhiro Tsujikawa
98c959291f Update README.rst 2015-09-05 22:46:55 +09:00
Tatsuhiro Tsujikawa
2135c87f94 Update README.rst 2015-09-05 21:39:26 +09:00
Tatsuhiro Tsujikawa
e1106e0f91 Update doc 2015-09-05 21:28:43 +09:00
Tatsuhiro Tsujikawa
7b0113ac77 Remove \r 2015-09-05 21:26:58 +09:00
Tatsuhiro Tsujikawa
6f0c88580f Add *.pyc to .gitignore 2015-09-05 21:24:54 +09:00
Tatsuhiro Tsujikawa
18064d1626 Document nghttpx mruby extension 2015-09-05 21:23:27 +09:00
Tatsuhiro Tsujikawa
3029e5c530 Bundle sphinxcontrib.rubydomain
Source files were downloaded from
https://bitbucket.org/birkenfeld/sphinx-contrib/src/default/rubydomain/
2015-09-05 21:22:50 +09:00
Tatsuhiro Tsujikawa
be77b47ab5 integration: Add ruby scripts to EXTRA_DIST 2015-09-05 19:10:55 +09:00
Tatsuhiro Tsujikawa
77958eab46 Merge branch 'master' into nghttpx-mruby 2015-09-05 19:04:04 +09:00
Tatsuhiro Tsujikawa
8f41accf41 nghttpx: Don't initiate push if client disabled push 2015-09-05 19:02:55 +09:00
Tatsuhiro Tsujikawa
e19d5efced nghttpx: Allow absolute URI in Link header field for push 2015-09-05 19:01:02 +09:00
Tatsuhiro Tsujikawa
69c3e2114a Again fix mruby build properly; pass CC, CXX and LD to build_config.rb 2015-09-05 18:22:46 +09:00
Tatsuhiro Tsujikawa
6dcfe1c3f8 Add missing build_config.rb 2015-09-05 18:10:10 +09:00
Tatsuhiro Tsujikawa
d076d54f67 nghttpx: Don't add mruby related CPPFLAGS and LDFLAGS if it is disabled
Setting unused -L really makes libtool get angry
2015-09-05 18:03:05 +09:00
Tatsuhiro Tsujikawa
aba7e9e7f9 Add mruby as submodule; disable mruby by default for now 2015-09-05 17:49:10 +09:00
Tatsuhiro Tsujikawa
4ac7152f94 nghttpx: Fix build failure without mruby 2015-09-05 01:32:26 +09:00
Tatsuhiro Tsujikawa
d348ea3384 integration: Fix test failures 2015-09-05 01:24:43 +09:00
Tatsuhiro Tsujikawa
b4709b9e8c nghttpx: Fix crash without mruby script 2015-09-05 01:20:32 +09:00
Tatsuhiro Tsujikawa
21e1af2ae7 nghttpx: Delete replaced header fields 2015-09-05 01:18:18 +09:00
Tatsuhiro Tsujikawa
226a09b04a nghttpx: Use gc arena save/restore when creating headers hash 2015-09-05 01:14:17 +09:00
Tatsuhiro Tsujikawa
587f37a597 nghttpx: Remove unused includes 2015-09-05 01:12:51 +09:00
Tatsuhiro Tsujikawa
97f488a5c7 nghttpx: Add Env.phase method 2015-09-05 01:11:20 +09:00
Tatsuhiro Tsujikawa
45e0d42c51 nghttpx: Check allowed operations per phase 2015-09-05 01:07:29 +09:00
Tatsuhiro Tsujikawa
bddc4a0a04 nghttpx: Rewrite API; introduce Env object 2015-09-05 00:53:42 +09:00
Tatsuhiro Tsujikawa
a9338f1c0e nghttpx: Fix hang when error page is sent on response phase hook error 2015-09-04 22:34:40 +09:00
Tatsuhiro Tsujikawa
4ad00200a2 Merge branch 'master' into nghttpx-mruby 2015-09-04 22:22:06 +09:00
Tatsuhiro Tsujikawa
6b38f7e0d2 nghttpx: Fix crash with multi workers and QUIT signal 2015-09-04 22:21:10 +09:00
Tatsuhiro Tsujikawa
4872c9b4c9 Use C++ compiler to detect mruby since we have to enable C++ ABI mode
Since default Debian/Ubuntu mruby package does not enable C++ ABI
mode, it cannot be used with our C++ code, since mruby exception does
not properly cleanup C++ object allocated on stack.  We have to build
mruby with conf.enable_cxx_abi explicitly.  It is safe for us to build
our own mruby.
2015-09-04 22:10:49 +09:00
Tatsuhiro Tsujikawa
d8ca0a8d47 nghttpx: Add clear_headers and add_header methods to Request and Response 2015-09-04 02:53:02 +09:00
Tatsuhiro Tsujikawa
2222a898a1 integration: Add mruby tests 2015-09-04 02:52:19 +09:00
Tatsuhiro Tsujikawa
9e685a2734 nghttpx: Various test failures 2015-09-04 02:47:25 +09:00
Tatsuhiro Tsujikawa
c86e839091 nghttpx: Fix mruby detection 2015-09-04 01:33:20 +09:00
Tatsuhiro Tsujikawa
d722a09581 nghttpx: Rename mruby script options 2015-09-04 01:19:57 +09:00
Tatsuhiro Tsujikawa
5967667e9e nghttpx: Allow empty path assignment in mruby code 2015-09-04 01:00:27 +09:00
Tatsuhiro Tsujikawa
d044c58558 nghttpx: Detect mruby presence and guard mruby related code with ifdef 2015-09-04 00:54:41 +09:00
Tatsuhiro Tsujikawa
200217d8ea nghttpx: Store empty string to path for server-wide OPTIONS request
This change is required to show path attribute to mruby script.  It is
desirable to construct URI from parts.  Just checking method and path
is "*" is awkward.
2015-09-04 00:14:09 +09:00
Tatsuhiro Tsujikawa
02bb2c3e83 nghttpx: Create authority from host or authority-form for CONNECT request 2015-09-03 23:36:49 +09:00
Tatsuhiro Tsujikawa
64c754e2c5 Merge branch 'master' into nghttpx-mruby 2015-09-03 22:53:16 +09:00
Tatsuhiro Tsujikawa
ad65121496 nghttpx: Fix assertion error because of empty scheme 2015-09-03 22:52:33 +09:00
Tatsuhiro Tsujikawa
3235b88253 nghttpx: Fix assertion error because of empty scheme 2015-09-03 22:51:24 +09:00
Tatsuhiro Tsujikawa
5e3ab6da5a nghttpx: Perhaps this looks right, but not sure 2015-09-03 22:44:41 +09:00
Tatsuhiro Tsujikawa
6f9c9f8518 nghttpx: Fix assertion failure when response was commited early 2015-09-03 22:41:51 +09:00
Tatsuhiro Tsujikawa
65f2b16132 nghttpx: More freedom for custom response headers 2015-09-03 22:29:16 +09:00
Tatsuhiro Tsujikawa
05a761b628 nghttpx: Add Request.remote_addr which returns client remote address 2015-09-03 02:02:28 +09:00
Tatsuhiro Tsujikawa
14f5240d8f nghttpx: Update doc 2015-09-03 01:37:47 +09:00
Tatsuhiro Tsujikawa
baadec5ef4 nghttpx: Add response mruby hook 2015-09-03 01:33:52 +09:00
Tatsuhiro Tsujikawa
d20229d9b9 nghttpx: Handle block is not passed 2015-09-03 00:43:42 +09:00
Tatsuhiro Tsujikawa
e06af02573 nghttpx: Add Response mruby object 2015-09-03 00:40:14 +09:00
Tatsuhiro Tsujikawa
5cd34920b7 nghttpx: Add Request class accessors 2015-09-02 23:22:33 +09:00
Tatsuhiro Tsujikawa
e436caf0bb nghttpx: Don't forward request if response was commited in mruby hook 2015-09-02 23:22:26 +09:00
Tatsuhiro Tsujikawa
f0d41a5ac2 nghttpx: Handle nil given to request.set_header as value 2015-09-02 22:41:48 +09:00
Tatsuhiro Tsujikawa
068529586d nghttpx: Split up request class definition to dedicated files 2015-09-02 22:38:57 +09:00
Tatsuhiro Tsujikawa
45cdb10c46 nghttpx: Use ruby block to run request hook 2015-09-02 22:25:04 +09:00
Tatsuhiro Tsujikawa
2170d958d5 nghttpx: Return copied string for safety 2015-09-02 21:14:49 +09:00
Tatsuhiro Tsujikawa
9d78691936 nghttpx: Fix copy-and-paste bug 2015-09-02 21:14:20 +09:00
Tatsuhiro Tsujikawa
1508c50a45 nghttpx: Add basic infrastructure for mruby support 2015-09-02 02:45:15 +09:00
Tatsuhiro Tsujikawa
dd0a72579f Merge branch 'LPardue-issue-339' 2015-09-02 02:37:19 +09:00
Tatsuhiro Tsujikawa
e7bc269e97 Merge branch 'master' into LPardue-issue-339 2015-09-02 02:35:36 +09:00
Tatsuhiro Tsujikawa
e2557059e5 h2load: Fix crash with --timing-script option 2015-09-02 02:34:32 +09:00
Tatsuhiro Tsujikawa
0c4e26fd24 Merge branch 'issue-339' of https://github.com/LPardue/nghttp2 into LPardue-issue-339 2015-09-02 02:24:10 +09:00
Lucas Pardue
3002674bac h2load: Improve checking for timing script imput, prevent false positive in certain situations 2015-09-01 17:15:41 +00:00
Tatsuhiro Tsujikawa
e1f7643c92 nghttpx: Fix memory leak 2015-09-02 02:07:29 +09:00
Tatsuhiro Tsujikawa
d70eb14ce0 nghttpx: Drop connection before TLS finish if h2 requirement is not fulfilled 2015-08-31 23:30:40 +09:00
Tatsuhiro Tsujikawa
31c19cbda4 Bump up version number to 1.3.1-DEV 2015-08-30 19:04:31 +09:00
Tatsuhiro Tsujikawa
6d6ed16ab9 Update bash_completion 2015-08-30 18:59:44 +09:00
Tatsuhiro Tsujikawa
5a0f8b1f1f Update man pages 2015-08-30 18:59:30 +09:00
Tatsuhiro Tsujikawa
666308d8f6 Bump up version number to 1.3.0, LT revision to 15:0:1 2015-08-30 18:48:01 +09:00
Tatsuhiro Tsujikawa
789eb8a590 Update man pages 2015-08-30 00:24:11 +09:00
Tatsuhiro Tsujikawa
4cad48da16 Reset cycle to 0 if stream has only 1 direct descendant 2015-08-29 23:44:58 +09:00
Tatsuhiro Tsujikawa
e6566a1e3a Fix parallel make distcheck 2015-08-27 02:20:22 +09:00
Tatsuhiro Tsujikawa
fb4b152a73 Merge branch 'bxshi-add_header_to_nghttp2_asio_barebone_server' 2015-08-27 02:09:42 +09:00
bxshi
4f090d90c0 add iostream library to the example code snippet of nghttp2_asio server. 2015-08-24 02:59:25 -04:00
Tatsuhiro Tsujikawa
891134eba9 Define it and itprep recursive target if AM_EXTRA_RECURSIVE_TARGETS is defined 2015-08-23 23:04:19 +09:00
Tatsuhiro Tsujikawa
36d562927f nghttpx: Use nghttp2::ssl::DEFAULT_CIPHER_LIST for backend TLS connection 2015-08-23 23:03:29 +09:00
Tatsuhiro Tsujikawa
928a81885c Limit the number of incoming reserved (remote) streams
RFC 7540 does not enforce any limit on the number of incoming reserved
streams (in RFC 7540 terms, streams in reserved (remote) state).  This
only affects client side, since only server can push streams.
Malicious server can push arbitrary number of streams, and make
client's memory exhausted.  The new option,
nghttp2_set_max_reserved_remote_streams, can set the maximum number of
such incoming streams to avoid possible memory exhaustion.  If this
option is set, and pushed streams are automatically closed on
reception, without calling user provided callback, if they exceed the
given limit.  The default value is 200.  If session is configured as
server side, this option has no effect.  Server can control the number
of streams to push.
2015-08-23 21:43:41 +09:00
Tatsuhiro Tsujikawa
647e30619f Remove nghttp2_pq_increase_key 2015-08-21 23:35:17 +09:00
Tatsuhiro Tsujikawa
a4156cded3 fetch-ocsp-response: Handle spurious openssl exist status 0
With OpenSSL <= 1.0.1, openssl ocsp command still returns exit code 0,
even if verification was failed.  If that happens certain string is
emitted in stderr, so check that string and if exists, treat it as
error.  This issue was fixed in OpenSSL 1.0.2.

At least OpenSSL 1.0.2, openssl ocsp command still returns exit code
0, even if responder returned non-successful status code (e.g.,
trylater(3)).  We are not sure this is intentional or not.  To handle
this, we again check certain error string in stdout, and if it is
found, treat it as error.
2015-08-21 23:28:45 +09:00
Tatsuhiro Tsujikawa
4a99853021 nghttpd: Fix crash without SSL/TLS 2015-08-21 22:50:15 +09:00
Tatsuhiro Tsujikawa
176411aada Update doc 2015-08-20 23:31:22 +09:00
Tatsuhiro Tsujikawa
4b4a0f7492 nghttpd: GOAWAY if SSL/TLS requirements for HTTP/2 are not met 2015-08-20 21:21:56 +09:00
Tatsuhiro Tsujikawa
fe4efb0a5e Merge branch 'thinred-master' 2015-08-20 19:12:40 +09:00
Tatsuhiro Tsujikawa
1006caf8e9 Merge branch 'master' of https://github.com/thinred/nghttp2 into thinred-master 2015-08-20 19:11:07 +09:00
Tatsuhiro Tsujikawa
780a0381ba h2load: Exit if --timing-script and -r option is used together 2015-08-20 19:07:03 +09:00
Tatsuhiro Tsujikawa
e8ec7867b2 Merge branch 'LPardue-issue-332' 2015-08-20 19:02:56 +09:00
Tatsuhiro Tsujikawa
2423b21c71 Merge branch 'issue-332' of https://github.com/LPardue/nghttp2 into LPardue-issue-332 2015-08-20 18:53:10 +09:00
Lucas Pardue
08bf8a8f1a Move input file validation. Timing script auto nreqs scale correctly with nclients. 2015-08-19 15:23:43 +00:00
Tatsuhiro Tsujikawa
1c12606e70 nghttpx: Don't allow blacked listed cipher suites for HTTP/2 connection 2015-08-19 23:42:43 +09:00
Tatsuhiro Tsujikawa
059280d1a5 Add stream public API
The intention of this stream API is give server application about
stream dependency information, so that it can utilize it for better
scheduling of stream processing.  We have no plan to add object
oriented API based on stream object.
2015-08-19 23:04:06 +09:00
Tatsuhiro Tsujikawa
836b1de0d5 h2load: Remove trailing white spaces 2015-08-19 21:19:42 +09:00
Tatsuhiro Tsujikawa
12cecaa030 h2load: Remove trailing spaces and left conflict marker 2015-08-19 00:32:11 +09:00
Tatsuhiro Tsujikawa
50ae0ce739 Merge branch 'LPardue-h2load' 2015-08-19 00:29:14 +09:00
Lucas Pardue
cd4758227d Add Timing-script and base URI support 2015-08-18 15:16:50 +00:00
Tatsuhiro Tsujikawa
2e643424ac Remove unused nghttp2_stream_roots declaration 2015-08-18 22:38:28 +09:00
Tatsuhiro Tsujikawa
9da6c88d25 h2load: Use ev_timer_init 2015-08-18 21:34:33 +09:00
Tatsuhiro Tsujikawa
04aaaa3821 h2load: Remove trailing white spaces 2015-08-18 21:32:47 +09:00
Tatsuhiro Tsujikawa
da3bd559a9 Merge branch 'nshoemaker-time' 2015-08-18 21:22:24 +09:00
Nora
727ba4906c h2load adding timeout options 2015-08-18 01:52:22 -04:00
Tatsuhiro Tsujikawa
71623b674e Optimize pq 2015-08-18 00:26:20 +09:00
Tatsuhiro Tsujikawa
6a511aef0a Use remove/push combination instead of <= for performance 2015-08-18 00:21:42 +09:00
Tatsuhiro Tsujikawa
627d04fe6b nghttpd: Return date header field for 304 2015-08-17 23:49:01 +09:00
Tatsuhiro Tsujikawa
165cab7a29 nghttpd: Support HEAD request 2015-08-17 23:47:35 +09:00
Tatsuhiro Tsujikawa
5b59e46e2b Rewrite priority handling
We now use priority queue per stream, which contains the stream which
has ready to send a frame, or one of its descendants have a frame to
send.  We maintain invariant that if a stream is queued, then its
ancestors are also queued (except for root).  When we re-schedule
stream after transmission, we re-schedule all ancestors, so that
streams on the other path can get a chance to send.  This is basically
the same mechanism h2o project uses, but there are differences in the
details.
2015-08-17 22:35:50 +09:00
Tatsuhiro Tsujikawa
73b77964ef Reset last_cycle to 0 if queue gets empty 2015-08-15 01:08:20 +09:00
Tatsuhiro Tsujikawa
8ce8b2af46 src: Remove unused Memchunk::shrink 2015-08-15 00:57:58 +09:00
Tatsuhiro Tsujikawa
d1e49a196d Remove restriction in regard to number of stream in dependency tree
Previously, the number of stream in one dependency tree (not including
root) is limited to 120.  This is due to the fact that we use
recursive calls to traverse trees.  Now we replaced recursive calls
with loop, we can remove this limitation.  Also now all streams are
descendant of root stream, rather than linked list of individual
subtree root.
2015-08-15 00:53:09 +09:00
Tatsuhiro Tsujikawa
8c8d1f6e14 Bump up version number to 1.2.2-DEV 2015-08-15 00:13:37 +09:00
Tatsuhiro Tsujikawa
48244b9aca Update man pages 2015-08-14 23:59:47 +09:00
Tatsuhiro Tsujikawa
eb42fb4f49 Bump up version number to 1.2.1, LT revision to 14:8:0 2015-08-14 23:55:08 +09:00
Tatsuhiro Tsujikawa
b37834c584 h2load: Use default Config values to show help 2015-08-14 23:22:26 +09:00
Tatsuhiro Tsujikawa
d197d115dc h2load: Use floating point duration cast 2015-08-14 22:44:14 +09:00
Tatsuhiro Tsujikawa
3a1c37248a Update doc 2015-08-14 22:38:23 +09:00
Tatsuhiro Tsujikawa
f7fa9eb21b Fix sum_norest_weight calculation bug in stream dependency tree 2015-08-14 01:27:50 +09:00
Tatsuhiro Tsujikawa
4839d6d513 Merge branch 'nshoemaker-r_n' 2015-08-14 00:04:21 +09:00
nshoemaker
e1621584fa Fixing -r > -n check for when -n is not specified. 2015-08-13 05:09:40 -07:00
Tomasz Buchert
97566ce4e3 nghttpx: make early copy of stderr 2015-08-13 11:01:37 +02:00
Tomasz Buchert
900dcf4ced nghttpx: remove Android-specific code 2015-08-12 20:17:03 +02:00
Tomasz Buchert
06a0f3480e nghttpx: better handle /dev/stderr and /dev/stdout 2015-08-12 20:16:57 +02:00
Tatsuhiro Tsujikawa
473311269d nghttpx: Drop connection if client TLS handshake packet is too large 2015-08-13 01:24:59 +09:00
Tatsuhiro Tsujikawa
0c4cbc800b Document that previous OCSP response is continued to be used 2015-08-13 00:47:32 +09:00
Tatsuhiro Tsujikawa
b8f05c89bd nghttpx: App data in SSL is Connection, not ClientHandler 2015-08-13 00:42:59 +09:00
Tatsuhiro Tsujikawa
e91a576179 nghttpx: Rewrite TLS async handshake using memchunk buffers 2015-08-13 00:42:59 +09:00
Tatsuhiro Tsujikawa
72c661f1dd Merge branch 'yuki-kodama-openssl_no_ec' 2015-08-13 00:41:58 +09:00
Tatsuhiro Tsujikawa
2277cc771a Merge branch 'openssl_no_ec' of https://github.com/yuki-kodama/nghttp2 into yuki-kodama-openssl_no_ec 2015-08-13 00:32:15 +09:00
Tatsuhiro Tsujikawa
f8c30d0229 nghttpx: Fix heap-use-after-free 2015-08-12 21:14:18 +09:00
yuuki-kodama
53b5ffa103 Guard ecdh use with !OPENSSL_NO_EC @asio_server_tls_context.cc 2015-08-12 15:32:54 +09:00
Tatsuhiro Tsujikawa
b384b76f66 nghttpx: Fix hmac_keylen should be 16 for aes-128-cbc 2015-08-12 00:38:07 +09:00
Tatsuhiro Tsujikawa
b406d2da9e h2load: Stop timeout_watcher in Worker dtor 2015-08-11 23:51:08 +09:00
Tatsuhiro Tsujikawa
dd97b53554 h2load: Fix division by zero if -r > -n 2015-08-11 23:49:34 +09:00
Tatsuhiro Tsujikawa
0f7e84bb62 h2load: Always initialize timeout_watcher 2015-08-11 23:44:22 +09:00
Tatsuhiro Tsujikawa
81add96b1e src: Fix bug in get_uint64 2015-08-11 23:42:32 +09:00
Tatsuhiro Tsujikawa
020e66b9da nghttpx: Start read watcher after handshake 2015-08-11 23:14:48 +09:00
Tatsuhiro Tsujikawa
d2a63a88a0 nghttpx: Fix stall if read buffer has app data when handshake finished 2015-08-11 22:37:15 +09:00
Tatsuhiro Tsujikawa
e5a9f6c163 Merge branch 'skip2-reword-hpac-tutorial' 2015-08-11 00:24:50 +09:00
Tom Harwood
560955f50d doc: Reword the HPAC tutorial.
The overall meaning is the same. I added a paragraph to introduce nghttp2_hd_inflate_hd(), and added an explanation of using NGHTTP2_NV_FLAG_NO_INDEX for security sensitive headers.
2015-08-09 17:05:52 +01:00
Tatsuhiro Tsujikawa
8410f684fb nghttpx: Drop connection if client hello is too large 2015-08-10 00:29:43 +09:00
Tatsuhiro Tsujikawa
ff44e211ed nghttpx: Fix tls handshake bug
This fixes 2 things:
1. potential busy loop
2. disabling ticket is not working after resumption
2015-08-09 18:33:49 +09:00
Tatsuhiro Tsujikawa
73442ba5ba Bump up version number to 1.2.1-DEV 2015-08-09 01:27:50 +09:00
Tatsuhiro Tsujikawa
b78662e506 integration: Fix errors related to host-rewrite 2015-08-09 01:23:58 +09:00
Tatsuhiro Tsujikawa
8a7bc6f7bc Update bash_completion 2015-08-09 01:13:53 +09:00
Tatsuhiro Tsujikawa
66f2097627 Update man pages 2015-08-09 01:13:35 +09:00
Tatsuhiro Tsujikawa
a67d15be58 Bump up version number to 1.2.0, LT revision to 14:7:0 2015-08-09 01:09:37 +09:00
Tatsuhiro Tsujikawa
2e7cee0faa h2load: Code cleanup 2015-08-09 01:05:15 +09:00
Tatsuhiro Tsujikawa
50eac7bdf0 h2load: Fix -r does not work without -C option 2015-08-09 00:24:17 +09:00
Tatsuhiro Tsujikawa
846da5fb3f h2load: Update doc 2015-08-08 23:44:47 +09:00
Tatsuhiro Tsujikawa
3e53cd189c clang-format-3.5 2015-08-08 23:36:02 +09:00
Tatsuhiro Tsujikawa
9331dc755e Add python-setuptools to apt-get line 2015-08-07 22:27:26 +09:00
Tatsuhiro Tsujikawa
bf8220fd5e Merge branch 'skip2-reword-client-tutorial' 2015-08-04 23:36:37 +09:00
Tatsuhiro Tsujikawa
6a70f34c73 Merge branch 'reword-client-tutorial' of https://github.com/skip2/nghttp2 into skip2-reword-client-tutorial 2015-08-04 23:33:00 +09:00
Tom Harwood
c50ea91a3f doc: Reword some of the client tutorial.
The overall meaning of the tutorial is the same. I added text describing frame types where it helps explain the callbacks better, e.g. introducing the HEADERS frame before on_header_callback().

Also fixed a couple of typos:
- Fixed ``reacb`` typo to ``readcb``
- Added parens to some functions, e.g. ``on_frame_recv_callback`` => ``on_frame_recv_callback()``
2015-08-04 00:08:12 +01:00
Tatsuhiro Tsujikawa
388285675b python: Check protocol is None 2015-08-03 16:49:09 +09:00
Tatsuhiro Tsujikawa
0481d44c69 Fix typo 2015-08-01 20:20:32 +09:00
Tatsuhiro Tsujikawa
3d0905a90f Merge branch 'skip2-master' 2015-08-01 16:20:00 +09:00
Tatsuhiro Tsujikawa
091055edec Merge branch 'master' of https://github.com/skip2/nghttp2 into skip2-master 2015-08-01 16:18:55 +09:00
Tom Harwood
4f0ff5bfb1 doc: fix a couple of links 2015-08-01 02:39:38 +01:00
Tatsuhiro Tsujikawa
c941bff929 Fix compile error with gcc 2015-07-31 21:27:36 +09:00
Tatsuhiro Tsujikawa
0bbff5b738 nghttpx: Continue if push was failed 2015-07-31 21:25:43 +09:00
Tatsuhiro Tsujikawa
e66bd490a4 Fix crash if response or data is submitted to closing stream 2015-07-31 21:11:16 +09:00
Tom Harwood
e9e9626c2c doc: Reword some of the server tutorial.
The overall meaning of the tutorial is the same, except for a couple of changes:
- app_context struct was called "app_content", fixed the typo
- nghttp2_session_server_new2() is mentioned, but the example uses nghttp2_session_server_new() instead, changed the text to match
2015-07-30 23:50:34 +01:00
Tatsuhiro Tsujikawa
a152c6346d Fix build error with Android NDK 2015-07-30 22:57:25 +09:00
Tatsuhiro Tsujikawa
96a6dcb152 python: Remove draft from hpack checker 2015-07-30 22:12:08 +09:00
Tatsuhiro Tsujikawa
8c701bb139 Header table size UINT32_MAX must be accepted 2015-07-30 21:19:46 +09:00
Tatsuhiro Tsujikawa
ebf27e6523 Fix configure warning that 'missing' is missing or too old 2015-07-30 20:08:43 +09:00
Tatsuhiro Tsujikawa
c379b46a26 Remove monotonic_clock replacement macro for gcc-4.6 2015-07-29 21:19:33 +09:00
Tatsuhiro Tsujikawa
762bafa47b Add tlsticketupdate.go to EXTRA_DIST 2015-07-29 21:18:16 +09:00
Tatsuhiro Tsujikawa
0ed8ed3f8d tlsticketupdate.go: Add expiry time, some refactoring 2015-07-29 21:14:43 +09:00
Tatsuhiro Tsujikawa
6446660113 nghttpx: Make record size timeout more durable to high load situation 2015-07-29 20:57:11 +09:00
Tatsuhiro Tsujikawa
d0a37d59a5 nghttpx: Disable TLS session ticket if ticket key is not available 2015-07-29 20:38:49 +09:00
Tatsuhiro Tsujikawa
58dd924343 Update man pages 2015-07-29 00:01:12 +09:00
Tatsuhiro Tsujikawa
a73cfd5f7b nghttpx: Add reference to manual section for session resumption 2015-07-29 00:00:43 +09:00
Tatsuhiro Tsujikawa
a1288a5826 nghttpx: Rename --tls-ticket-cipher as --tls-ticket-key-cipher 2015-07-28 23:49:37 +09:00
Tatsuhiro Tsujikawa
80d96590c5 nghttpx: Update doc 2015-07-28 23:43:32 +09:00
Tatsuhiro Tsujikawa
e8c83798da Merge branch 'memcached' 2015-07-28 21:20:21 +09:00
Tatsuhiro Tsujikawa
6ad332b801 nghttpx: Call disconnect() when memcached connection cannot be made 2015-07-28 21:19:27 +09:00
Tatsuhiro Tsujikawa
f1b163a32c nghttpx: Log notice level when TLS ticket key was retrieved from memcached 2015-07-28 02:19:14 +09:00
Tatsuhiro Tsujikawa
7a3dff5a65 Add sample TLS ticket key generator program 2015-07-28 01:59:48 +09:00
Tatsuhiro Tsujikawa
4d7be08585 nghttpx: Do some macro dance for IOV_MAX 2015-07-28 01:26:34 +09:00
Tatsuhiro Tsujikawa
a6fdca730d nghttpx: Add options to set maximum retry and failure when getting ticket keys 2015-07-28 01:17:29 +09:00
Tatsuhiro Tsujikawa
4949dd4888 nghttpx: Add --tls-ticket-key-memcached-interval option 2015-07-28 01:02:33 +09:00
Tatsuhiro Tsujikawa
2f2a300e83 nghttpx: Add TLS ticket key sharing among nghttpx instances using memcached 2015-07-28 00:54:44 +09:00
Tatsuhiro Tsujikawa
a4a9cfd650 nghttpx: Change session cache key prefix 2015-07-27 21:18:12 +09:00
Tatsuhiro Tsujikawa
bb228c27de Merge branch 'master' into memcached
Conflicts:
	src/shrpx_ssl.cc
2015-07-27 21:16:02 +09:00
Tatsuhiro Tsujikawa
7152e0f6b8 nghttpx: Fix bug that decrypt only key is not considered 2015-07-27 21:13:02 +09:00
Tatsuhiro Tsujikawa
72cfdbc0fa nghttpx: Fix compile error on travis (again) 2015-07-27 02:28:36 +09:00
Tatsuhiro Tsujikawa
f472e6ff48 nghttpx: Fix compile error on travis 2015-07-27 02:22:27 +09:00
Tatsuhiro Tsujikawa
1708d2e69e nghttpx: Add doc 2015-07-27 02:14:52 +09:00
Tatsuhiro Tsujikawa
e3cdfd12ea nghttpx: Use std::array for TicketKey 2015-07-27 02:12:07 +09:00
Tatsuhiro Tsujikawa
cd25c6846e nghttpx: Create struct Address which holds struct sockaddr_union and length 2015-07-27 01:41:10 +09:00
Tatsuhiro Tsujikawa
efcd43a367 nghttpx: Don't enable read timer while connecting to HTTP/1 server 2015-07-27 01:18:52 +09:00
Tatsuhiro Tsujikawa
90b4b48c7e nghttpx: Add shared session cache using memcached 2015-07-26 23:33:06 +09:00
Tatsuhiro Tsujikawa
9eb234d321 Merge branch 'nshoemaker-mt' 2015-07-25 12:57:29 +09:00
Tatsuhiro Tsujikawa
fea70ec832 Merge branch 'mt' of https://github.com/nshoemaker/nghttp2 into nshoemaker-mt 2015-07-25 12:55:15 +09:00
Tatsuhiro Tsujikawa
3e333f49fe Update http-parser 2015-07-25 12:53:17 +09:00
Nora Shoemaker
12013508bf Running clang-format 2015-07-24 15:35:11 -07:00
Nora Shoemaker
871a93e4aa Merge branch 'mt_master' into mt 2015-07-24 15:31:55 -07:00
Nora Shoemaker
85e4151bca manual merge 2015-07-24 15:17:22 -07:00
Nora Shoemaker
278247faa9 Starting a second earlier 2015-07-24 14:34:53 -07:00
Nora Shoemaker
e2808dcd96 Merge pull request #4 from tatsuhiro-t/master
Merging tatsuhiro-t:master -> nshoemaker:master
2015-07-24 13:38:04 -07:00
Tatsuhiro Tsujikawa
adec2c06bf nghttpx: Set SSL/TLS session timeout to 12 hours 2015-07-24 23:59:19 +09:00
Tatsuhiro Tsujikawa
6c8243f6d2 nghttpd: Add verbose output when SSL/TLS session is reused 2015-07-24 23:40:44 +09:00
Tatsuhiro Tsujikawa
afbb99ecf7 nghttpx: Enable session resumption on HTTP/2 backend 2015-07-24 23:40:27 +09:00
Tatsuhiro Tsujikawa
abce7c7210 nghttpd: Fix the bug that 304 response has non-empty body 2015-07-24 23:25:10 +09:00
Nora Shoemaker
ec617ae6e5 Getting rid of unused fields in config 2015-07-23 11:21:12 -07:00
Nora Shoemaker
d6786f75cb Getting rid of unused fields in Worker 2015-07-23 11:01:09 -07:00
Nora Shoemaker
584f5f3734 Do not allow -r > -t 2015-07-23 10:37:51 -07:00
Nora Shoemaker
a04c67bcd6 Getting rid of print statements 2015-07-23 10:30:55 -07:00
Nora Shoemaker
8325c6ccdf setting request number correctly: 2015-07-23 10:20:18 -07:00
Nora Shoemaker
30235f8809 Assigning clients to workers proportional to rate 2015-07-23 09:37:44 -07:00
Tatsuhiro Tsujikawa
9b63fc011e nghttpx: Open log files by default configuration 2015-07-24 00:32:19 +09:00
Tatsuhiro Tsujikawa
cab6c7871c nghttpx: Don't rewrite host header field by default
In reverse proxy usage, backend server most likely wants to see the
original header field.  So this commit turns off host header rewrite
by default.  --no-host-rewrite option is deprecated, and if it is
used, warning message is displayed.  --host-rewrite option is added to
enable host rewrite.
2015-07-23 23:54:56 +09:00
Tatsuhiro Tsujikawa
04bd25d468 nghttpx: Simplify ticket handling between workers just using mutex 2015-07-23 23:13:29 +09:00
Tatsuhiro Tsujikawa
cd2c751f82 nghttpx: Generate new ticket key every 1hr and its life time is now 12hrs 2015-07-23 21:14:38 +09:00
Nora Shoemaker
65df3c63bf Adding new rate and connection allocation to threads 2015-07-22 16:41:58 -07:00
Tatsuhiro Tsujikawa
aa012f7a58 Use PROTOCOL_ERROR against DATA sent to idle stream 2015-07-23 02:02:27 +09:00
Tatsuhiro Tsujikawa
f6a8c8d078 Remove unused variable 2015-07-23 00:44:54 +09:00
Tatsuhiro Tsujikawa
7f71fed963 Allow multiple in-flight SETTINGS 2015-07-23 00:36:00 +09:00
Tatsuhiro Tsujikawa
44cbc785fc nghttpx: Don't reuse backend connection if it is not clean 2015-07-22 21:41:16 +09:00
Nora Shoemaker
916e27489f rate now working 2015-07-21 16:53:46 -07:00
Nora Shoemaker
650e463a49 First try with something working, still need to clean and test 2015-07-21 11:28:12 -07:00
Nora Shoemaker
52152ad96d Can make h2load, but running into recursive loop problem 2015-07-21 11:06:33 -07:00
Tatsuhiro Tsujikawa
f3288092e8 Strictly check occurrence of dynamic table size update
RFC 7541 requires that dynamic table size update must occur at the
beginning of the first header block, and is signaled as SETTINGS
acknowledgement.  This commit checks these conditions.  If dynamic
table size update appears other than the beginning of the first header
block, it is treated as error.  If SETTINGS ACK is received, and next
HEADERS header block does not have dynamic table size update, it is
treated as error.
2015-07-22 00:11:23 +09:00
Tatsuhiro Tsujikawa
18234b8741 Merge branch 'alagoutte-misc' 2015-07-21 21:18:40 +09:00
Alexis La Goutte
26b7bee16f Fix rm: cannot remove ‘*.rst’: No such file or directory when "make clean"
When you don't generated documentation via make html
2015-07-21 11:19:50 +02:00
Tatsuhiro Tsujikawa
921e393dcd src: Use <PATH> instead of <FILE> in usage text 2015-07-20 23:50:05 +09:00
Tatsuhiro Tsujikawa
0ec1b98f27 nghttpx: Reorder config fields 2015-07-20 23:15:01 +09:00
Tatsuhiro Tsujikawa
a8574fdef2 nghttpx: Use Use std::string instead of std::unique_ptr<char[]> for tls config 2015-07-20 23:15:01 +09:00
Tatsuhiro Tsujikawa
dd8ce1e9d2 nghttpx: Use std::unique_ptr<char[]> instead of raw char pointer 2015-07-20 21:37:23 +09:00
Tatsuhiro Tsujikawa
ca3444c34c Fix compile error/warnings with gcc-4.7 2015-07-19 20:50:14 +09:00
Tatsuhiro Tsujikawa
5c96ecd77d Dump APIDOC removal failure errors to /dev/null 2015-07-19 19:16:09 +09:00
Tatsuhiro Tsujikawa
fa7a74cfa8 h2load: Use std::string::size instead of strlen 2015-07-19 18:37:41 +09:00
Tatsuhiro Tsujikawa
b37716ab6a h2load: Workaround with clang-3.4 2015-07-19 18:35:14 +09:00
Tatsuhiro Tsujikawa
5dc060c1a2 src: Use C++11 value-initialization, instead of memset-ing 0 2015-07-19 17:55:37 +09:00
Tatsuhiro Tsujikawa
05d5c404e2 Merge branch 'tls-session-ticket-aes256' 2015-07-19 17:38:34 +09:00
Tatsuhiro Tsujikawa
cce64e6728 h2load: Call second_timeout_cb manually so that we don't waste first 1 second 2015-07-19 17:31:35 +09:00
Tatsuhiro Tsujikawa
006ac7b1b0 h2load: Fix HTML formatting 2015-07-19 17:27:38 +09:00
Tatsuhiro Tsujikawa
5465cdf4a4 src: Don't use struct tm.tm_yday from strptime 2015-07-19 17:14:25 +09:00
Tatsuhiro Tsujikawa
f2a1c8ee60 Partially revert a23ab00686
The workaround introduced in a23ab00686
may cause a problem in certain platform (e.g., MacPorts, see GH-303)
2015-07-19 16:11:42 +09:00
Tatsuhiro Tsujikawa
a78fcdb7bf Merge branch 'nshoemaker-h2load_r_C' 2015-07-19 16:07:09 +09:00
Tatsuhiro Tsujikawa
ad87266a58 Merge branch 'h2load_r_C' of https://github.com/nshoemaker/nghttp2 into nshoemaker-h2load_r_C 2015-07-19 16:04:43 +09:00
Nora Shoemaker
d326e28c92 running clang-format 2015-07-17 14:10:40 -07:00
Nora Shoemaker
c1c177addc Changing warning to mention #reqs rather than test time 2015-07-17 14:10:21 -07:00
Tatsuhiro Tsujikawa
e8167ceea7 nghttpx: Add AES-256-CBC encryption for TLS session ticket 2015-07-18 02:02:33 +09:00
Tatsuhiro Tsujikawa
ac301537ef Bump up version number to 1.1.3-DEV 2015-07-18 00:31:43 +09:00
Tatsuhiro Tsujikawa
03034c0081 Update man pages 2015-07-18 00:23:53 +09:00
Tatsuhiro Tsujikawa
fa872a6b48 Bump up version number to 1.1.2 2015-07-18 00:21:29 +09:00
Tatsuhiro Tsujikawa
a23ab00686 Allow custom install location for python bindings 2015-07-18 00:19:47 +09:00
Nora Shoemaker
eeba12144c Refactored seconds setting and worker space reservation 2015-07-16 11:02:01 -07:00
Nora Shoemaker
ce00c50720 Changing comparison from double to ssize_t 2015-07-16 10:51:41 -07:00
Nora Shoemaker
7d2ea42c38 Fixing spelling mistake in num-conns description 2015-07-16 10:43:50 -07:00
Nora Shoemaker
e0d7ce439d Fixing style for Config field initializer list 2015-07-16 10:35:03 -07:00
Nora Shoemaker
ccfe7f8548 Reordering Config field initializer list 2015-07-16 10:33:44 -07:00
Tatsuhiro Tsujikawa
c470ac7b00 asio: Fix missing nghttp2_timegm 2015-07-16 14:01:18 +09:00
Nora Shoemaker
6cf772da6a Merge pull request #2 from tatsuhiro-t/master
pulling changes from master
2015-07-15 11:59:50 -07:00
Nora Shoemaker
5892385e5c [EDGE-879] run clang-format and make sure style is good 2015-07-15 09:51:33 -07:00
Tatsuhiro Tsujikawa
1ce3a000a1 Bump up version number to 1.1.2-DEV 2015-07-16 00:36:10 +09:00
Tatsuhiro Tsujikawa
8585599b4b nghttpx: Add doc 2015-07-16 00:03:34 +09:00
Tatsuhiro Tsujikawa
2bac00ea5f nghttpx: Add additional assert just in case 2015-07-16 00:01:26 +09:00
Tatsuhiro Tsujikawa
3396c71c3c Update man pages 2015-07-15 23:48:41 +09:00
Tatsuhiro Tsujikawa
f821f6bd80 Bump up version number to 1.1.1 2015-07-15 23:46:22 +09:00
Tatsuhiro Tsujikawa
7a3012cc1b src: Rename timegm as nghttp2_timegm 2015-07-15 23:44:24 +09:00
Tatsuhiro Tsujikawa
ba31b990a2 nghttpx: Remove dead handling of Downstream::STREAM_CLOSED 2015-07-15 23:33:44 +09:00
Tatsuhiro Tsujikawa
fc062976a1 nghttpx: Delete DownstreamConnection from Downstream explicitly 2015-07-15 23:31:32 +09:00
Tatsuhiro Tsujikawa
20e63151a5 nghttpx: Fix bug that idle timer is used after reuse 2015-07-15 23:18:32 +09:00
Tatsuhiro Tsujikawa
e63e775fea nghttpx: Simplify BlockedLink management 2015-07-15 20:44:44 +09:00
Tatsuhiro Tsujikawa
031fb31248 nghttpx: Fix memory leak, and blocked stream dispatch 2015-07-15 19:47:15 +09:00
Tatsuhiro Tsujikawa
6d10799301 nghttpx: Don't pool failed HTTP/1 backend connection 2015-07-15 19:46:48 +09:00
Nora Shoemaker
d6551de8d4 [EDGE-877] [h2load] apply changes to new version of h2load 2015-07-14 23:41:29 +00:00
Nora Shoemaker
6b53f7ee19 [EDGE-879] run clang-format and make sure style is good 2015-07-14 11:16:37 -07:00
Tatsuhiro Tsujikawa
f54745fe4c Bump up version number to 1.1.1-DEV 2015-07-15 01:29:57 +09:00
Tatsuhiro Tsujikawa
da51389927 Update man pages 2015-07-15 01:25:27 +09:00
Tatsuhiro Tsujikawa
a06c16c99a Bump up version number to 1.1.0 2015-07-15 01:23:18 +09:00
Tatsuhiro Tsujikawa
3db03a3f51 Exclude python bindings for make distcheck
setuptools does now allow us to install custom location without hack.
Also it does not provide uninstall feature, and `make uninstall`
leaves several files we cannot easily remove (e.g., easy-install.pth).
Therefore, it is better just exclude python bindings from `make
distcheck`.
2015-07-15 01:16:56 +09:00
Tatsuhiro Tsujikawa
5e966d000a python: Fix out-of-tree builds failure 2015-07-15 01:14:52 +09:00
Tatsuhiro Tsujikawa
1c7431293d Update bash_completion 2015-07-15 00:01:22 +09:00
Tatsuhiro Tsujikawa
9c8bc1218d Update man pages 2015-07-15 00:01:04 +09:00
Tatsuhiro Tsujikawa
860da8bf87 Bump up version number to 1.0.6, LT revision to 14:6:0 2015-07-14 23:54:29 +09:00
Tatsuhiro Tsujikawa
326ac31a23 nghttpx: Update doc 2015-07-14 23:45:50 +09:00
Tatsuhiro Tsujikawa
a2c78cfc69 nghttpx: Update doc 2015-07-14 23:44:58 +09:00
Tatsuhiro Tsujikawa
4fed7a1476 nghttpx: Refactor log format parsing 2015-07-14 23:36:44 +09:00
Tatsuhiro Tsujikawa
8c1e863523 nghttpx: Refactor option name lookup 2015-07-14 23:21:38 +09:00
Tatsuhiro Tsujikawa
27da08ee68 nghttpx: Add inline LogFragment ctor 2015-07-14 22:43:02 +09:00
Tatsuhiro Tsujikawa
0a6877d091 nghttpx: Supply template version strcopy 2015-07-14 22:40:33 +09:00
Tatsuhiro Tsujikawa
7f7b6d641d nghttpx: Allow log variable to be enclosed by curly braces 2015-07-14 22:25:52 +09:00
Tatsuhiro Tsujikawa
7c301defbd clang-format src/nghttp.cc 2015-07-14 21:37:34 +09:00
Nora Shoemaker
2482dd7f77 Adding -r and -C options to h2load 2015-07-13 11:28:15 -07:00
Tatsuhiro Tsujikawa
fb7775e382 nghttpx: Detect loop in --include paths 2015-07-13 21:44:06 +09:00
Tatsuhiro Tsujikawa
f96edbf987 nghttpx: Pin frontend to specific HTTP/2 session object per group 2015-07-13 21:31:37 +09:00
Tatsuhiro Tsujikawa
3db0badc35 Update man pages 2015-07-12 23:26:45 +09:00
Tatsuhiro Tsujikawa
3097547491 nghttpx: Add --include option to read additional configuration from given file 2015-07-12 23:18:36 +09:00
Tatsuhiro Tsujikawa
6307f96fb3 nghttpx: Enable host-path backend routing in HTTP/2 backend
To achieve host-path backend routing, we changed behaviour of
--backend-http2-connections-per-worker.  It now sets the number of
HTTP/2 physical connections per pattern group if pattern is used in -b
option.

Fixes GH-292
2015-07-12 23:02:30 +09:00
Tatsuhiro Tsujikawa
8a2543d7b7 asio: Fix custom OpenSSL build 2015-07-11 19:37:04 +09:00
Tatsuhiro Tsujikawa
fa7069a273 nghttpx: Don't rewrite path if http2 proxy or client proxy is enabled
There are many requests which changes its meaning when we rewrite
path.  This is due to bad percent-encoding in URI; reserved characters
are just used without percent encoding.  It seems this is common in ad
services, but I suspect more to come.  For reverse proxying situation,
sane service most likely encodes URI properly, so probably this is not
an issue.
2015-07-11 17:50:58 +09:00
Tatsuhiro Tsujikawa
1a63cd94aa nghttpx: Pass by reference, since it just get copied there 2015-07-11 17:30:38 +09:00
Tatsuhiro Tsujikawa
7c216c6df8 nghttpx: Document that patterns with host take precedence 2015-07-11 16:46:13 +09:00
Tatsuhiro Tsujikawa
e7724914a9 nghttpx: Less copy when matching path 2015-07-11 16:46:13 +09:00
Tatsuhiro Tsujikawa
19e47a1922 nghttpx: Normalize path when setting it to Downstream 2015-07-11 16:12:35 +09:00
Tatsuhiro Tsujikawa
d62e4dbc5e Update man pages 2015-07-11 12:45:23 +09:00
Tatsuhiro Tsujikawa
c2e4ed9624 nghttpx: Deal with the path without trailing slash on pattern match
If pattern ends with '/', and pattern and path matches without that
slash, we consider they match to deal with request to the directory
without trailing slash.  That is if pattern is "/foo/" and path is
"/foo", we consider they match.
2015-07-11 12:43:48 +09:00
Tatsuhiro Tsujikawa
d457f39b1e nghttpx: Fix unix domain backend 2015-07-11 02:41:33 +09:00
Tatsuhiro Tsujikawa
6d556755ee Attemp to fix travis build error 2015-07-11 02:08:16 +09:00
Tatsuhiro Tsujikawa
3119fc259c Select backend based on request host and path by extending -b option
-b option syntax is now <HOST>,<PORT>[;<PATTERN>[:...]].  The optional
<PATTERN>s specify the request host and path it is used for.  The
<PATTERN> can contain path, host + path or host.  The matching rule is
closely designed to ServeMux in Go programming language.
2015-07-11 00:15:52 +09:00
Tatsuhiro Tsujikawa
1940413eb3 Document that python-setuptools is required for python bindings 2015-07-09 21:12:25 +09:00
Tatsuhiro Tsujikawa
237f742100 h2load: Add --ciphers option 2015-07-08 23:14:41 +09:00
Tatsuhiro Tsujikawa
764cd17316 Add test when nghttp2_http_on_data_chunk failed without auto flow control 2015-07-08 22:56:40 +09:00
Tatsuhiro Tsujikawa
c70cfe64c4 Fix DATA is not consumed if nghttp2_http_on_data_chunk failed
This commit fixes the bug that DATA is not consumed if
nghttp2_http_on_data_chunk is failed.  It also simplify the handling
of missing stream in NGHTTP2_IB_READ_DATA state.
2015-07-08 22:56:39 +09:00
Tatsuhiro Tsujikawa
693fba3b64 Add more docs about NGHTTP2_ERR_DATA_EXIST and its condition
This commit documents NGHTTP2_ERR_DATA_EXIST also occurs if HEADERS
has been already attached to stream too.  This commit also fixes
possible assertion error, and now nghttp2_submit_headers() and
nghttp2_submit_response() may return NGHTTP2_ERR_DATA_EXIST.  But we
recommend to use nghttp2_submit_request() and
nghttp2_submit_response(), and using them will avoid this error.
2015-07-08 00:35:07 +09:00
Tatsuhiro Tsujikawa
8fcf5f60e4 nghttp: Add --max-concurrent-streams option 2015-07-08 00:22:21 +09:00
Tatsuhiro Tsujikawa
c00f8e3847 Merge branch 'acesso-patch-2' 2015-07-07 21:22:17 +09:00
Tatsuhiro Tsujikawa
7af638f921 Merge branch 'patch-2' of https://github.com/acesso/nghttp2 into acesso-patch-2 2015-07-07 21:19:23 +09:00
Tatsuhiro Tsujikawa
580c1f3af3 Remove AC_FUNC_MALLOC, which may break C++ build 2015-07-07 21:14:11 +09:00
Tatsuhiro Tsujikawa
d10228cdf7 Merge branch 'mindw-lib_msvc_fix' 2015-07-07 01:19:35 +09:00
Gabi Davar
1dd3564d15 one more. 2015-07-05 18:01:13 +03:00
Gabi Davar
e3fd81995b remove redundant function decorators. 2015-07-05 07:09:27 +03:00
Gabi Davar
d4e1b63c19 msvc build fixes and enchantments.
* fix build broken by recent changes
* place all build artifacts to OBJDIR
* explicitly add manifest (VC9/10)
* modernize python bindings creation
* some minor refactoring
2015-07-04 23:12:55 +03:00
Tatsuhiro Tsujikawa
3973d9ce12 Fix typo 2015-07-04 16:02:28 +09:00
Tatsuhiro Tsujikawa
43d6f6b16a Compile with IRIX gcc-4.7
Patch from Klaus Ziegler
2015-07-01 21:30:27 +09:00
Tatsuhiro Tsujikawa
2f7839fa42 Fix compiler warning 2015-06-30 21:33:54 +09:00
acesso
49c3d75f9a Right place for comment
comment of pushed moved from request to entry array
added stream_id as string to connection element as string
2015-06-29 15:31:00 -03:00
Tatsuhiro Tsujikawa
dc7232fa53 Fix travis compile error 2015-06-30 00:01:26 +09:00
Tatsuhiro Tsujikawa
51ef646678 src: Always use our own faster simpler timegm, use it to calculate gmtoff 2015-06-29 23:14:54 +09:00
Tatsuhiro Tsujikawa
515c313073 nghttpx: Add $ssl_session_reused log variable
The syntax for this variable is the same as nginx: if SSL/TLS session
was reused, "r" is produced.  Otherwise ".".
2015-06-28 22:15:04 +09:00
Tatsuhiro Tsujikawa
197493afd4 nghttpx: Add log variables related to SSL/TLS connection
This commit add following 3 log variables to SSL/TLS connection:
$ssl_cipher, $ssl_protocol, $ssl_session_id.  If no information is
available for them, '-' is produced for each.
2015-06-28 16:44:34 +09:00
acesso
2ea1deafd0 Add comment on HAR on pushed objects
It seems that HAR 1.2 does not have a proper representaion for pushed objects. I could´t just add a custom parameter so I think a comment at response will not hurt anybody.
2015-06-27 09:47:53 -03:00
Tatsuhiro Tsujikawa
b06e339dbb Prepare for IRIX support, port relevant change from spdylay 2015-06-27 17:51:07 +09:00
Tatsuhiro Tsujikawa
68c0f8a310 Fix compile error with gcc-4.7
Use std::map::insert instead of std::map::emplace, since gcc-4.7 does
not support the latter.
2015-06-27 11:19:54 +09:00
Tatsuhiro Tsujikawa
5182dc6cc9 Bump up version number to 1.0.6-DEV 2015-06-27 11:01:44 +09:00
Tatsuhiro Tsujikawa
68f6df61e5 Update man pages 2015-06-27 10:58:25 +09:00
Tatsuhiro Tsujikawa
078337de3c Bump up version number to 1.0.5, LT revision to 14:5:0 2015-06-27 10:55:54 +09:00
Tatsuhiro Tsujikawa
9e82687cbe Fix compile error with --enable-werror 2015-06-26 23:21:01 +09:00
Tatsuhiro Tsujikawa
660f90e13f Add switch STREAM_DEP_DEBUG to enable runtime validation of depedency tree 2015-06-26 23:02:18 +09:00
Tatsuhiro Tsujikawa
2eec42df39 Merge branch 'master' of https://github.com/tatsuhiro-t/nghttp2 2015-06-26 00:03:04 +09:00
Tatsuhiro Tsujikawa
34b92a30de Merge pull request #268 from Andersbakken/typo
Fix typo
2015-06-26 00:02:46 +09:00
Tatsuhiro Tsujikawa
bab99af565 Fix unusual control flow in stream_update_dep_set_rest 2015-06-25 22:31:15 +09:00
Anders Bakken
2e8e38ec35 Fix typo 2015-06-24 13:56:50 -07:00
Tatsuhiro Tsujikawa
d6ca95a0c9 Fix sibling's item is not queued when ancestor's item is detached 2015-06-24 22:18:07 +09:00
Tatsuhiro Tsujikawa
285c74c394 nghttpx: Fix crash with --http2-bridge and both frontend and backend TLS 2015-06-24 21:31:17 +09:00
Tatsuhiro Tsujikawa
7780c07838 Bump up version number to 1.0.5-DEV 2015-06-23 23:25:22 +09:00
Tatsuhiro Tsujikawa
5a8d5e5dd9 Update man pages 2015-06-23 23:22:35 +09:00
Tatsuhiro Tsujikawa
9bcb0ffdef Bump up version number to 1.0.4, LT revision to 14:4:0 2015-06-23 23:20:13 +09:00
Tatsuhiro Tsujikawa
1945d0f02a Fix assertion failure in nghttp2_stream.c
This is regression introduced in
46b70c1db8.
2015-06-23 23:04:53 +09:00
Tatsuhiro Tsujikawa
4870edb33d Bump up version number to 1.0.4-DEV 2015-06-23 01:02:48 +09:00
Tatsuhiro Tsujikawa
3abb162969 Update man pages 2015-06-23 00:54:09 +09:00
Tatsuhiro Tsujikawa
4242478f39 Update nghttpx man page template 2015-06-23 00:53:51 +09:00
Tatsuhiro Tsujikawa
4fa2ffe292 Dump up version number to 1.0.3, LT revision to 14:3:0 2015-06-23 00:48:23 +09:00
Tatsuhiro Tsujikawa
301df2a856 src: Disable SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 2015-06-22 23:26:45 +09:00
Tatsuhiro Tsujikawa
f3b7f4140b nghttpx: Clarify origin host for --backend-http1-connection-per-host 2015-06-22 21:09:39 +09:00
Tatsuhiro Tsujikawa
878b873c69 src: Use using instead of typedef 2015-06-21 19:37:50 +09:00
Tatsuhiro Tsujikawa
2ca8cf36b7 util: Use constexpr for ALPN id 2015-06-21 19:34:43 +09:00
Tatsuhiro Tsujikawa
2224b98c9c Remove duplicated dependency validation in nghttp2_session_reprioritize_stream 2015-06-21 16:31:30 +09:00
Tatsuhiro Tsujikawa
a7031da364 Fix bug that idle self-depending PRIORITY is not handled gracefully
Previously, we did not handle PRIORITY frame which depends on itself
and for idle stream.  As a result, nghttp2_session_mem_recv (or
nghttp2_session_recv) returne NGHTTP2_ERR_NOMEM.  The error code was
still misleading.  It was not out of memory, and we failed to insert
hash map because of duplicated key, which was treated as out of
memory.  This commit fixes this issue, by explicitly checking
dependency for incoming PRIORITY for all cases.
2015-06-21 16:02:32 +09:00
Tatsuhiro Tsujikawa
cebfdacc5a src: Use user-defined literals for time (hours and minutes) 2015-06-21 14:51:32 +09:00
Tatsuhiro Tsujikawa
39f89f4a60 src: Use user-defined literals for k, m, and g. 2015-06-21 14:32:47 +09:00
Tatsuhiro Tsujikawa
46b70c1db8 Optimize dependency based priority code to Firefox style tree
While this commit optimizes dependency routine to Firefox style tree,
the other use cases (e.g., linear chain) are also improved
dramatically as well.
2015-06-20 22:11:24 +09:00
Tatsuhiro Tsujikawa
5537503172 Merge branch 'jfcalcerrada-patch-1' 2015-06-20 19:42:09 +09:00
José F. Calcerrada
81cc550eb9 Update README.rst
Typo
2015-06-20 11:02:33 +01:00
Tatsuhiro Tsujikawa
0a6de0d378 nghttp: Perform special handling of IPv6 literal with zone ID as per RFC 6874
This commit adds special handling of IPv6 literal with zone ID as per
RFC 6874.  Still IPv6 link local address does not work, since URI
parser from http-parser does not allow this syntax.
2015-06-18 20:00:02 +09:00
Tatsuhiro Tsujikawa
25d1de0278 nghttp: Print error if all connect() syscall faild 2015-06-18 18:03:25 +09:00
Tatsuhiro Tsujikawa
39eb8b8a6b nghttp: Print error when parsing URI failed 2015-06-18 18:00:24 +09:00
Tatsuhiro Tsujikawa
c050fca177 Merge branch 'vapier-master' 2015-06-18 17:55:50 +09:00
Mike Frysinger
19309823aa enable third-party for asio_lib too
Since this library uses the third-party subdir, make sure we auto-enable
it when that lib is turned on.
2015-06-17 13:29:37 -04:00
Tatsuhiro Tsujikawa
90bcdb0dda Merge branch 'libressl' 2015-06-17 18:27:54 +09:00
Tatsuhiro Tsujikawa
17ec30e45c Mention LibreSSL in README.rst 2015-06-17 18:27:27 +09:00
Tatsuhiro Tsujikawa
07f763be49 fetch-ocsp-response: Support LibreSSL, and include port in ocsp_host 2015-06-17 18:24:57 +09:00
Tatsuhiro Tsujikawa
69119f47c4 src: Support compile with LibreSSL 2015-06-17 18:24:51 +09:00
Tatsuhiro Tsujikawa
b0b792e735 integration: Add tests for x-forwarded-proto header field 2015-06-16 21:31:47 +09:00
Tatsuhiro Tsujikawa
8aab74ad36 nghttpx: Refactor a bit 2015-06-16 21:31:33 +09:00
Tatsuhiro Tsujikawa
f418d1239f nghttpx: Fix bug that XFP header always http on HTTP/2 backend
This commit fixes the bug that x-forwarded-proto header field sent on
HTTP/2 backend always "http", regardless of frontend scheme.
2015-06-16 21:29:47 +09:00
Tatsuhiro Tsujikawa
5b51320dc5 nghttpx: Validate :path on SPDY frontend
Unless method is CONNECT, we require that :path starts with "/",
except for OPTIONS method, which can take "*" as :path (server-wide
OPTIONS request).
2015-06-16 00:09:22 +09:00
Tatsuhiro Tsujikawa
d2e81da9e2 Bump up version number to 1.0.3-DEV 2015-06-12 22:58:14 +09:00
Tatsuhiro Tsujikawa
a61054e1f7 Update bash_completion 2015-06-12 22:38:32 +09:00
Tatsuhiro Tsujikawa
749f5d6a32 Update man pages 2015-06-12 22:38:19 +09:00
Tatsuhiro Tsujikawa
f09bd821ac Bump up version number to 1.0.2, LT revision to 14:2:0 2015-06-12 22:35:29 +09:00
Tatsuhiro Tsujikawa
6d5c00b8eb nghttpx: Use vector for WorkerEvent queue 2015-06-12 21:28:24 +09:00
Tatsuhiro Tsujikawa
532bffdb01 nghttpx: Minimize critical section for shared ocsp response 2015-06-12 21:27:12 +09:00
Tatsuhiro Tsujikawa
c6c7145167 Fix compile warning with android NDK 2015-06-12 19:19:53 +09:00
Tatsuhiro Tsujikawa
b5717cd288 Fix bug that data are not consumed for connection in race condition
When we know that stream is closed at time we read DATA frame header,
we use NGHTTP2_IB_IGN_DATA, and consume data for connection if
nghttp2_option_set_no_auto_window_update() is used.  However, if
stream is closed while we are in NGHTTP2_IB_READ_DATA, those bytes are
not consumed for connection, nor notified to application via callback,
so it eventually fills up connection window and connection will
freeze.  This commit fixes this issue by consuming these data for
connection when stream is closed or does not exist.
2015-06-11 23:34:30 +09:00
Tatsuhiro Tsujikawa
d4d7597efb nghttpx: Delete SSL_CTX on quit 2015-06-10 21:31:58 +09:00
Tatsuhiro Tsujikawa
2952706b53 Fix scan-build error 2015-06-10 00:29:03 +09:00
Tatsuhiro Tsujikawa
9b0ccdef34 h2load: Code cleanup 2015-06-10 00:28:27 +09:00
Tatsuhiro Tsujikawa
41dd5f6897 nghttpx: Tokenize request method
We share the same method value with http-parser.  This commit also
returns 501 for unknown request method on HTTP/2 and SPDY frontend.
2015-06-09 23:33:14 +09:00
Tatsuhiro Tsujikawa
f9c60d5e9d nghttpx: Return 501 if invalid method is received on h1 frontend 2015-06-09 22:08:49 +09:00
Tatsuhiro Tsujikawa
c2ca04c1db python: Call on_close callback when connection is lost for server session 2015-06-07 16:17:48 +09:00
Tatsuhiro Tsujikawa
5fbb99e3d0 Check python without python bindings to get PYTHON variable
We use PYTHON variable to execute Python script, mainly to generate
documents.  Therefore it is better to always check python interpreter
even if we don't request python bindings
2015-06-07 13:14:31 +09:00
Tatsuhiro Tsujikawa
ba34313f9f mkapiref.py: Ensure better 2 and 3 support 2015-06-07 13:13:51 +09:00
Tatsuhiro Tsujikawa
aa6699435a make_bash_completion.py: Support Python 3.4 2015-06-07 13:01:02 +09:00
Tatsuhiro Tsujikawa
e857e99df8 help2rst.py: Support Python 3.4 2015-06-07 12:55:22 +09:00
Tatsuhiro Tsujikawa
6d537c419e nghttpx: Document failure case on bind() 2015-06-07 00:05:33 +09:00
Tatsuhiro Tsujikawa
4894e24dc8 nghttpx: Add error logging for listener socket creation failure 2015-06-07 00:02:30 +09:00
Tatsuhiro Tsujikawa
bbbddedb8f Fix compiler warning 2015-06-06 23:37:46 +09:00
Tatsuhiro Tsujikawa
163dfb3150 Fix make distcheck failure 2015-06-06 23:37:31 +09:00
Tatsuhiro Tsujikawa
4f3d20e024 Include script/README.rst in dist 2015-06-06 23:32:32 +09:00
Tatsuhiro Tsujikawa
b7ba1baf48 Translate fetch-ocsp-response into Python 2015-06-06 23:18:32 +09:00
Tatsuhiro Tsujikawa
00efa86fb6 nghttpx: Add --add-request-header option 2015-06-05 23:04:20 +09:00
Tatsuhiro Tsujikawa
43b3640836 Slight code cleanup 2015-06-05 22:06:49 +09:00
Tatsuhiro Tsujikawa
708eb2a217 Increase maximum number of streams in one dep tree including idle nodes 2015-06-05 22:06:14 +09:00
Tatsuhiro Tsujikawa
590a5c3ff3 Fix typo 2015-06-05 00:18:29 +09:00
Tatsuhiro Tsujikawa
28b528dc9e Merge branch 'vapier-master' 2015-06-04 23:45:49 +09:00
Mike Frysinger
a50f6e5d50 configure: fix bashism
The == operator is not in POSIX; use = like normal.

Reported-by: Mikael Magnusson <mikachu@gmail.com>
2015-06-04 00:10:00 -04:00
Tatsuhiro Tsujikawa
1534edd3f3 Update building android doc to include zlib build instruction 2015-06-01 23:14:38 +09:00
Tatsuhiro Tsujikawa
892c159d8f Remove unused clock_gettime and dlsym detection 2015-06-01 23:05:42 +09:00
Tatsuhiro Tsujikawa
0cb4750e3c libevent-client: Fix bug that path is broken if URI does not contain path part 2015-06-01 00:22:35 +09:00
Tatsuhiro Tsujikawa
ee4d53a9e4 More constexpr 2015-05-31 18:44:37 +09:00
Tatsuhiro Tsujikawa
ad150c3ab1 Merge branch 'fwiesel-client_certificate' 2015-05-31 18:28:16 +09:00
Fabian Wiesel
7eafebfeb9 Expose client certificate, if available
Client certificates can use used for authentication/authorization in the server,
so expose them similar to the remote address.
2015-05-31 10:55:10 +02:00
Tatsuhiro Tsujikawa
3d59c6c0b7 nghttpx: Use defined string iteral when defining long_options 2015-05-29 22:48:46 +09:00
Tatsuhiro Tsujikawa
34efc6b7a4 More constexpr 2015-05-29 22:36:05 +09:00
Tatsuhiro Tsujikawa
7582640fd5 nghttpx: Remove unused 2015-05-29 22:20:46 +09:00
Tatsuhiro Tsujikawa
ad265aa9d0 Build third-party if either examples or apps is enabled 2015-05-28 22:55:47 +09:00
Tatsuhiro Tsujikawa
1f7e6ea3fe Define NGHTTP2_EXTERN to __declspec(dllimport) when using nghttp2
The private global variable nghttp2_enable_strict_preface is also
marked as NGHTTP2_EXTERN, but it is test purpose only (test with
.dll), and not part of public API.  It could be removed in the future
release.
2015-05-28 22:36:43 +09:00
Tatsuhiro Tsujikawa
a0a5f4f93e tests: Break if all compressed header input processed in nghttp2_buf 2015-05-27 00:33:24 +09:00
Tatsuhiro Tsujikawa
59e6272ba4 integration: Add WebSocket upgrade test 2015-05-26 23:28:45 +09:00
Tatsuhiro Tsujikawa
323fc8c552 nghttpx: Make WebSocket upgrade work
This commit makes sure that WebSocket upgrade works for HTTP/1.1
frontend and backend pair.  Actually, this implementation probably
supports other upgrade as well, other than HTTP/2 Upgrade, which is
handled specially in other place.
2015-05-26 22:26:17 +09:00
Tatsuhiro Tsujikawa
cbb10aa80f Merge branch 'fwiesel-python3.4-on-macos' 2015-05-26 00:48:42 +09:00
Fabian Wiesel
abe4c7c92a Catch and log failure to set TCP_NODELAY
Setting TCP_NODELAY may fail. Instead of failing the routine, log it and continue.
It seems, that setting TCP_NODELAY in python on Mac OS X is not necessarily supported.
2015-05-25 17:39:54 +02:00
Tatsuhiro Tsujikawa
326b4c467b nghttpx: Fix bug that END_STREAM is not set in backend for POST with Upgrade 2015-05-26 00:00:11 +09:00
Tatsuhiro Tsujikawa
7e51a87111 nghttpx: Don't upgrade to HTTP/2 if we have non-final HTTP/1 response pending 2015-05-25 23:59:44 +09:00
Tatsuhiro Tsujikawa
5fdb36239a nghttpx: Don't send Expect header field twice 2015-05-25 23:59:18 +09:00
Tatsuhiro Tsujikawa
9f99cad9ab Bump up version number to 1.0.2-DEV 2015-05-24 19:50:35 +09:00
656 changed files with 100314 additions and 35013 deletions

View File

@@ -1,57 +1,126 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AlwaysBreakTemplateDeclarations: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: false
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 2
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
IndentWidth: 2
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
BreakBeforeBraces: Attach
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
...

105
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,105 @@
name: build
on: push
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15]
compiler: [gcc, clang]
buildtool: [autotools, cmake]
steps:
- uses: actions/checkout@v2
- name: Linux setup
if: runner.os == 'Linux'
run: |
sudo apt-get install \
g++-8 \
clang-10 \
autoconf \
automake \
autotools-dev \
libtool \
pkg-config \
zlib1g-dev \
libcunit1-dev \
libssl-dev \
libxml2-dev \
libev-dev \
libevent-dev \
libjansson-dev \
libjemalloc-dev \
libc-ares-dev \
cmake \
cmake-data
echo 'CPPFLAGS=-fsanitize=address,undefined -fno-sanitize-recover=undefined -g' >> $GITHUB_ENV
echo 'LDFLAGS=-fsanitize=address,undefined -fno-sanitize-recover=undefined' >> $GITHUB_ENV
- name: MacOS setup
if: runner.os == 'macOS'
run: |
brew install \
libev \
libevent \
c-ares \
cunit \
libressl \
autoconf \
automake \
pkg-config \
libtool
echo 'PKG_CONFIG_PATH=/usr/local/opt/libressl/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig' >> $GITHUB_ENV
# This fixes infamous 'stdio.h not found' error.
echo 'SDKROOT='"$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
- name: Setup clang (Linux)
if: runner.os == 'Linux' && matrix.compiler == 'clang'
run: |
echo 'CC=clang-10' >> $GITHUB_ENV
echo 'CXX=clang++-10' >> $GITHUB_ENV
- name: Setup clang (MacOS)
if: runner.os == 'macOS' && matrix.compiler == 'clang'
run: |
echo 'CC=clang' >> $GITHUB_ENV
echo 'CXX=clang++' >> $GITHUB_ENV
- name: Setup gcc (Linux)
if: runner.os == 'Linux' && matrix.compiler == 'gcc'
run: |
echo 'CC=gcc-8' >> $GITHUB_ENV
echo 'CXX=g++-8' >> $GITHUB_ENV
- name: Setup gcc (MacOS)
if: runner.os == 'macOS' && matrix.compiler == 'gcc'
run: |
echo 'CC=gcc' >> $GITHUB_ENV
echo 'CXX=g++' >> $GITHUB_ENV
- name: Setup git submodules
run: |
git submodule update --init
- name: Configure autotools
if: matrix.buildtool == 'autotools'
run: |
autoreconf -i
./configure --enable-werror --with-mruby
- name: Configure cmake
if: matrix.buildtool == 'cmake'
run: |
cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DWITH_NEVERBLEED=1 -DCPPFLAGS="$CPPFLAGS" -DLDFLAGS="$LDFLAGS" .
- name: Build nghttp2 with autotools
if: matrix.buildtool == 'autotools'
run: |
make distcheck \
DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --enable-werror CPPFLAGS=\"$CPPFLAGS\" LDFLAGS=\"$LDFLAGS\""
- name: Build nghttp2 with cmake
if: matrix.buildtool == 'cmake'
run: |
make
make check
- name: Integration test
# Integration tests for nghttpx; autotools erases build
# artifacts.
if: matrix.buildtool == 'cmake'
run: |
cd integration-tests
make itprep it

23
.github/workflows/fuzz.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'nghttp2'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'nghttp2'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure()
with:
name: artifacts
path: ./out/artifacts

24
.gitignore vendored
View File

@@ -6,6 +6,7 @@
*.lo
*.m4
*.o
*.pyc
.deps/
.libs/
INSTALL
@@ -28,6 +29,29 @@ missing
stamp-h1
test-driver
# cmake
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
install_manifest.txt
CTestTestfile.cmake
build.ninja
rules.ninja
.ninja_deps
.ninja_log
lib*.so
lib*.so.*
lib*.a
# generated by "make test" with cmake
Testing/
# test logs generated by `make check`
*.log
*.trs
lib/MSVC_obj/
_VC_ROOT/
.depend.MSVC
*.pyd
*.egg-info/
python/nghttp2.c

7
.gitmodules vendored Normal file
View File

@@ -0,0 +1,7 @@
[submodule "third-party/mruby"]
path = third-party/mruby
url = https://github.com/mruby/mruby
[submodule "third-party/neverbleed"]
path = third-party/neverbleed
url = https://github.com/tatsuhiro-t/neverbleed.git
branch = openssl111fix

View File

@@ -1,15 +1,27 @@
language: cpp
dist: xenial
os:
- linux
compiler:
- clang
- gcc
sudo: false
env:
matrix:
- CI_BUILD=cmake
- CI_BUILD=autotools
matrix:
include:
- os: osx
compiler: clang
osx_image: xcode10.2
env: CI_BUILD=autotools
language: cpp
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- libstdc++-4.9-dev
- g++-8
- autoconf
- automake
- autotools-dev
@@ -23,15 +35,55 @@ addons:
- libevent-dev
- libjansson-dev
- libjemalloc-dev
- libc-ares-dev
- cmake
- cmake-data
homebrew:
packages:
- libev
- libevent
- c-ares
- cunit
- libressl
before_install:
- $CC --version
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
- $CC --version
- go version
- cmake --version
before_script:
- autoreconf -i
- automake
- autoconf
- ./configure --enable-werror
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address -fuse-ld=gold"
fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
PKG_CONFIG_PATH="/usr/local/opt/libressl/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig"
fi
# Now build nghttp2
- git submodule update --init
- |
if [ "$CI_BUILD" = "autotools" ]; then
autoreconf -i && ./configure --with-mruby PKG_CONFIG_PATH=$PKG_CONFIG_PATH
fi
- |
if [ "$CI_BUILD" = "cmake" ]; then
cmake -DENABLE_WERROR=1 -DWITH_MRUBY=1 -DWITH_NEVERBLEED=1
fi
script:
- make
- make check
- |
if [ "$CI_BUILD" = "autotools" ]; then
make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-mruby --with-neverbleed --enable-werror CPPFLAGS=$CPPFLAGS LDFLAGS=\"$LDFLAGS\" PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
fi
- |
if [ "$CI_BUILD" = "cmake" ]; then
make && make check
fi
- |
if [ "$CI_BUILD" = "cmake" ]; then
# Integration tests for nghttpx; autotools build erases build
# for packaging test.
cd integration-tests
export GO111MODULE=on
make it
fi

136
AUTHORS
View File

@@ -1 +1,135 @@
Tatsuhiro Tsujikawa <t-tujikawa at users dot sourceforge dot net>
nghttp2 project was started as a fork of spdylay project [1]. Both
projects were started by Tatsuhiro Tsujikawa, who is still the main
author of these projects. Meanwhile, we have many contributions, and
we are not here without them. We sincerely thank you to all who made
a contribution. Here is the all individuals/organizations who
contributed to nghttp2 and spdylay project at which we forked. These
names are retrieved from git commit log. If you have made a
contribution, but you are missing in the list, please let us know via
github issues [2].
[1] https://github.com/tatsuhiro-t/spdylay
[2] https://github.com/nghttp2/nghttp2/issues
--------
187j3x1
Adam Gołębiowski
Alek Storm
Alex Nalivko
Alexandros Konstantinakis-Karmis
Alexis La Goutte
Amir Pakdel
Anders Bakken
Andreas Pohl
Andrew Penkrat
Andy Davies
Angus Gratton
Anna Henningsen
Ant Bryan
Asra Ali
Benedikt Christoph Wolters
Benjamin Peterson
Bernard Spil
Brendan Heinonen
Brian Card
Brian Suh
Daniel Evers
Daniel Stenberg
Dave Reisner
David Beitey
David Weekly
Dmitriy Vetutnev
Don
Dylan Plecki
Etienne Cimon
Fabian Möller
Fabian Wiesel
Gabi Davar
Gaël PORTAY
Geoff Hill
Gitai
Google Inc.
Jacky Tian
Jacob Champion
James M Snell
Jan Kundrát
Jan-E
Janusz Dziemidowicz
Jay Satiro
Jeff 'Raid' Baitis
Jianqing Wang
Jim Morrison
Josh Braegger
José F. Calcerrada
Kamil Dudka
Kazuho Oku
Kenny (kang-yen) Peng
Kenny Peng
Kit Chan
Kyle Schomp
LazyHamster
Leo Neat
Lorenz Nickel
Lucas Pardue
MATSUMOTO Ryosuke
Marc Bachmann
Matt Rudary
Matt Way
Mike Conlen
Mike Frysinger
Mike Lothian
Nicholas Hurley
Nora Shoemaker
Pedro Santos
Peeyush Aggarwal
Peter Wu
Piotr Sikora
Raul Gutierrez Segales
Remo E
Reza Tavakoli
Richard Wolfert
Rick Lei
Ross Smith II
Scott Mitchell
Sebastiaan Deckers
Simon Frankenberger
Simone Basso
Soham Sinha
Stefan Eissing
Stephen Ludin
Sunpoet Po-Chuan Hsieh
Svante Signell
Syohei YOSHIDA
Tapanito
Tatsuhiko Kubo
Tatsuhiro Tsujikawa
Tobias Geerinckx-Rice
Tom Harwood
Tomas Krizek
Tomasz Buchert
Tomasz Torcz
Vernon Tang
Viacheslav Biriukov
Viktor Szakats
Viktor Szépe
Wenfeng Liu
William A Rowe Jr
Xiaoguang Sun
Zhuoyun Wei
acesso
ayanamist
bxshi
clemahieu
dalf
dawg
es
fangdingjun
jwchoi
kumagi
lstefani
makovich
mod-h2-dev
moparisthebest
snnn
yuuki-kodama

524
CMakeLists.txt Normal file
View File

@@ -0,0 +1,524 @@
# nghttp2 - HTTP/2 C Library
#
# Copyright (c) 2012, 2013, 2014, 2015 Tatsuhiro Tsujikawa
# Copyright (c) 2016 Peter Wu <peter@lekensteyn.nl>
#
# 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.
cmake_minimum_required(VERSION 3.0)
# XXX using 1.8.90 instead of 1.9.0-DEV
project(nghttp2 VERSION 1.43.0)
# See versioning rule:
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
set(LT_CURRENT 34)
set(LT_REVISION 1)
set(LT_AGE 20)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
include(Version)
math(EXPR LT_SOVERSION "${LT_CURRENT} - ${LT_AGE}")
set(LT_VERSION "${LT_SOVERSION}.${LT_AGE}.${LT_REVISION}")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
HexVersion(PACKAGE_VERSION_NUM ${PROJECT_VERSION_MAJOR} ${PROJECT_VERSION_MINOR} ${PROJECT_VERSION_PATCH})
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the build type" FORCE)
# Include "None" as option to disable any additional (optimization) flags,
# relying on just CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (which are empty by
# default). These strings are presented in cmake-gui.
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
include(GNUInstallDirs)
# For Python bindings and documentation
# (Must be called before PythonLibs for matching versions.)
find_package(PythonInterp)
# Auto-detection of features that can be toggled
find_package(OpenSSL 1.0.1)
find_package(Libev 4.11)
find_package(Libcares 1.7.5)
find_package(ZLIB 1.2.3)
if(OPENSSL_FOUND AND LIBEV_FOUND AND ZLIB_FOUND)
set(ENABLE_APP_DEFAULT ON)
else()
set(ENABLE_APP_DEFAULT OFF)
endif()
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)
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})
find_package(Jemalloc)
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))
# Remember when disabled options are disabled for later diagnostics.
set(ENABLE_LIB_ONLY_DISABLED_OTHERS 1)
else()
set(ENABLE_LIB_ONLY_DISABLED_OTHERS 0)
endif()
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.
foreach(_build_type "Release" "MinSizeRel" "RelWithDebInfo")
foreach(_lang C CXX)
string(TOUPPER "CMAKE_${_lang}_FLAGS_${_build_type}" _var)
string(REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " " ${_var} "${${_var}}")
endforeach()
endforeach()
if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(HINT_NORETURN "__attribute__((noreturn))")
else()
set(HINT_NORETURN)
endif()
include(ExtractValidFlags)
foreach(_cxx1x_flag -std=c++14)
extract_valid_cxx_flags(_cxx1x_flag_supported ${_cxx1x_flag})
if(_cxx1x_flag_supported)
set(CXX1XCXXFLAGS ${_cxx1x_flag})
break()
endif()
endforeach()
include(CMakePushCheckState)
include(CheckCXXSourceCompiles)
cmake_push_check_state()
set(CMAKE_REQUIRED_DEFINITIONS "${CXX1XCXXFLAGS}")
# Check that std::future is available.
check_cxx_source_compiles("
#include <vector>
#include <future>
int main() { std::vector<std::future<int>> v; }" HAVE_STD_FUTURE)
# Check that std::map::emplace is available for g++-4.7.
check_cxx_source_compiles("
#include <map>
int main() { std::map<int, int>().emplace(1, 2); }" HAVE_STD_MAP_EMPLACE)
cmake_pop_check_state()
# Checks for libraries.
# 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)
list(APPEND APP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
endif()
# XXX android and C++, is this still needed in cmake?
# case "$host" in
# *android*)
# android_build=yes
# # android does not need -pthread, but needs followng 3 libs for C++
# APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic -lsupc++"
# dl: openssl requires libdl when it is statically linked.
# XXX shouldn't ${CMAKE_DL_LIBS} be appended to OPENSSL_LIBRARIES instead of
# APP_LIBRARIES if it is really specific to OpenSSL?
find_package(CUnit 2.1)
enable_testing()
set(HAVE_CUNIT ${CUNIT_FOUND})
if(HAVE_CUNIT)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
endif()
# openssl (for src)
set(HAVE_OPENSSL ${OPENSSL_FOUND})
if(OPENSSL_FOUND)
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
else()
set(OPENSSL_INCLUDE_DIRS "")
set(OPENSSL_LIBRARIES "")
endif()
# libev (for src)
set(HAVE_LIBEV ${LIBEV_FOUND})
set(HAVE_ZLIB ${ZLIB_FOUND})
set(HAVE_SYSTEMD ${SYSTEMD_FOUND})
set(HAVE_LIBEVENT_OPENSSL ${LIBEVENT_FOUND})
if(LIBEVENT_FOUND)
# Must both link the core and openssl libraries.
set(LIBEVENT_OPENSSL_LIBRARIES ${LIBEVENT_LIBRARIES})
endif()
# libc-ares (for src)
set(HAVE_LIBCARES ${LIBCARES_FOUND})
if(LIBCARES_FOUND)
set(LIBCARES_INCLUDE_DIRS ${LIBCARES_INCLUDE_DIR})
else()
set(LIBCARES_INCLUDE_DIRS "")
set(LIBCARES_LIBRARIES "")
endif()
# jansson (for src/nghttp, src/deflatehd and src/inflatehd)
set(HAVE_JANSSON ${JANSSON_FOUND})
# libxml2 (for src/nghttp)
set(HAVE_LIBXML2 ${LIBXML2_FOUND})
if(LIBXML2_FOUND)
set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR})
else()
set(LIBXML2_INCLUDE_DIRS "")
set(LIBXML2_LIBRARIES "")
endif()
# jemalloc
set(HAVE_JEMALLOC ${JEMALLOC_FOUND})
if(ENABLE_ASIO_LIB)
find_package(Boost 1.54.0 REQUIRED system thread)
endif()
# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL and libev
if(ENABLE_APP AND NOT (ZLIB_FOUND AND OPENSSL_FOUND AND LIBEV_FOUND))
message(FATAL_ERROR "Applications were requested (ENABLE_APP=1) but dependencies are not met.")
endif()
# HPACK tools requires jansson
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
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)
set(ENABLE_THIRD_PARTY 1)
# mruby (for src/nghttpx)
set(HAVE_MRUBY ${WITH_MRUBY})
set(HAVE_NEVERBLEED ${WITH_NEVERBLEED})
else()
set(HAVE_MRUBY 0)
set(HAVE_NEVERBLEED 0)
endif()
# Checks for header files.
include(CheckIncludeFile)
check_include_file("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("limits.h" HAVE_LIMITS_H)
check_include_file("netdb.h" HAVE_NETDB_H)
check_include_file("netinet/in.h" HAVE_NETINET_IN_H)
check_include_file("pwd.h" HAVE_PWD_H)
check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H)
check_include_file("sys/time.h" HAVE_SYS_TIME_H)
check_include_file("syslog.h" HAVE_SYSLOG_H)
check_include_file("time.h" HAVE_TIME_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
include(CheckTypeSize)
# Checks for typedefs, structures, and compiler characteristics.
# AC_TYPE_SIZE_T
check_type_size("ssize_t" SIZEOF_SSIZE_T)
if(SIZEOF_SSIZE_T STREQUAL "")
# ssize_t is a signed type in POSIX storing at least -1.
# Set it to "int" to match the behavior of AC_TYPE_SSIZE_T (autotools).
set(ssize_t int)
endif()
# AC_TYPE_UINT8_T
# AC_TYPE_UINT16_T
# AC_TYPE_UINT32_T
# AC_TYPE_UINT64_T
# AC_TYPE_INT8_T
# AC_TYPE_INT16_T
# AC_TYPE_INT32_T
# AC_TYPE_INT64_T
# AC_TYPE_OFF_T
# AC_TYPE_PID_T
# AC_TYPE_UID_T
# XXX To support inline for crappy compilers, see https://cmake.org/Wiki/CMakeTestInline
# AC_C_INLINE
# XXX is AC_SYS_LARGEFILE still needed for modern systems?
# add_definitions(-D_FILE_OFFSET_BITS=64)
include(CheckStructHasMember)
check_struct_has_member("struct tm" tm_gmtoff time.h HAVE_STRUCT_TM_TM_GMTOFF)
# Check size of pointer to decide we need 8 bytes alignment adjustment.
check_type_size("int *" SIZEOF_INT_P)
check_type_size("time_t" SIZEOF_TIME_T)
# Checks for library functions.
include(CheckFunctionExists)
check_function_exists(_Exit HAVE__EXIT)
check_function_exists(accept4 HAVE_ACCEPT4)
check_function_exists(mkostemp HAVE_MKOSTEMP)
include(CheckSymbolExists)
# XXX does this correctly detect initgroups (un)availability on cygwin?
check_symbol_exists(initgroups grp.h HAVE_DECL_INITGROUPS)
if(NOT HAVE_DECL_INITGROUPS AND HAVE_UNISTD_H)
# FreeBSD declares initgroups() in unistd.h
check_symbol_exists(initgroups unistd.h HAVE_DECL_INITGROUPS2)
if(HAVE_DECL_INITGROUPS2)
set(HAVE_DECL_INITGROUPS 1)
endif()
endif()
set(WARNCFLAGS)
set(WARNCXXFLAGS)
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
if(ENABLE_WERROR)
set(WARNCFLAGS /WX)
set(WARNCXXFLAGS /WX)
endif()
else()
if(ENABLE_WERROR)
extract_valid_c_flags(WARNCFLAGS -Werror)
extract_valid_c_flags(WARNCXXFLAGS -Werror)
endif()
# For C compiler
extract_valid_c_flags(WARNCFLAGS
-Wall
-Wextra
-Wmissing-prototypes
-Wstrict-prototypes
-Wmissing-declarations
-Wpointer-arith
-Wdeclaration-after-statement
-Wformat-security
-Wwrite-strings
-Wshadow
-Winline
-Wnested-externs
-Wfloat-equal
-Wundef
-Wendif-labels
-Wempty-body
-Wcast-align
-Wclobbered
-Wvla
-Wpragmas
-Wunreachable-code
-Waddress
-Wattributes
-Wdiv-by-zero
-Wshorten-64-to-32
-Wconversion
-Wextended-offsetof
-Wformat-nonliteral
-Wlanguage-extension-token
-Wmissing-field-initializers
-Wmissing-noreturn
-Wmissing-variable-declarations
# Not used because we cannot change public structs
# -Wpadded
-Wsign-conversion
# Not used because this basically disallows default case
# -Wswitch-enum
-Wunreachable-code-break
-Wunused-macros
-Wunused-parameter
-Wredundant-decls
# Only work with Clang for the moment
-Wheader-guard
# This is required because we pass format string as "const char*.
-Wno-format-nonliteral
)
extract_valid_cxx_flags(WARNCXXFLAGS
# For C++ compiler
-Wall
-Wformat-security
)
endif()
if(ENABLE_STATIC_CRT)
foreach(lang C CXX)
foreach(suffix "" _DEBUG _MINSIZEREL _RELEASE _RELWITHDEBINFO)
set(var "CMAKE_${lang}_FLAGS${suffix}")
string(REPLACE "/MD" "/MT" ${var} "${${var}}")
endforeach()
endforeach()
endif()
if(ENABLE_DEBUG)
set(DEBUGBUILD 1)
endif()
# Some platform does not have working std::future. We disable
# threading for those platforms.
if(NOT ENABLE_THREADS OR NOT HAVE_STD_FUTURE)
set(NOTHREADS 1)
endif()
add_definitions(-DHAVE_CONFIG_H)
configure_file(cmakeconfig.h.in config.h)
# autotools-compatible names
# Sphinx expects relative paths in the .rst files. Use the fact that the files
# below are all one directory level deep.
file(RELATIVE_PATH top_srcdir "${CMAKE_CURRENT_BINARY_DIR}/dir" "${CMAKE_CURRENT_SOURCE_DIR}")
file(RELATIVE_PATH top_builddir "${CMAKE_CURRENT_BINARY_DIR}/dir" "${CMAKE_CURRENT_BINARY_DIR}")
set(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
set(abs_top_builddir "${CMAKE_CURRENT_BINARY_DIR}")
# libnghttp2.pc (pkg-config file)
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
set(VERSION "${PACKAGE_VERSION}")
# For init scripts and systemd service file (in contrib/)
set(bindir "${CMAKE_INSTALL_FULL_BINDIR}")
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
doc/index.rst
doc/package_README.rst
doc/tutorial-client.rst
doc/tutorial-server.rst
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)
endforeach()
include_directories(
"${CMAKE_CURRENT_BINARY_DIR}" # for config.h
)
# For use in src/CMakeLists.txt
set(PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${CMAKE_PROJECT_NAME}")
install(FILES README.rst DESTINATION "${CMAKE_INSTALL_DOCDIR}")
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)
add_subdirectory(contrib)
add_subdirectory(script)
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type)
message(STATUS "summary of build options:
Package version: ${VERSION}
Library version: ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}
Install prefix: ${CMAKE_INSTALL_PREFIX}
Target system: ${CMAKE_SYSTEM_NAME}
Compiler:
Build type: ${CMAKE_BUILD_TYPE}
C compiler: ${CMAKE_C_COMPILER}
CFLAGS: ${CMAKE_C_FLAGS_${_build_type}} ${CMAKE_C_FLAGS}
C++ compiler: ${CMAKE_CXX_COMPILER}
CXXFLAGS: ${CMAKE_CXX_FLAGS_${_build_type}} ${CMAKE_CXX_FLAGS}
WARNCFLAGS: ${WARNCFLAGS}
CXX1XCXXFLAGS: ${CXX1XCXXFLAGS}
Python:
Python: ${PYTHON_EXECUTABLE}
PYTHON_VERSION: ${PYTHON_VERSION_STRING}
Library version:${PYTHONLIBS_VERSION_STRING}
Cython: ${CYTHON_EXECUTABLE}
Test:
CUnit: ${HAVE_CUNIT} (LIBS='${CUNIT_LIBRARIES}')
Failmalloc: ${ENABLE_FAILMALLOC}
Libs:
OpenSSL: ${HAVE_OPENSSL} (LIBS='${OPENSSL_LIBRARIES}')
Libxml2: ${HAVE_LIBXML2} (LIBS='${LIBXML2_LIBRARIES}')
Libev: ${HAVE_LIBEV} (LIBS='${LIBEV_LIBRARIES}')
Libc-ares: ${HAVE_LIBCARES} (LIBS='${LIBCARES_LIBRARIES}')
Libevent(SSL): ${HAVE_LIBEVENT_OPENSSL} (LIBS='${LIBEVENT_OPENSSL_LIBRARIES}')
Jansson: ${HAVE_JANSSON} (LIBS='${JANSSON_LIBRARIES}')
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}
Neverbleed: ${HAVE_NEVERBLEED}
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}
")
if(ENABLE_LIB_ONLY_DISABLED_OTHERS)
message("Only the library will be built. To build other components "
"(such as applications and examples), set ENABLE_LIB_ONLY=OFF.")
endif()

30
CMakeOptions.txt Normal file
View File

@@ -0,0 +1,30 @@
# Features that can be enabled for cmake (see CMakeLists.txt)
option(ENABLE_WERROR "Turn on compile time warnings")
option(ENABLE_DEBUG "Turn on debug output")
option(ENABLE_THREADS "Turn on threading in apps" ON)
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_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(WITH_LIBXML2 "Use libxml2"
${WITH_LIBXML2_DEFAULT})
option(WITH_JEMALLOC "Use jemalloc"
${WITH_JEMALLOC_DEFAULT})
option(WITH_SPDYLAY "Use spdylay"
${WITH_SPDYLAY_DEFAULT})
option(WITH_MRUBY "Use mruby")
option(WITH_NEVERBLEED "Use neverbleed")
# vim: ft=cmake:

View File

@@ -1,6 +1,7 @@
The MIT License
Copyright (c) 2012, 2014, 2015 Tatsuhiro Tsujikawa
Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa
Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -10,39 +10,47 @@
#
# $ sudo docker run -v /path/to/dest:/out nghttp2-android cp /root/build/nghttp2/src/nghttpx /out
FROM ubuntu:vivid
# Only use standalone-toolchain for reduce size
FROM ubuntu:xenial
MAINTAINER Tatsuhiro Tsujikawa
ENV ANDROID_HOME /root/android
ENV PREFIX $ANDROID_HOME/usr/local
ENV ANDROID_HOME /root
ENV TOOLCHAIN $ANDROID_HOME/toolchain
ENV PATH $TOOLCHAIN/bin:$PATH
# It would be better to use nearest ubuntu archive mirror for faster
# downloads.
# RUN sed -ie 's/archive\.ubuntu/jp.archive.ubuntu/g' /etc/apt/sources.list
ENV NDK_VERSION r14b
RUN apt-get update
# genisoimage, libc6-i386 and lib32stdc++6 are required to decompress ndk.
RUN apt-get install -y make binutils autoconf automake autotools-dev libtool \
pkg-config git curl dpkg-dev libxml2-dev \
genisoimage libc6-i386 lib32stdc++6
WORKDIR /root
RUN apt-get update && \
apt-get install -y unzip make binutils autoconf \
automake autotools-dev libtool pkg-config git \
curl dpkg-dev libxml2-dev genisoimage libc6-i386 \
lib32stdc++6 python&& \
rm -rf /var/cache/apk/*
# Install toolchain
RUN curl -L -O https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip && \
unzip -q android-ndk-$NDK_VERSION-linux-x86_64.zip && \
rm android-ndk-$NDK_VERSION-linux-x86_64.zip && \
mkdir -p $ANDROID_HOME/toolchain && \
$ANDROID_HOME/android-ndk-$NDK_VERSION/build/tools/make-standalone-toolchain.sh \
--install-dir=$ANDROID_HOME/toolchain \
--toolchain=arm-linux-androideabi-4.9 \
--force && \
rm -r android-ndk-$NDK_VERSION
ENV PREFIX /root/usr/local
# Setup version of libraries
ENV OPENSSL_VERSION 1.0.2d
ENV SPDYLAY_VERSION v1.4.0
ENV LIBEV_VERSION 4.19
ENV ZLIB_VERSION 1.2.8
ENV CARES_VERSION 1.13.0
ENV NGHTTP2_VERSION v1.24.0
WORKDIR /root/build
RUN curl -L -O http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin && \
chmod a+x android-ndk-r10d-linux-x86_64.bin && \
./android-ndk-r10d-linux-x86_64.bin && \
rm android-ndk-r10d-linux-x86_64.bin
WORKDIR /root/build/android-ndk-r10d
RUN /bin/bash build/tools/make-standalone-toolchain.sh \
--install-dir=$ANDROID_HOME/toolchain \
--toolchain=arm-linux-androideabi-4.9 --llvm-version=3.5 \
--system=linux-x86_64
WORKDIR /root/build
RUN git clone https://github.com/tatsuhiro-t/spdylay
RUN git clone https://github.com/tatsuhiro-t/spdylay -b $SPDYLAY_VERSION --depth 1
WORKDIR /root/build/spdylay
RUN autoreconf -i && \
./configure \
@@ -59,22 +67,22 @@ RUN autoreconf -i && \
make install
WORKDIR /root/build
RUN curl -L -O https://www.openssl.org/source/openssl-1.0.2a.tar.gz && \
tar xf openssl-1.0.2a.tar.gz && \
rm openssl-1.0.2a.tar.gz
RUN curl -L -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz && \
tar xf openssl-$OPENSSL_VERSION.tar.gz && \
rm openssl-$OPENSSL_VERSION.tar.gz
WORKDIR /root/build/openssl-1.0.2a
WORKDIR /root/build/openssl-$OPENSSL_VERSION
RUN export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi- && \
./Configure --prefix=$PREFIX android && \
make && make install_sw
WORKDIR /root/build
RUN curl -L -O http://dist.schmorp.de/libev/libev-4.19.tar.gz && \
RUN curl -L -O http://dist.schmorp.de/libev/Attic/libev-$LIBEV_VERSION.tar.gz && \
curl -L -O https://gist.github.com/tatsuhiro-t/48c45f08950f587180ed/raw/80a8f003b5d1091eae497c5995bbaa68096e739b/libev-4.19-android.patch && \
tar xf libev-4.19.tar.gz && \
rm libev-4.19.tar.gz
tar xf libev-$LIBEV_VERSION.tar.gz && \
rm libev-$LIBEV_VERSION.tar.gz
WORKDIR /root/build/libev-4.19
WORKDIR /root/build/libev-$LIBEV_VERSION
RUN patch -p1 < ../libev-4.19-android.patch && \
./configure \
--host=arm-linux-androideabi \
@@ -87,11 +95,11 @@ RUN patch -p1 < ../libev-4.19-android.patch && \
make install
WORKDIR /root/build
RUN curl -L -O http://zlib.net/zlib-1.2.8.tar.gz && \
tar xf zlib-1.2.8.tar.gz && \
rm zlib-1.2.8.tar.gz
RUN curl -L -O https://downloads.sourceforge.net/project/libpng/zlib/$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz && \
tar xf zlib-$ZLIB_VERSION.tar.gz && \
rm zlib-$ZLIB_VERSION.tar.gz
WORKDIR /root/build/zlib-1.2.8
WORKDIR /root/build/zlib-$ZLIB_VERSION
RUN HOST=arm-linux-androideabi \
CC=$HOST-gcc \
AR=$HOST-ar \
@@ -105,11 +113,26 @@ RUN HOST=arm-linux-androideabi \
--static && \
make install
WORKDIR /root/build
RUN git clone https://github.com/tatsuhiro-t/nghttp2
RUN curl -L -O https://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz && \
tar xf c-ares-$CARES_VERSION.tar.gz && \
rm c-ares-$CARES_VERSION.tar.gz
WORKDIR /root/build/c-ares-$CARES_VERSION
RUN ./configure \
--host=arm-linux-androideabi \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--prefix=$PREFIX \
--disable-shared && \
make install
WORKDIR /root/build
RUN git clone https://github.com/nghttp2/nghttp2 -b $NGHTTP2_VERSION --depth 1
WORKDIR /root/build/nghttp2
RUN autoreconf -i && \
./configure \
--enable-app \
--disable-shared \
--host=arm-linux-androideabi \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
@@ -118,11 +141,10 @@ RUN autoreconf -i && \
--disable-python-bindings \
--disable-examples \
--disable-threads \
LIBSPDYLAY_CFLAGS=-I$PREFIX/usr/local/include \
LIBSPDYLAY_LIBS="-L$PREFIX/usr/local/lib -lspdylay" \
CPPFLAGS="-fPIE -I$PREFIX/include" \
CXXFLAGS="-fno-strict-aliasing" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
LDFLAGS="-fPIE -pie -L$PREFIX/lib" && \
CC="$TOOLCHAIN"/bin/arm-linux-androideabi-clang \
CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-clang++ \
CPPFLAGS="-fPIE -I$PREFIX/include" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
LDFLAGS="-fPIE -pie -L$PREFIX/lib" && \
make && \
arm-linux-androideabi-strip src/nghttpx src/nghttpd src/nghttp

1
LICENSE Normal file
View File

@@ -0,0 +1 @@
See COPYING

View File

@@ -21,14 +21,32 @@
# 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 examples python tests integration-tests \
doc contrib
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 \
Dockerfile.android
Dockerfile.android \
cmakeconfig.h.in \
CMakeLists.txt \
CMakeOptions.txt \
cmake/ExtractValidFlags.cmake \
cmake/FindJemalloc.cmake \
cmake/FindLibev.cmake \
cmake/FindCUnit.cmake \
cmake/Version.cmake \
cmake/FindCython.cmake \
cmake/FindLibevent.cmake \
cmake/FindJansson.cmake \
cmake/FindLibcares.cmake \
cmake/FindSystemd.cmake
.PHONY: clang-format

View File

@@ -4,10 +4,10 @@ nghttp2 - HTTP/2 C Library
This is an implementation of the Hypertext Transfer Protocol version 2
in C.
The framing layer of HTTP/2 is implemented as a reusable C
library. On top of that, we have implemented an HTTP/2 client, server
and proxy. We have also developed load test and benchmarking tools for
HTTP/2 and SPDY.
The framing layer of HTTP/2 is implemented as a reusable C library.
On top of that, we have implemented an HTTP/2 client, server and
proxy. We have also developed load test and benchmarking tools for
HTTP/2.
An HPACK encoder and decoder are available as a public API.
@@ -34,8 +34,8 @@ implementation.
* https://nghttp2.org/ (TLS + ALPN/NPN)
This endpoint supports ``h2``, ``h2-16``, ``h2-14``, ``spdy/3.1``
and ``http/1.1`` via ALPN/NPN and requires TLSv1.2 for HTTP/2
This endpoint supports ``h2``, ``h2-16``, ``h2-14``, and
``http/1.1`` via ALPN/NPN and requires TLSv1.2 for HTTP/2
connection.
* http://nghttp2.org/ (HTTP Upgrade and HTTP/2 Direct)
@@ -58,25 +58,33 @@ To build the documentation, you need to install:
* sphinx (http://sphinx-doc.org/)
To build and run the application programs (``nghttp``, ``nghttpd`` and
``nghttpx``) in the ``src`` directory, the following packages are
required:
If you need libnghttp2 (C library) only, then the above packages are
all you need. Use ``--enable-lib-only`` to ensure that only
libnghttp2 is built. This avoids potential build error related to
building bundled applications.
To build and run the application programs (``nghttp``, ``nghttpd``,
``nghttpx`` and ``h2load``) in the ``src`` directory, the following packages
are required:
* OpenSSL >= 1.0.1
* libev >= 4.15
* libev >= 4.11
* zlib >= 1.2.3
* libc-ares >= 1.7.5
ALPN support requires OpenSSL >= 1.0.2 (released 22 January 2015).
To enable the SPDY protocol in the application program ``nghttpx`` and
``h2load``, the following package is required:
* spdylay >= 1.3.2
LibreSSL >= 2.2.0 can be used instead of OpenSSL, but OpenSSL has more
features than LibreSSL at the time of this writing.
To enable ``-a`` option (getting linked assets from the downloaded
resource) in ``nghttp``, the following package is required:
* libxml2 >= 2.7.7
* libxml2 >= 2.6.26
To enable systemd support in nghttpx, the following package is
required:
* libsystemd-dev >= 209
The HPACK tools require the following package:
@@ -91,6 +99,11 @@ To mitigate heap fragmentation in long running server programs
* jemalloc
.. note::
Alpine Linux currently does not support malloc replacement
due to musl limitations. See details in issue `#762 <https://github.com/nghttp2/nghttp2/issues/762>`_.
libnghttp2_asio C++ library requires the following packages:
* libboost-dev >= 1.54.0
@@ -99,30 +112,48 @@ libnghttp2_asio C++ library requires the following packages:
The Python bindings require the following packages:
* cython >= 0.19
* python >= 2.7
* python >= 3.8
* python-setuptools
If you are using Ubuntu 14.04 LTS (trusty), run the following to install the needed packages::
If you are using Ubuntu 16.04 LTS (Xenial Xerus) or Debian 8 (jessie)
and above, run the following to install the required packages:
sudo apt-get install make binutils autoconf automake autotools-dev libtool pkg-config \
.. code-block:: text
sudo apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config \
zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \
libjemalloc-dev cython python3.4-dev
libc-ares-dev libjemalloc-dev libsystemd-dev \
cython python3-dev python-setuptools
spdylay is not packaged in Ubuntu, so you need to build it yourself:
http://tatsuhiro-t.github.io/spdylay/
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
mrgems, mruby is manged by git submodule under third-party/mruby
directory. Currently, mruby support for nghttpx is disabled by
default. To enable mruby support, use ``--with-mruby`` configure
option. Note that at the time of this writing, libmruby-dev and mruby
packages in Debian/Ubuntu are not usable for nghttp2, since they do
not enable C++ ABI. To build mruby, the following packages are
required:
Building from git
-----------------
* ruby
* bison
Building from git is easy, but please be sure that at least autoconf 2.68 is
used::
nghttpx supports `neverbleed <https://github.com/h2o/neverbleed>`_,
privilege separation engine for OpenSSL / LibreSSL. In short, it
minimizes the risk of private key leakage when serious bug like
Heartbleed is exploited. The neverbleed is disabled by default. To
enable it, use ``--with-neverbleed`` configure option.
$ autoreconf -i
$ automake
$ autoconf
$ ./configure
$ make
Compiling libnghttp2 C source code requires a C99 compiler. gcc 4.8
is known to be adequate. In order to compile the C++ source code, gcc
>= 6.0 or clang >= 6.0 is required. C++ source code requires C++14
language features.
To compile the source code, gcc >= 4.8.3 or clang >= 3.4 is required.
.. note::
To enable mruby support in nghttpx, and use ``--with-mruby``
configure option.
.. note::
@@ -131,6 +162,90 @@ To compile the source code, gcc >= 4.8.3 or clang >= 3.4 is required.
them from crashing. A patch is welcome to make multi threading work
on Mac OS X platform.
.. note::
To compile the associated applications (nghttp, nghttpd, nghttpx
and h2load), you must use the ``--enable-app`` configure option and
ensure that the specified requirements above are met. Normally,
configure script checks required dependencies to build these
applications, and enable ``--enable-app`` automatically, so you
don't have to use it explicitly. But if you found that
applications were not built, then using ``--enable-app`` may find
that cause, such as the missing dependency.
.. note::
In order to detect third party libraries, pkg-config is used
(however we don't use pkg-config for some libraries (e.g., libev)).
By default, pkg-config searches ``*.pc`` file in the standard
locations (e.g., /usr/lib/pkgconfig). If it is necessary to use
``*.pc`` file in the custom location, specify paths to
``PKG_CONFIG_PATH`` environment variable, and pass it to configure
script, like so:
.. code-block:: text
$ ./configure PKG_CONFIG_PATH=/path/to/pkgconfig
For pkg-config managed libraries, ``*_CFLAG`` and ``*_LIBS``
environment variables are defined (e.g., ``OPENSSL_CFLAGS``,
``OPENSSL_LIBS``). Specifying non-empty string to these variables
completely overrides pkg-config. In other words, if they are
specified, pkg-config is not used for detection, and user is
responsible to specify the correct values to these variables. For
complete list of these variables, run ``./configure -h``.
Building nghttp2 from release tar archive
-----------------------------------------
The nghttp2 project regularly releases tar archives which includes
nghttp2 source code, and generated build files. They can be
downloaded from `Releases
<https://github.com/nghttp2/nghttp2/releases>`_ page.
Building nghttp2 from git requires autotools development packages.
Building from tar archives does not require them, and thus it is much
easier. The usual build step is as follows:
.. code-block:: text
$ tar xf nghttp2-X.Y.Z.tar.bz2
$ cd nghttp2-X.Y.Z
$ ./configure
$ make
Building from git
-----------------
Building from git is easy, but please be sure that at least autoconf 2.68 is
used:
.. code-block:: text
$ git submodule update --init
$ autoreconf -i
$ automake
$ autoconf
$ ./configure
$ make
Notes for building on Windows (MSVC)
------------------------------------
The easiest way to build native Windows nghttp2 dll is use `cmake
<https://cmake.org/>`_. The free version of `Visual C++ Build Tools
<http://landinghub.visualstudio.com/visual-cpp-build-tools>`_ works
fine.
1. Install cmake for windows
2. Open "Visual C++ ... Native Build Tool Command Prompt", and inside
nghttp2 directly, run ``cmake``.
3. Then run ``cmake --build`` to build library.
4. nghttp2.dll, nghttp2.lib, nghttp2.exp are placed under lib directory.
Note that the above steps most likely produce nghttp2 library only.
No bundled applications are compiled.
Notes for building on Windows (Mingw/Cygwin)
--------------------------------------------
@@ -147,7 +262,9 @@ Secondly, you need to undefine the macro ``__STRICT_ANSI__``, if you
not, the functions ``fdopen``, ``fileno`` and ``strptime`` will not
available.
the sample command like this::
the sample command like this:
.. code-block:: text
$ export CFLAGS="-U__STRICT_ANSI__ -I$libev_PREFIX/include -L$libev_PREFIX/lib"
$ export CXXFLAGS=$CFLAGS
@@ -158,6 +275,18 @@ If you want to compile the applications under ``examples/``, you need
to remove or rename the ``event.h`` from libev's installation, because
it conflicts with libevent's installation.
Notes for installation on Linux systems
--------------------------------------------
After installing nghttp2 tool suite with ``make install`` one might experience a similar error:
.. code-block:: text
nghttpx: error while loading shared libraries: libnghttp2.so.14: cannot open shared object file: No such file or directory
This means that the tool is unable to locate the ``libnghttp2.so`` shared library.
To update the shared library cache run ``sudo ldconfig``.
Building the documentation
--------------------------
@@ -165,7 +294,9 @@ Building the documentation
Documentation is still incomplete.
To build the documentation, run::
To build the documentation, run:
.. code-block:: text
$ make html
@@ -188,27 +319,21 @@ We have the integration tests for the nghttpx proxy server. The tests are
written in the `Go programming language <http://golang.org/>`_ and uses
its testing framework. We depend on the following libraries:
* https://github.com/bradfitz/http2
* golang.org/x/net/http2
* golang.org/x/net/websocket
* https://github.com/tatsuhiro-t/go-nghttp2
* https://github.com/tatsuhiro-t/spdy
To download the above packages, after settings ``GOPATH``, run the
following command under ``integration-tests`` directory::
$ make itprep
Go modules will download these dependencies automatically.
To run the tests, run the following command under
``integration-tests`` directory::
``integration-tests`` directory:
.. code-block:: text
$ make it
Inside the tests, we use port 3009 to run the test subject server.
.. note::
github.com/tatsuhiro-t/spdy is a copy used to be available at
golang.org/x/net/spdy, but it is now gone.
Migration from v0.7.15 or earlier
---------------------------------
@@ -244,7 +369,7 @@ for this 24 bytes byte string and updated API.
``NGHTTP2_CLIENT_MAGIC_LEN``.
* ``NGHTTP2_BAD_PREFACE`` was renamed as ``NGHTTP2_BAD_CLIENT_MAGIC``
The alreay deprecated ``NGHTTP2_CLIENT_CONNECTION_HEADER`` and
The already deprecated ``NGHTTP2_CLIENT_CONNECTION_HEADER`` and
``NGHTTP2_CLIENT_CONNECTION_HEADER_LEN`` were removed.
If application uses these macros, just replace old ones with new ones.
@@ -319,7 +444,9 @@ nghttp - client
with prior knowledge, HTTP Upgrade and NPN/ALPN TLS extension.
It has verbose output mode for framing information. Here is sample
output from ``nghttp`` client::
output from ``nghttp`` client:
.. code-block:: text
$ nghttp -nv https://nghttp2.org
[ 0.190] Connected
@@ -402,7 +529,9 @@ output from ``nghttp`` client::
[ 0.228] send GOAWAY frame <length=8, flags=0x00, stream_id=0>
(last_stream_id=2, error_code=NO_ERROR(0x00), opaque_data(0)=[])
The HTTP Upgrade is performed like so::
The HTTP Upgrade is performed like so:
.. code-block:: text
$ nghttp -nvu http://nghttp2.org
[ 0.011] Connected
@@ -498,7 +627,9 @@ The HTTP Upgrade is performed like so::
(last_stream_id=2, error_code=NO_ERROR(0x00), opaque_data(0)=[])
Using the ``-s`` option, ``nghttp`` prints out some timing information for
requests, sorted by completion time::
requests, sorted by completion time:
.. code-block:: text
$ nghttp -nas https://nghttp2.org/
***** Statistics *****
@@ -542,7 +673,9 @@ HTTP/2 connections. No HTTP Upgrade is supported.
The ``-p`` option allows users to configure server push.
Just like ``nghttp``, it has a verbose output mode for framing
information. Here is sample output from ``nghttpd``::
information. Here is sample output from ``nghttpd``:
.. code-block:: text
$ nghttpd --no-tls -v 8080
IPv4: listen 0.0.0.0:8080
@@ -601,64 +734,71 @@ information. Here is sample output from ``nghttpd``::
nghttpx - proxy
+++++++++++++++
``nghttpx`` is a multi-threaded reverse proxy for HTTP/2, SPDY and
``nghttpx`` is a multi-threaded reverse proxy for HTTP/2, and
HTTP/1.1, and powers http://nghttp2.org and supports HTTP/2 server
push.
We reworked ``nghttpx`` command-line interface, and as a result, there
are several incompatibles from 1.8.0 or earlier. This is necessary to
extend its capability, and secure the further feature enhancements in
the future release. Please read `Migration from nghttpx v1.8.0 or
earlier
<https://nghttp2.org/documentation/nghttpx-howto.html#migration-from-nghttpx-v1-8-0-or-earlier>`_
to know how to migrate from earlier releases.
``nghttpx`` implements `important performance-oriented features
<https://istlsfastyet.com/#server-performance>`_ in TLS, such as
session IDs, session tickets (with automatic key rotation), OCSP
stapling, dynamic record sizing, ALPN/NPN, forward secrecy and SPDY &
HTTP/2.
stapling, dynamic record sizing, ALPN/NPN, forward secrecy and HTTP/2.
``nghttpx`` also offers the functionality to share session cache and
ticket keys among multiple ``nghttpx`` instances via memcached.
``nghttpx`` has several operational modes:
``nghttpx`` has 2 operation modes:
================== ============================ ============== =============
Mode option Frontend Backend Note
================== ============================ ============== =============
default mode HTTP/2, SPDY, HTTP/1.1 (TLS) HTTP/1.1 Reverse proxy
``--http2-proxy`` HTTP/2, SPDY, HTTP/1.1 (TLS) HTTP/1.1 SPDY proxy
``--http2-bridge`` HTTP/2, SPDY, HTTP/1.1 (TLS) HTTP/2 (TLS)
``--client`` HTTP/2, HTTP/1.1 HTTP/2 (TLS)
``--client-proxy`` HTTP/2, HTTP/1.1 HTTP/2 (TLS) Forward proxy
================== ============================ ============== =============
================== ================ ================ =============
Mode option Frontend Backend Note
================== ================ ================ =============
default mode HTTP/2, HTTP/1.1 HTTP/1.1, HTTP/2 Reverse proxy
``--http2-proxy`` HTTP/2, HTTP/1.1 HTTP/1.1, HTTP/2 Forward proxy
================== ================ ================ =============
The interesting mode at the moment is the default mode. It works like
a reverse proxy and listens for HTTP/2, SPDY and HTTP/1.1 and can be
a reverse proxy and listens for HTTP/2, and HTTP/1.1 and can be
deployed as a SSL/TLS terminator for existing web server.
The default mode, ``--http2-proxy`` and ``--http2-bridge`` modes use
SSL/TLS in the frontend connection by default. To disable SSL/TLS,
use the ``--frontend-no-tls`` option. If that option is used, SPDY is
disabled in the frontend and incoming HTTP/1.1 connections can be
upgraded to HTTP/2 through HTTP Upgrade.
The ``--http2-bridge``, ``--client`` and ``--client-proxy`` modes use
SSL/TLS in the backend connection by default. To disable SSL/TLS, use
the ``--backend-no-tls`` option.
In all modes, the frontend connections are encrypted by SSL/TLS by
default. To disable encryption, use the ``no-tls`` keyword in
``--frontend`` option. If encryption is disabled, incoming HTTP/1.1
connections can be upgraded to HTTP/2 through HTTP Upgrade. On the
other hard, backend connections are not encrypted by default. To
encrypt backend connections, use ``tls`` keyword in ``--backend``
option.
``nghttpx`` supports a configuration file. See the ``--conf`` option and
sample configuration file ``nghttpx.conf.sample``.
In the default mode, (without any of ``--http2-proxy``,
``--http2-bridge``, ``--client-proxy`` and ``--client`` options),
``nghttpx`` works as reverse proxy to the backend server::
In the default mode, ``nghttpx`` works as reverse proxy to the backend
server:
Client <-- (HTTP/2, SPDY, HTTP/1.1) --> nghttpx <-- (HTTP/1.1) --> Web Server
[reverse proxy]
.. code-block:: text
With the ``--http2-proxy`` option, it works as a so called secure proxy (aka
SPDY proxy)::
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1, HTTP/2) --> Web Server
[reverse proxy]
Client <-- (HTTP/2, SPDY, HTTP/1.1) --> nghttpx <-- (HTTP/1.1) --> Proxy
[secure proxy] (e.g., Squid, ATS)
With the ``--http2-proxy`` option, it works as forward proxy, and it
is so called secure HTTP/2 proxy:
.. code-block:: text
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1) --> Proxy
[secure proxy] (e.g., Squid, ATS)
The ``Client`` in the above example needs to be configured to use
``nghttpx`` as secure proxy.
At the time of this writing, Chrome is the only browser which supports
secure proxy. One way to configure Chrome to use a secure proxy is
to create a proxy.pac script like this:
At the time of this writing, both Chrome and Firefox support secure
HTTP/2 proxy. One way to configure Chrome to use a secure proxy is to
create a proxy.pac script like this:
.. code-block:: javascript
@@ -670,44 +810,20 @@ to create a proxy.pac script like this:
machine nghttpx is running on. Please note that Chrome requires a valid
certificate for secure proxy.
Then run Chrome with the following arguments::
Then run Chrome with the following arguments:
.. code-block:: text
$ google-chrome --proxy-pac-url=file:///path/to/proxy.pac --use-npn
With ``--http2-bridge``, it accepts HTTP/2, SPDY and HTTP/1.1
connections and communicates with the backend in HTTP/2::
Client <-- (HTTP/2, SPDY, HTTP/1.1) --> nghttpx <-- (HTTP/2) --> Web or HTTP/2 Proxy etc
(e.g., nghttpx -s)
With ``--client-proxy``, it works as a forward proxy and expects
that the backend is an HTTP/2 proxy::
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/2) --> HTTP/2 Proxy
[forward proxy] (e.g., nghttpx -s)
The ``Client`` needs to be configured to use nghttpx as a forward
proxy. The frontend HTTP/1.1 connection can be upgraded to HTTP/2
through HTTP Upgrade. With the above configuration, one can use
HTTP/1.1 client to access and test their HTTP/2 servers.
With ``--client``, it works as a reverse proxy and expects that
the backend is an HTTP/2 Web server::
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/2) --> Web Server
[reverse proxy]
The frontend HTTP/1.1 connection can be upgraded to HTTP/2
through HTTP Upgrade.
For the operation modes which talk to the backend in HTTP/2 over
SSL/TLS, the backend connections can be tunneled through an HTTP proxy.
The backend HTTP/2 connections can be tunneled through an HTTP proxy.
The proxy is specified using ``--backend-http-proxy-uri``. The
following figure illustrates the example of the ``--http2-bridge`` and
``--backend-http-proxy-uri`` options to talk to the outside HTTP/2
proxy through an HTTP proxy::
following figure illustrates how nghttpx talks to the outside HTTP/2
proxy through an HTTP proxy:
Client <-- (HTTP/2, SPDY, HTTP/1.1) --> nghttpx <-- (HTTP/2) --
.. code-block:: text
Client <-- (HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/2) --
--===================---> HTTP/2 Proxy
(HTTP proxy tunnel) (e.g., nghttpx -s)
@@ -715,11 +831,12 @@ proxy through an HTTP proxy::
Benchmarking tool
-----------------
The ``h2load`` program is a benchmarking tool for HTTP/2 and SPDY.
The SPDY support is enabled if the program was built with the spdylay
library. The UI of ``h2load`` is heavily inspired by ``weighttp``
The ``h2load`` program is a benchmarking tool for HTTP/2. The UI of
``h2load`` is heavily inspired by ``weighttp``
(https://github.com/lighttpd/weighttp). The typical usage is as
follows::
follows:
.. code-block:: text
$ h2load -n100000 -c100 -m100 https://localhost:8443/
starting benchmark...
@@ -807,7 +924,9 @@ Example:
With the ``-t`` option, the program can accept more familiar HTTP/1 style
header field blocks. Each header set is delimited by an empty line:
Example::
Example:
.. code-block:: text
:method: GET
:scheme: https
@@ -829,7 +948,7 @@ output_length
The length of the compressed header block.
percentage_of_original_size
``input_length`` / ``output_length`` * 100
``output_length`` / ``input_length`` * 100
wire
The compressed header block as a hex string.
@@ -1210,11 +1329,13 @@ are:
* Boost::Thread
The server API is designed to build an HTTP/2 server very easily to utilize
C++11 anonymous functions and closures. The bare minimum example of
C++14 anonymous functions and closures. The bare minimum example of
an HTTP/2 server looks like this:
.. code-block:: cpp
#include <iostream>
#include <nghttp2/asio_http2_server.h>
using namespace nghttp2::asio_http2;
@@ -1301,7 +1422,7 @@ The extension module is called ``nghttp2``.
determined by the ``configure`` script. If the detected Python version is not
what you expect, specify a path to Python executable in a ``PYTHON``
variable as an argument to configure script (e.g., ``./configure
PYTHON=/usr/bin/python3.4``).
PYTHON=/usr/bin/python3.8``).
The following example code illustrates basic usage of the HPACK compressor
and decompressor in Python:
@@ -1373,7 +1494,7 @@ BaseRequestHandler usage:
.. code-block:: python
#!/usr/bin/env python
#!/usr/bin/env python3
import io, ssl
import nghttp2
@@ -1430,3 +1551,32 @@ full real name when contributing!
See `Contribution Guidelines
<https://nghttp2.org/documentation/contribute.html>`_ for more
details.
Reporting vulnerability
-----------------------
If you find a vulnerability in our software, please send the email to
"tatsuhiro.t at gmail dot com" about its details instead of submitting
issues on github issue page. It is a standard practice not to
disclose vulnerability information publicly until a fixed version is
released, or mitigation is worked out.
In the future, we may setup a dedicated mail address for this purpose.
Release schedule
----------------
In general, we follow `Semantic Versioning <http://semver.org/>`_. We
release MINOR version update every month, and usually we ship it
around 25th day of every month.
We may release PATCH releases between the regular releases, mainly for
severe security bug fixes.
We have no plan to break API compatibility changes involving soname
bump, so MAJOR version will stay 1 for the foreseeable future.
License
-------
The MIT License

View File

@@ -27,9 +27,9 @@ 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
PREFIX="$ANDROID_HOME"/usr/local
TOOLCHAIN="$ANDROID_HOME"/toolchain
PATH="$TOOLCHAIN"/bin:"$PATH"
./configure \
--disable-shared \
@@ -39,9 +39,9 @@ PATH=$TOOLCHAIN/bin:$PATH
--without-libxml2 \
--disable-python-bindings \
--disable-examples \
--enable-werror \
CC=clang \
CXX=clang++ \
--disable-threads \
CC="$TOOLCHAIN"/bin/arm-linux-androideabi-clang \
CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-clang++ \
CPPFLAGS="-fPIE -I$PREFIX/include" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
LDFLAGS="-fPIE -pie -L$PREFIX/lib"

53
appveyor.yml Normal file
View File

@@ -0,0 +1,53 @@
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
#version: 0.10.{build}
# branches to build
branches:
# blacklist
except:
- gh-pages
# Do not build on tags (GitHub only)
skip_tags: true
#---------------------------------#
# environment configuration #
#---------------------------------#
os: Windows Server 2012
# scripts that run after cloning repository
install:
# install Win-Flex-Bison
#- cmd: cinst winflexbison -y
#---------------------------------#
# build configuration #
#---------------------------------#
# scripts to run before build
before_build:
- cmd: cmake .
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
# before_package:
# scripts to run after build
# after_build:
# to run your custom scripts instead of automatic MSBuild
build_script:
- cmd: cmake --build .
# to disable automatic builds
# build: off

52
author.py Executable file
View File

@@ -0,0 +1,52 @@
#!/usr/bin/env python3
# script to extract commit author's name from standard input. The
# input should be <AUTHOR>:<EMAIL>, one per line.
# This script expects the input is created by git-log command:
#
# git log --format=%aN:%aE
#
# This script removes duplicates based on email address, breaking a
# tie with longer author name. Among the all author names extract the
# previous step, we remove duplicate by case-insensitive match.
#
# So we can do this in one line:
#
# git log --format=%aN:%aE | sort | uniq | ./author.py > authors
import sys
edict = {}
for line in sys.stdin:
author, email = line.strip().split(':', 1)
if email in edict:
an = edict[email]
if len(an) < len(author) or an > author:
sys.stderr.write(
'eliminated {} in favor of {}\n'.format(an, author))
edict[email] = author
else:
sys.stderr.write(
'eliminated {} in favor of {}\n'.format(author, an))
else:
edict[email] = author
names = list(sorted(edict.values()))
ndict = {}
for name in names:
lowname = name.lower()
if lowname in ndict:
an = ndict[lowname]
if an > name:
sys.stderr.write('eliminated {} in favor of {}\n'.format(an, name))
ndict[lowname] = name
else:
sys.stderr.write('eliminated {} in favor of {}\n'.format(name, an))
else:
ndict[lowname] = name
for name in sorted(ndict.values()):
print(name)

View File

@@ -0,0 +1,31 @@
# Convenience function that checks the availability of certain
# C or C++ compiler flags and returns valid ones as a string.
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
function(extract_valid_c_flags varname)
set(valid_flags)
foreach(flag IN LISTS ARGN)
string(REGEX REPLACE "[^a-zA-Z0-9_]+" "_" flag_var ${flag})
set(flag_var "C_FLAG_${flag_var}")
check_c_compiler_flag("${flag}" "${flag_var}")
if(${flag_var})
set(valid_flags "${valid_flags} ${flag}")
endif()
endforeach()
set(${varname} "${valid_flags}" PARENT_SCOPE)
endfunction()
function(extract_valid_cxx_flags varname)
set(valid_flags)
foreach(flag IN LISTS ARGN)
string(REGEX REPLACE "[^a-zA-Z0-9_]+" "_" flag_var ${flag})
set(flag_var "CXX_FLAG_${flag_var}")
check_cxx_compiler_flag("${flag}" "${flag_var}")
if(${flag_var})
set(valid_flags "${valid_flags} ${flag}")
endif()
endforeach()
set(${varname} "${valid_flags}" PARENT_SCOPE)
endfunction()

40
cmake/FindCUnit.cmake Normal file
View File

@@ -0,0 +1,40 @@
# - Try to find cunit
# Once done this will define
# CUNIT_FOUND - System has cunit
# CUNIT_INCLUDE_DIRS - The cunit include directories
# CUNIT_LIBRARIES - The libraries needed to use cunit
find_package(PkgConfig QUIET)
pkg_check_modules(PC_CUNIT QUIET cunit)
find_path(CUNIT_INCLUDE_DIR
NAMES CUnit/CUnit.h
HINTS ${PC_CUNIT_INCLUDE_DIRS}
)
find_library(CUNIT_LIBRARY
NAMES cunit
HINTS ${PC_CUNIT_LIBRARY_DIRS}
)
if(CUNIT_INCLUDE_DIR)
set(_version_regex "^#define[ \t]+CU_VERSION[ \t]+\"([^\"]+)\".*")
file(STRINGS "${CUNIT_INCLUDE_DIR}/CUnit/CUnit.h"
CUNIT_VERSION REGEX "${_version_regex}")
string(REGEX REPLACE "${_version_regex}" "\\1"
CUNIT_VERSION "${CUNIT_VERSION}")
unset(_version_regex)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set CUNIT_FOUND to TRUE
# if all listed variables are TRUE and the requested version matches.
find_package_handle_standard_args(CUnit REQUIRED_VARS
CUNIT_LIBRARY CUNIT_INCLUDE_DIR
VERSION_VAR CUNIT_VERSION)
if(CUNIT_FOUND)
set(CUNIT_LIBRARIES ${CUNIT_LIBRARY})
set(CUNIT_INCLUDE_DIRS ${CUNIT_INCLUDE_DIR})
endif()
mark_as_advanced(CUNIT_INCLUDE_DIR CUNIT_LIBRARY)

44
cmake/FindCython.cmake Normal file
View File

@@ -0,0 +1,44 @@
# 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 )

40
cmake/FindJansson.cmake Normal file
View File

@@ -0,0 +1,40 @@
# - Try to find jansson
# Once done this will define
# JANSSON_FOUND - System has jansson
# JANSSON_INCLUDE_DIRS - The jansson include directories
# JANSSON_LIBRARIES - The libraries needed to use jansson
find_package(PkgConfig QUIET)
pkg_check_modules(PC_JANSSON QUIET jansson)
find_path(JANSSON_INCLUDE_DIR
NAMES jansson.h
HINTS ${PC_JANSSON_INCLUDE_DIRS}
)
find_library(JANSSON_LIBRARY
NAMES jansson
HINTS ${PC_JANSSON_LIBRARY_DIRS}
)
if(JANSSON_INCLUDE_DIR)
set(_version_regex "^#define[ \t]+JANSSON_VERSION[ \t]+\"([^\"]+)\".*")
file(STRINGS "${JANSSON_INCLUDE_DIR}/jansson.h"
JANSSON_VERSION REGEX "${_version_regex}")
string(REGEX REPLACE "${_version_regex}" "\\1"
JANSSON_VERSION "${JANSSON_VERSION}")
unset(_version_regex)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set JANSSON_FOUND to TRUE
# if all listed variables are TRUE and the requested version matches.
find_package_handle_standard_args(Jansson REQUIRED_VARS
JANSSON_LIBRARY JANSSON_INCLUDE_DIR
VERSION_VAR JANSSON_VERSION)
if(JANSSON_FOUND)
set(JANSSON_LIBRARIES ${JANSSON_LIBRARY})
set(JANSSON_INCLUDE_DIRS ${JANSSON_INCLUDE_DIR})
endif()
mark_as_advanced(JANSSON_INCLUDE_DIR JANSSON_LIBRARY)

40
cmake/FindJemalloc.cmake Normal file
View File

@@ -0,0 +1,40 @@
# - Try to find jemalloc
# Once done this will define
# JEMALLOC_FOUND - System has jemalloc
# JEMALLOC_INCLUDE_DIRS - The jemalloc include directories
# JEMALLOC_LIBRARIES - The libraries needed to use jemalloc
find_package(PkgConfig QUIET)
pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
find_path(JEMALLOC_INCLUDE_DIR
NAMES jemalloc/jemalloc.h
HINTS ${PC_JEMALLOC_INCLUDE_DIRS}
)
find_library(JEMALLOC_LIBRARY
NAMES jemalloc
HINTS ${PC_JEMALLOC_LIBRARY_DIRS}
)
if(JEMALLOC_INCLUDE_DIR)
set(_version_regex "^#define[ \t]+JEMALLOC_VERSION[ \t]+\"([^\"]+)\".*")
file(STRINGS "${JEMALLOC_INCLUDE_DIR}/jemalloc/jemalloc.h"
JEMALLOC_VERSION REGEX "${_version_regex}")
string(REGEX REPLACE "${_version_regex}" "\\1"
JEMALLOC_VERSION "${JEMALLOC_VERSION}")
unset(_version_regex)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
# if all listed variables are TRUE and the requested version matches.
find_package_handle_standard_args(Jemalloc REQUIRED_VARS
JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR
VERSION_VAR JEMALLOC_VERSION)
if(JEMALLOC_FOUND)
set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
endif()
mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY)

40
cmake/FindLibcares.cmake Normal file
View File

@@ -0,0 +1,40 @@
# - Try to find libcares
# Once done this will define
# LIBCARES_FOUND - System has libcares
# LIBCARES_INCLUDE_DIRS - The libcares include directories
# LIBCARES_LIBRARIES - The libraries needed to use libcares
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBCARES QUIET libcares)
find_path(LIBCARES_INCLUDE_DIR
NAMES ares.h
HINTS ${PC_LIBCARES_INCLUDE_DIRS}
)
find_library(LIBCARES_LIBRARY
NAMES cares
HINTS ${PC_LIBCARES_LIBRARY_DIRS}
)
if(LIBCARES_INCLUDE_DIR)
set(_version_regex "^#define[ \t]+ARES_VERSION_STR[ \t]+\"([^\"]+)\".*")
file(STRINGS "${LIBCARES_INCLUDE_DIR}/ares_version.h"
LIBCARES_VERSION REGEX "${_version_regex}")
string(REGEX REPLACE "${_version_regex}" "\\1"
LIBCARES_VERSION "${LIBCARES_VERSION}")
unset(_version_regex)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCARES_FOUND to TRUE
# if all listed variables are TRUE and the requested version matches.
find_package_handle_standard_args(Libcares REQUIRED_VARS
LIBCARES_LIBRARY LIBCARES_INCLUDE_DIR
VERSION_VAR LIBCARES_VERSION)
if(LIBCARES_FOUND)
set(LIBCARES_LIBRARIES ${LIBCARES_LIBRARY})
set(LIBCARES_INCLUDE_DIRS ${LIBCARES_INCLUDE_DIR})
endif()
mark_as_advanced(LIBCARES_INCLUDE_DIR LIBCARES_LIBRARY)

38
cmake/FindLibev.cmake Normal file
View File

@@ -0,0 +1,38 @@
# - Try to find libev
# Once done this will define
# LIBEV_FOUND - System has libev
# LIBEV_INCLUDE_DIRS - The libev include directories
# LIBEV_LIBRARIES - The libraries needed to use libev
find_path(LIBEV_INCLUDE_DIR
NAMES ev.h
)
find_library(LIBEV_LIBRARY
NAMES ev
)
if(LIBEV_INCLUDE_DIR)
file(STRINGS "${LIBEV_INCLUDE_DIR}/ev.h"
LIBEV_VERSION_MAJOR REGEX "^#define[ \t]+EV_VERSION_MAJOR[ \t]+[0-9]+")
file(STRINGS "${LIBEV_INCLUDE_DIR}/ev.h"
LIBEV_VERSION_MINOR REGEX "^#define[ \t]+EV_VERSION_MINOR[ \t]+[0-9]+")
string(REGEX REPLACE "[^0-9]+" "" LIBEV_VERSION_MAJOR "${LIBEV_VERSION_MAJOR}")
string(REGEX REPLACE "[^0-9]+" "" LIBEV_VERSION_MINOR "${LIBEV_VERSION_MINOR}")
set(LIBEV_VERSION "${LIBEV_VERSION_MAJOR}.${LIBEV_VERSION_MINOR}")
unset(LIBEV_VERSION_MINOR)
unset(LIBEV_VERSION_MAJOR)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBEV_FOUND to TRUE
# if all listed variables are TRUE and the requested version matches.
find_package_handle_standard_args(Libev REQUIRED_VARS
LIBEV_LIBRARY LIBEV_INCLUDE_DIR
VERSION_VAR LIBEV_VERSION)
if(LIBEV_FOUND)
set(LIBEV_LIBRARIES ${LIBEV_LIBRARY})
set(LIBEV_INCLUDE_DIRS ${LIBEV_INCLUDE_DIR})
endif()
mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARY)

97
cmake/FindLibevent.cmake Normal file
View File

@@ -0,0 +1,97 @@
# - Try to find libevent
#.rst
# FindLibevent
# ------------
#
# Find Libevent include directories and libraries. Invoke as::
#
# find_package(Libevent
# [version] [EXACT] # Minimum or exact version
# [REQUIRED] # Fail if Libevent is not found
# [COMPONENT <C>...]) # Libraries to look for
#
# Valid components are one or more of:: libevent core extra pthreads openssl.
# Note that 'libevent' contains both core and extra. You must specify one of
# them for the other components.
#
# This module will define the following variables::
#
# LIBEVENT_FOUND - True if headers and requested libraries were found
# LIBEVENT_INCLUDE_DIRS - Libevent include directories
# LIBEVENT_LIBRARIES - Libevent libraries to be linked
# LIBEVENT_<C>_FOUND - Component <C> was found (<C> is uppercase)
# LIBEVENT_<C>_LIBRARY - Library to be linked for Libevent component <C>.
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBEVENT QUIET libevent)
# Look for the Libevent 2.0 or 1.4 headers
find_path(LIBEVENT_INCLUDE_DIR
NAMES
event2/event-config.h
event-config.h
HINTS
${PC_LIBEVENT_INCLUDE_DIRS}
)
if(LIBEVENT_INCLUDE_DIR)
set(_version_regex "^#define[ \t]+_EVENT_VERSION[ \t]+\"([^\"]+)\".*")
if(EXISTS "${LIBEVENT_INCLUDE_DIR}/event2/event-config.h")
# Libevent 2.0
file(STRINGS "${LIBEVENT_INCLUDE_DIR}/event2/event-config.h"
LIBEVENT_VERSION REGEX "${_version_regex}")
if("${LIBEVENT_VERSION}" STREQUAL "")
set(LIBEVENT_VERSION ${PC_LIBEVENT_VERSION})
endif()
else()
# Libevent 1.4
file(STRINGS "${LIBEVENT_INCLUDE_DIR}/event-config.h"
LIBEVENT_VERSION REGEX "${_version_regex}")
endif()
string(REGEX REPLACE "${_version_regex}" "\\1"
LIBEVENT_VERSION "${LIBEVENT_VERSION}")
unset(_version_regex)
endif()
set(_LIBEVENT_REQUIRED_VARS)
foreach(COMPONENT ${Libevent_FIND_COMPONENTS})
set(_LIBEVENT_LIBNAME libevent)
# Note: compare two variables to avoid a CMP0054 policy warning
if(COMPONENT STREQUAL _LIBEVENT_LIBNAME)
set(_LIBEVENT_LIBNAME event)
else()
set(_LIBEVENT_LIBNAME "event_${COMPONENT}")
endif()
string(TOUPPER "${COMPONENT}" COMPONENT_UPPER)
find_library(LIBEVENT_${COMPONENT_UPPER}_LIBRARY
NAMES ${_LIBEVENT_LIBNAME}
HINTS ${PC_LIBEVENT_LIBRARY_DIRS}
)
if(LIBEVENT_${COMPONENT_UPPER}_LIBRARY)
set(Libevent_${COMPONENT}_FOUND 1)
endif()
list(APPEND _LIBEVENT_REQUIRED_VARS LIBEVENT_${COMPONENT_UPPER}_LIBRARY)
endforeach()
unset(_LIBEVENT_LIBNAME)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBEVENT_FOUND to TRUE
# if all listed variables are TRUE and the requested version matches.
find_package_handle_standard_args(Libevent REQUIRED_VARS
${_LIBEVENT_REQUIRED_VARS}
LIBEVENT_INCLUDE_DIR
VERSION_VAR LIBEVENT_VERSION
HANDLE_COMPONENTS)
if(LIBEVENT_FOUND)
set(LIBEVENT_INCLUDE_DIRS ${LIBEVENT_INCLUDE_DIR})
set(LIBEVENT_LIBRARIES)
foreach(COMPONENT ${Libevent_FIND_COMPONENTS})
string(TOUPPER "${COMPONENT}" COMPONENT_UPPER)
list(APPEND LIBEVENT_LIBRARIES ${LIBEVENT_${COMPONENT_UPPER}_LIBRARY})
set(LIBEVENT_${COMPONENT_UPPER}_FOUND ${Libevent_${COMPONENT}_FOUND})
endforeach()
endif()
mark_as_advanced(LIBEVENT_INCLUDE_DIR ${_LIBEVENT_REQUIRED_VARS})
unset(_LIBEVENT_REQUIRED_VARS)

19
cmake/FindSystemd.cmake Normal file
View File

@@ -0,0 +1,19 @@
# - Try to find systemd
# Once done this will define
# SYSTEMD_FOUND - System has systemd
# SYSTEMD_INCLUDE_DIRS - The systemd include directories
# SYSTEMD_LIBRARIES - The libraries needed to use systemd
include(FeatureSummary)
set_package_properties(Systemd PROPERTIES
URL "http://freedesktop.org/wiki/Software/systemd/"
DESCRIPTION "System and Service Manager")
find_package(PkgConfig QUIET)
pkg_check_modules(PC_SYSTEMD QUIET libsystemd)
find_library(SYSTEMD_LIBRARIES NAMES systemd ${PC_SYSTEMD_LIBRARY_DIRS})
find_path(SYSTEMD_INCLUDE_DIRS systemd/sd-login.h HINTS ${PC_SYSTEMD_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SYSTEMD DEFAULT_MSG SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES)
mark_as_advanced(SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES)

11
cmake/Version.cmake Normal file
View File

@@ -0,0 +1,11 @@
# Converts a version such as 1.2.255 to 0x0102ff
function(HexVersion version_hex_var major minor patch)
math(EXPR version_dec "${major} * 256 * 256 + ${minor} * 256 + ${patch}")
set(version_hex "0x")
foreach(i RANGE 5 0 -1)
math(EXPR num "(${version_dec} >> (4 * ${i})) & 15")
string(SUBSTRING "0123456789abcdef" ${num} 1 num_hex)
set(version_hex "${version_hex}${num_hex}")
endforeach()
set(${version_hex_var} "${version_hex}" PARENT_SCOPE)
endfunction()

80
cmakeconfig.h.in Normal file
View File

@@ -0,0 +1,80 @@
/* Hint to the compiler that a function never returns */
#define NGHTTP2_NORETURN @HINT_NORETURN@
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine ssize_t @ssize_t@
/* Define to 1 if you have the `std::map::emplace`. */
#cmakedefine HAVE_STD_MAP_EMPLACE 1
/* Define to 1 if you have `libjansson` library. */
#cmakedefine HAVE_JANSSON 1
/* Define to 1 if you have `libxml2` library. */
#cmakedefine HAVE_LIBXML2 1
/* Define to 1 if you have `mruby` library. */
#cmakedefine HAVE_MRUBY 1
/* Define to 1 if you have `neverbleed` library. */
#cmakedefine HAVE_NEVERBLEED 1
/* sizeof(int *) */
#cmakedefine SIZEOF_INT_P @SIZEOF_INT_P@
/* sizeof(time_t) */
#cmakedefine SIZEOF_TIME_T @SIZEOF_TIME_T@
/* Define to 1 if you have the `_Exit` function. */
#cmakedefine HAVE__EXIT 1
/* Define to 1 if you have the `accept4` function. */
#cmakedefine HAVE_ACCEPT4 1
/* Define to 1 if you have the `mkostemp` function. */
#cmakedefine HAVE_MKOSTEMP 1
/* Define to 1 if you have the `initgroups` function. */
#cmakedefine01 HAVE_DECL_INITGROUPS
/* Define to 1 to enable debug output. */
#cmakedefine DEBUGBUILD 1
/* Define to 1 if you want to disable threads. */
#cmakedefine NOTHREADS 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
#cmakedefine HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
/* Define to 1 if you have the <netdb.h> header file. */
#cmakedefine HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#cmakedefine HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <pwd.h> header file. */
#cmakedefine HAVE_PWD_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <syslog.h> header file. */
#cmakedefine HAVE_SYSLOG_H 1
/* Define to 1 if you have the <time.h> header file. */
#cmakedefine HAVE_TIME_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1

View File

@@ -25,7 +25,10 @@ dnl Do not change user variables!
dnl http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
AC_PREREQ(2.61)
AC_INIT([nghttp2], [1.0.1], [t-tujikawa@users.sourceforge.net])
AC_INIT([nghttp2], [1.43.0], [t-tujikawa@users.sourceforge.net])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_USE_SYSTEM_EXTENSIONS
LT_PREREQ([2.2.6])
@@ -36,20 +39,14 @@ AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects])
# comment out for now since this requires automake 1.13 or higher and
# travis has older one.
# AM_EXTRA_RECURSIVE_TARGETS([it])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
dnl See versioning rule:
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST(LT_CURRENT, 14)
AC_SUBST(LT_CURRENT, 34)
AC_SUBST(LT_REVISION, 1)
AC_SUBST(LT_AGE, 0)
AC_SUBST(LT_AGE, 20)
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"`
@@ -77,7 +74,7 @@ AC_ARG_ENABLE([threads],
AC_ARG_ENABLE([app],
[AS_HELP_STRING([--enable-app],
[Build applications (nghttp, nghttpd and nghttpx) [default=check]])],
[Build applications (nghttp, nghttpd, nghttpx and h2load) [default=check]])],
[request_app=$enableval], [request_app=check])
AC_ARG_ENABLE([hpack-tools],
@@ -105,6 +102,11 @@ AC_ARG_ENABLE([failmalloc],
[Do not build failmalloc test program])],
[request_failmalloc=$enableval], [request_failmalloc=yes])
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])],
[request_lib_only=$enableval], [request_lib_only=no])
AC_ARG_WITH([libxml2],
[AS_HELP_STRING([--with-libxml2],
[Use libxml2 [default=check]])],
@@ -115,10 +117,20 @@ AC_ARG_WITH([jemalloc],
[Use jemalloc [default=check]])],
[request_jemalloc=$withval], [request_jemalloc=check])
AC_ARG_WITH([spdylay],
[AS_HELP_STRING([--with-spdylay],
[Use spdylay [default=check]])],
[request_spdylay=$withval], [request_spdylay=check])
AC_ARG_WITH([systemd],
[AS_HELP_STRING([--with-systemd],
[Enable systemd support in nghttpx [default=check]])],
[request_systemd=$withval], [request_systemd=check])
AC_ARG_WITH([mruby],
[AS_HELP_STRING([--with-mruby],
[Use mruby [default=no]])],
[request_mruby=$withval], [request_mruby=no])
AC_ARG_WITH([neverbleed],
[AS_HELP_STRING([--with-neverbleed],
[Use neverbleed [default=no]])],
[request_neverbleed=$withval], [request_neverbleed=no])
AC_ARG_WITH([cython],
[AS_HELP_STRING([--with-cython=PATH],
@@ -139,9 +151,17 @@ AC_PROG_MKDIR_P
PKG_PROG_PKG_CONFIG([0.20])
AM_PATH_PYTHON([3.8],, [:])
if [test "x$request_lib_only" = "xyes"]; then
request_app=no
request_hpack_tools=no
request_examples=no
request_python_bindings=no
fi
if [test "x$request_python_bindings" != "xno"]; then
AM_PATH_PYTHON([2.7],, [:])
AX_PYTHON_DEVEL([>= '2.7'])
AX_PYTHON_DEVEL([>= '3.8'])
fi
if test "x${cython_path}" = "x"; then
@@ -151,41 +171,25 @@ else
AC_SUBST([CYTHON])
fi
#
# If we're running GCC or clang define _U_ to be "__attribute__((unused))"
# so we can use _U_ to flag unused function parameters and not get warnings
# about them. Otherwise, define _U_ to be an empty string so that _U_ used
# to flag an unused function parameters will compile with other compilers.
#
# XXX - similar hints for other compilers?
#
if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
AC_DEFINE([_U_], [__attribute__((unused))], [Hint to the compiler that a function parameters is not used])
AC_DEFINE([NGHTTP2_NORETURN], [__attribute__((noreturn))], [Hint to the compiler that a function never return])
else
AC_DEFINE([_U_], , [Hint to the compiler that a function parameters is not used])
AC_DEFINE([NGHTTP2_NORETURN], , [Hint to the compiler that a function never return])
fi
AX_CXX_COMPILE_STDCXX_11([noext], [optional])
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
AX_CXX_COMPILE_STDCXX([14], [noext], [optional])
CXX1XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$save_CXXFLAGS"
AC_SUBST([CXX1XCXXFLAGS])
AC_LANG_PUSH(C++)
# Check that std::chrono::steady_clock is available. In particular,
# gcc 4.6 does not have one, but has monotonic_clock which is the old
# name existed in the pre-standard draft. If steady_clock is not
# available, don't define HAVE_STEADY_CLOCK and replace steady_clock
# with monotonic_clock.
AC_MSG_CHECKING([whether std::chrono::steady_clock is available])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
#include <chrono>
]],
[[
auto tp = std::chrono::steady_clock::now();
]])],
[AC_DEFINE([HAVE_STEADY_CLOCK], [1],
[Define to 1 if you have the `std::chrono::steady_clock`.])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $CXX1XCXXFLAGS"
# Check that std::future is available.
AC_MSG_CHECKING([whether std::future is available])
@@ -220,6 +224,43 @@ std::map<int, int>().emplace(1, 2);
[have_std_map_emplace=no
AC_MSG_RESULT([no])])
# Check that std::atomic_* overloads for std::shared_ptr are
# available.
AC_MSG_CHECKING([whether std::atomic_* overloads for std::shared_ptr are available])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
#include <memory>
]],
[[
auto a = std::make_shared<int>(1000000007);
auto p = std::atomic_load(&a);
++*p;
std::atomic_store(&a, p);
]])],
[AC_DEFINE([HAVE_ATOMIC_STD_SHARED_PTR], [1],
[Define to 1 if you have the std::atomic_* overloads for std::shared_ptr.])
have_atomic_std_shared_ptr=yes
AC_MSG_RESULT([yes])],
[have_atomic_std_shared_ptr=no
AC_MSG_RESULT([no])])
# Check that thread_local storage specifier is available
AC_MSG_CHECKING([whether thread_local storage class specifier is available.])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
,
[[
thread_local int a = 0;
(void)a;
]])],
[AC_DEFINE([HAVE_THREAD_LOCAL], [1],
[Define to 1 if you have thread_local storage specifier.])
have_thread_local=yes
AC_MSG_RESULT([yes])],
[have_Thread_local=no
AC_MSG_RESULT([no])])
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP()
# Checks for libraries.
@@ -230,21 +271,7 @@ TESTLDADD=
# Additional libraries required for programs under src directory.
APPLDFLAGS=
LIBS_OLD=$LIBS
# Search for dlsym function, which is used in tests. Linux needs -ldl,
# but netbsd does not need it.
AC_SEARCH_LIBS([dlsym], [dl])
TESTLDADD="$LIBS $TESTLDADD"
LIBS=$LIBS_OLD
LIBS_OLD=$LIBS
AC_SEARCH_LIBS([clock_gettime], [rt],
[AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
[Define to 1 if you have the `clock_gettime`.])])
APPLDFLAGS="$LIBS $APPLDFLAGS"
LIBS=$LIBS_OLD
case "$host" in
case "$host_os" in
*android*)
android_build=yes
# android does not need -pthread, but needs followng 3 libs for C++
@@ -256,6 +283,12 @@ case "$host" in
;;
esac
case "$host_os" in
*solaris*)
APPLDFLAGS="$APPLDFLAGS -lsocket -lnsl"
;;
esac
# zlib
PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.3], [have_zlib=yes], [have_zlib=no])
@@ -263,6 +296,18 @@ if test "x${have_zlib}" = "xno"; then
AC_MSG_NOTICE($ZLIB_PKG_ERRORS)
fi
# dl: openssl requires libdl when it is statically linked.
case "${host_os}" in
*bsd*)
# dlopen is in libc on *BSD
;;
*)
save_LIBS=$LIBS
AC_SEARCH_LIBS([dlopen], [dl], [APPLDFLAGS="-ldl $APPLDFLAGS"], [], [])
LIBS=$save_LIBS
;;
esac
# cunit
PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
# If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
@@ -294,7 +339,7 @@ AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])
# libev (for src)
# libev does not have pkg-config file. Check it in an old way.
LIBS_OLD=$LIBS
save_LIBS=$LIBS
# android requires -lm for floor
AC_CHECK_LIB([ev], [ev_time], [have_libev=yes], [have_libev=no], [-lm])
if test "x${have_libev}" = "xyes"; then
@@ -306,7 +351,7 @@ if test "x${have_libev}" = "xyes"; then
AC_SUBST([LIBEV_CFLAGS])
fi
fi
LIBS=$LIBS_OLD
LIBS=$save_LIBS
# openssl (for src)
PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1],
@@ -315,6 +360,13 @@ if test "x${have_openssl}" = "xno"; then
AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
fi
# c-ares (for src)
PKG_CHECK_MODULES([LIBCARES], [libcares >= 1.7.5], [have_libcares=yes],
[have_libcares=no])
if test "x${have_libcares}" = "xno"; then
AC_MSG_NOTICE($LIBCARES_PKG_ERRORS)
fi
# libevent_openssl (for examples)
# 2.0.8 is required because we use evconnlistener_set_error_cb()
PKG_CHECK_MODULES([LIBEVENT_OPENSSL], [libevent_openssl >= 2.0.8],
@@ -326,22 +378,41 @@ fi
# jansson (for src/nghttp, src/deflatehd and src/inflatehd)
PKG_CHECK_MODULES([JANSSON], [jansson >= 2.5],
[have_jansson=yes], [have_jansson=no])
if test "x${have_jansson}" == "xyes"; then
if test "x${have_jansson}" = "xyes"; then
AC_DEFINE([HAVE_JANSSON], [1],
[Define to 1 if you have `libjansson` library.])
else
AC_MSG_NOTICE($JANSSON_PKG_ERRORS)
fi
# libxml2 (for src/nghttp)
have_libxml2=no
if test "x${request_libxml2}" != "xno"; then
AM_PATH_XML2(2.7.7, [have_libxml2=yes], [have_libxml2=no])
if test "x${have_libxml2}" = "xyes"; then
AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have `libxml2` library.])
# libsystemd (for src/nghttpx)
have_libsystemd=no
if test "x${request_systemd}" != "xno"; then
PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [have_libsystemd=yes],
[have_libsystemd=no])
if test "x${have_libsystemd}" = "xyes"; then
AC_DEFINE([HAVE_LIBSYSTEMD], [1],
[Define to 1 if you have `libsystemd` library.])
else
AC_MSG_NOTICE($SYSTEMD_PKG_ERRORS)
fi
fi
if test "x${request_systemd}" = "xyes" &&
test "x${have_libsystemd}" != "xyes"; then
AC_MSG_ERROR([systemd was requested (--with-systemd) but not found])
fi
# libxml2 (for src/nghttp)
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6.26],
[have_libxml2=yes], [have_libxml2=no])
if test "x${have_libxml2}" = "xyes"; then
AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have `libxml2` library.])
else
AC_MSG_NOTICE($LIBXML2_PKG_ERRORS)
fi
if test "x${request_libxml2}" = "xyes" &&
test "x${have_libxml2}" != "xyes"; then
AC_MSG_ERROR([libxml2 was requested (--with-libxml2) but not found])
@@ -352,10 +423,9 @@ AM_CONDITIONAL([HAVE_LIBXML2], [ test "x${have_libxml2}" = "xyes" ])
# jemalloc
have_jemalloc=no
if test "x${request_jemalloc}" != "xno"; then
LIBS_OLD=$LIBS
save_LIBS=$LIBS
AC_SEARCH_LIBS([malloc_stats_print], [jemalloc], [have_jemalloc=yes], [],
[$PTHREAD_LDFLAGS])
LIBS=$LIBS_OLD
if test "x${have_jemalloc}" = "xyes"; then
jemalloc_libs=${ac_cv_search_malloc_stats_print}
@@ -363,13 +433,14 @@ if test "x${request_jemalloc}" != "xno"; then
# On Darwin, malloc_stats_print is je_malloc_stats_print
AC_SEARCH_LIBS([je_malloc_stats_print], [jemalloc], [have_jemalloc=yes], [],
[$PTHREAD_LDFLAGS])
LIBS=$LIBS_OLD
if test "x${have_jemalloc}" = "xyes"; then
jemalloc_libs=${ac_cv_search_je_malloc_stats_print}
fi
fi
LIBS=$save_LIBS
if test "x${have_jemalloc}" = "xyes" &&
test "x${jemalloc_libs}" != "xnone required"; then
JEMALLOC_LIBS=${jemalloc_libs}
@@ -382,26 +453,6 @@ if test "x${request_jemalloc}" = "xyes" &&
AC_MSG_ERROR([jemalloc was requested (--with-jemalloc) but not found])
fi
# spdylay (for src/nghttpx and src/h2load)
have_spdylay=no
if test "x${request_spdylay}" != "xno"; then
PKG_CHECK_MODULES([LIBSPDYLAY], [libspdylay >= 1.3.2],
[have_spdylay=yes], [have_spdylay=no])
if test "x${have_spdylay}" = "xyes"; then
AC_DEFINE([HAVE_SPDYLAY], [1], [Define to 1 if you have `spdylay` library.])
else
AC_MSG_NOTICE($LIBSPDYLAY_PKG_ERRORS)
AC_MSG_NOTICE([The SPDY support in nghttpx and h2load will be disabled.])
fi
fi
if test "x${request_spdylay}" = "xyes" &&
test "x${have_spdylay}" != "xyes"; then
AC_MSG_ERROR([spdylay was requested (--with-spdylay) but not found])
fi
AM_CONDITIONAL([HAVE_SPDYLAY], [ test "x${have_spdylay}" = "xyes" ])
# Check Boost Asio library
have_asio_lib=no
@@ -421,13 +472,14 @@ if test "x${request_asio_lib}" = "xyes"; then
fi
fi
# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL
# and libev
# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL,
# libev, and libc-ares.
enable_app=no
if test "x${request_app}" != "xno" &&
test "x${have_zlib}" = "xyes" &&
test "x${have_openssl}" = "xyes" &&
test "x${have_libev}" = "xyes"; then
test "x${have_libev}" = "xyes" &&
test "x${have_libcares}" = "xyes"; then
enable_app=yes
fi
@@ -477,12 +529,45 @@ fi
AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])
# third-party only be built when needed
enable_third_party=no
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
enable_third_party=yes
# mruby (for src/nghttpx)
if test "x${request_mruby}" = "xyes"; then
# We are going to build mruby
have_mruby=yes
AC_DEFINE([HAVE_MRUBY], [1], [Define to 1 if you have `mruby` library.])
LIBMRUBY_LIBS="-lmruby -lm"
LIBMRUBY_CFLAGS=
AC_SUBST([LIBMRUBY_LIBS])
AC_SUBST([LIBMRUBY_CFLAGS])
fi
# neverbleed (for src/nghttpx)
if test "x${request_neverbleed}" = "xyes"; then
have_neverbleed=yes
AC_DEFINE([HAVE_NEVERBLEED], [1], [Define to 1 if you have `neverbleed` library.])
fi
fi
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${have_python_dev}" = "xyes"; then
test "x${PYTHON_VERSION}" != "x"; then
enable_python_bindings=yes
fi
@@ -549,6 +634,26 @@ AC_SYS_LARGEFILE
AC_CHECK_MEMBER([struct tm.tm_gmtoff], [have_struct_tm_tm_gmtoff=yes],
[have_struct_tm_tm_gmtoff=no], [[#include <time.h>]])
AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
[AC_DEFINE([HAVE_SOCKADDR_IN_SIN_LEN],[1],
[Define to 1 if struct sockaddr_in has sin_len member.])],
[],
[[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
]])
AC_CHECK_MEMBER([struct sockaddr_in6.sin6_len],
[AC_DEFINE([HAVE_SOCKADDR_IN6_SIN6_LEN],[1],
[Define to 1 if struct sockaddr_in6 has sin6_len member.])],
[],
[[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
]])
if test "x$have_struct_tm_tm_gmtoff" = "xyes"; then
AC_DEFINE([HAVE_STRUCT_TM_TM_GMTOFF], [1],
[Define to 1 if you have `struct tm.tm_gmtoff` member.])
@@ -558,10 +663,12 @@ fi
# adjustment.
AC_CHECK_SIZEOF([int *])
AC_CHECK_SIZEOF([time_t])
# Checks for library functions.
if test "x$cross_compiling" != "xyes"; then
AC_FUNC_MALLOC
fi
# Don't check malloc, since it does not play nicely with C++ stdlib
# AC_FUNC_MALLOC
AC_FUNC_CHOWN
AC_FUNC_ERROR_AT_LINE
@@ -581,6 +688,7 @@ AC_CHECK_FUNCS([ \
memchr \
memmove \
memset \
mkostemp \
socket \
sqrt \
strchr \
@@ -598,18 +706,24 @@ AC_CHECK_FUNCS([ \
AC_CHECK_FUNC([timerfd_create],
[have_timerfd_create=yes], [have_timerfd_create=no])
# For cygwin: we can link initgroups, so AC_CHECK_FUNCS succeeds, but
# cygwin disables initgroups due to feature test macro magic with our
# configuration. FreeBSD declares initgroups() in unistd.h.
AC_CHECK_DECLS([initgroups], [], [], [[
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <grp.h>
]])
# Checks for epoll availability, primarily for examples/tiny-nghttpd
AX_HAVE_EPOLL([have_epoll=yes], [have_epoll=no])
save_CFLAGS=$CFLAGS
save_CXXFLAGS=$CXXFLAGS
AM_CONDITIONAL([ENABLE_TINY_NGHTTPD],
[ test "x${have_epoll}" = "xyes" &&
test "x${have_timerfd_create}" = "xyes"])
ac_save_CFLAGS=$CFLAGS
CFLAGS=
CXXFLAGS=
if test "x$werror" != "xno"; then
# For C compiler
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
AX_CHECK_COMPILE_FLAG([-Werror], [CFLAGS="$CFLAGS -Werror"])
@@ -637,14 +751,54 @@ if test "x$werror" != "xno"; then
AX_CHECK_COMPILE_FLAG([-Wdiv-by-zero], [CFLAGS="$CFLAGS -Wdiv-by-zero"])
AX_CHECK_COMPILE_FLAG([-Wshorten-64-to-32], [CFLAGS="$CFLAGS -Wshorten-64-to-32"])
AX_CHECK_COMPILE_FLAG([-Wconversion], [CFLAGS="$CFLAGS -Wconversion"])
AX_CHECK_COMPILE_FLAG([-Wextended-offsetof], [CFLAGS="$CFLAGS -Wextended-offsetof"])
AX_CHECK_COMPILE_FLAG([-Wformat-nonliteral], [CFLAGS="$CFLAGS -Wformat-nonliteral"])
AX_CHECK_COMPILE_FLAG([-Wlanguage-extension-token], [CFLAGS="$CFLAGS -Wlanguage-extension-token"])
AX_CHECK_COMPILE_FLAG([-Wmissing-field-initializers], [CFLAGS="$CFLAGS -Wmissing-field-initializers"])
AX_CHECK_COMPILE_FLAG([-Wmissing-noreturn], [CFLAGS="$CFLAGS -Wmissing-noreturn"])
AX_CHECK_COMPILE_FLAG([-Wmissing-variable-declarations], [CFLAGS="$CFLAGS -Wmissing-variable-declarations"])
# Not used because we cannot change public structs
# AX_CHECK_COMPILE_FLAG([-Wpadded], [CFLAGS="$CFLAGS -Wpadded"])
AX_CHECK_COMPILE_FLAG([-Wsign-conversion], [CFLAGS="$CFLAGS -Wsign-conversion"])
# Not used because this basically disallows default case
# AX_CHECK_COMPILE_FLAG([-Wswitch-enum], [CFLAGS="$CFLAGS -Wswitch-enum"])
AX_CHECK_COMPILE_FLAG([-Wunreachable-code-break], [CFLAGS="$CFLAGS -Wunreachable-code-break"])
AX_CHECK_COMPILE_FLAG([-Wunused-macros], [CFLAGS="$CFLAGS -Wunused-macros"])
AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [CFLAGS="$CFLAGS -Wunused-parameter"])
AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"])
# Only work with Clang for the moment
AX_CHECK_COMPILE_FLAG([-Wheader-guard], [CFLAGS="$CFLAGS -Wheader-guard"])
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CFLAGS="$CFLAGS -Wsometimes-uninitialized"])
# This is required because we pass format string as "const char*.
AX_CHECK_COMPILE_FLAG([-Wno-format-nonliteral], [CFLAGS="$CFLAGS -Wno-format-nonliteral"])
# For C++ compiler
AC_LANG_PUSH(C++)
AX_CHECK_COMPILE_FLAG([-Wall], [CXXFLAGS="$CXXFLAGS -Wall"])
AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAGS="$CXXFLAGS -Werror"])
AX_CHECK_COMPILE_FLAG([-Wformat-security], [CXXFLAGS="$CXXFLAGS -Wformat-security"])
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CXXFLAGS="$CXXFLAGS -Wsometimes-uninitialized"])
# Disable noexcept-type warning of g++-7. This is not harmful as
# long as all source files are compiled with the same compiler.
AX_CHECK_COMPILE_FLAG([-Wno-noexcept-type], [CXXFLAGS="$CXXFLAGS -Wno-noexcept-type"])
AC_LANG_POP()
fi
WARNCFLAGS=$CFLAGS
CFLAGS=$ac_save_CFLAGS
WARNCXXFLAGS=$CXXFLAGS
CFLAGS=$save_CFLAGS
CXXFLAGS=$save_CXXFLAGS
AC_SUBST([WARNCFLAGS])
AC_SUBST([WARNCXXFLAGS])
EXTRACFLAG=
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [EXTRACFLAG="-fvisibility=hidden"])
AC_SUBST([EXTRACFLAG])
if test "x$debug" != "xno"; then
AC_DEFINE([DEBUGBUILD], [1], [Define to 1 to enable debug output.])
@@ -659,6 +813,9 @@ if test "x$threads" != "xyes" ||
AC_DEFINE([NOTHREADS], [1], [Define to 1 if you want to disable threads.])
fi
# propagate $enable_static to tests/Makefile.am
AM_CONDITIONAL([ENABLE_STATIC], [test "x$enable_static" = "xyes"])
AC_SUBST([TESTLDADD])
AC_SUBST([APPLDFLAGS])
@@ -699,50 +856,65 @@ AC_CONFIG_FILES([
doc/asio_http2_client.h.rst
doc/contribute.rst
contrib/Makefile
script/Makefile
])
AC_OUTPUT
AC_MSG_NOTICE([summary of build options:
Version: ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
Host type: ${host}
Install prefix: ${prefix}
C compiler: ${CC}
CFLAGS: ${CFLAGS}
WARNCFLAGS: ${WARNCFLAGS}
LDFLAGS: ${LDFLAGS}
LIBS: ${LIBS}
CPPFLAGS: ${CPPFLAGS}
C preprocessor: ${CPP}
C++ compiler: ${CXX}
CXXFLAGS: ${CXXFLAGS}
CXXCPP: ${CXXCPP}
Library types: Shared=${enable_shared}, Static=${enable_static}
Package version: ${VERSION}
Library version: $LT_CURRENT:$LT_REVISION:$LT_AGE
Install prefix: ${prefix}
System types:
Build: ${build}
Host: ${host}
Target: ${target}
Compiler:
C compiler: ${CC}
CFLAGS: ${CFLAGS}
LDFLAGS: ${LDFLAGS}
C++ compiler: ${CXX}
CXXFLAGS: ${CXXFLAGS}
CXXCPP: ${CXXCPP}
C preprocessor: ${CPP}
CPPFLAGS: ${CPPFLAGS}
WARNCFLAGS: ${WARNCFLAGS}
WARNCXXFLAGS: ${WARNCXXFLAGS}
CXX1XCXXFLAGS: ${CXX1XCXXFLAGS}
EXTRACFLAG: ${EXTRACFLAG}
LIBS: ${LIBS}
Library:
Shared: ${enable_shared}
Static: ${enable_static}
Python:
Python: ${PYTHON}
PYTHON_VERSION: ${PYTHON_VERSION}
pyexecdir: ${pyexecdir}
Python-dev: ${have_python_dev}
PYTHON_CPPFLAGS:${PYTHON_CPPFLAGS}
PYTHON_LDFLAGS: ${PYTHON_LDFLAGS}
PYTHON_LIBS: ${PYTHON_LIBS}
Cython: ${CYTHON}
Test:
CUnit: ${have_cunit}
CUnit: ${have_cunit} (CFLAGS='${CUNIT_CFLAGS}' LIBS='${CUNIT_LIBS}')
Failmalloc: ${enable_failmalloc}
Libs:
OpenSSL: ${have_openssl}
Libxml2: ${have_libxml2}
Libev: ${have_libev}
Libevent(SSL): ${have_libevent_openssl}
Spdylay: ${have_spdylay}
Jansson: ${have_jansson}
Jemalloc: ${have_jemalloc}
Zlib: ${have_zlib}
OpenSSL: ${have_openssl} (CFLAGS='${OPENSSL_CFLAGS}' LIBS='${OPENSSL_LIBS}')
Libxml2: ${have_libxml2} (CFLAGS='${LIBXML2_CFLAGS}' LIBS='${LIBXML2_LIBS}')
Libev: ${have_libev} (CFLAGS='${LIBEV_CFLAGS}' LIBS='${LIBEV_LIBS}')
Libc-ares: ${have_libcares} (CFLAGS='${LIBCARES_CFLAGS}' LIBS='${LIBCARES_LIBS}')
Libevent(SSL): ${have_libevent_openssl} (CFLAGS='${LIBEVENT_OPENSSL_CFLAGS}' LIBS='${LIBEVENT_OPENSSL_LIBS}')
Jansson: ${have_jansson} (CFLAGS='${JANSSON_CFLAGS}' LIBS='${JANSSON_LIBS}')
Jemalloc: ${have_jemalloc} (LIBS='${JEMALLOC_LIBS}')
Zlib: ${have_zlib} (CFLAGS='${ZLIB_CFLAGS}' LIBS='${ZLIB_LIBS}')
Systemd: ${have_libsystemd} (CFLAGS='${SYSTEMD_CFLAGS}' LIBS='${SYSTEMD_LIBS}')
Boost CPPFLAGS: ${BOOST_CPPFLAGS}
Boost LDFLAGS: ${BOOST_LDFLAGS}
Boost::ASIO: ${BOOST_ASIO_LIB}
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}')
Neverbleed: ${have_neverbleed}
Features:
Applications: ${enable_app}
HPACK tools: ${enable_hpack_tools}

12
contrib/CMakeLists.txt Normal file
View File

@@ -0,0 +1,12 @@
set(CONFIGFILES
nghttpx-init
nghttpx.service
nghttpx-upstart.conf
)
# Note that the execute permissions of nghttpx-init is preserved
foreach(name IN LISTS CONFIGFILES)
configure_file("${name}.in" "${name}" @ONLY)
endforeach()
# set(EXTRA_DIST ${CONFIGFILES} nghttpx-logrotate tlsticketupdate.go)

View File

@@ -23,17 +23,24 @@
configfiles = nghttpx-init nghttpx.service nghttpx-upstart.conf
EXTRA_DIST = $(configfiles:%=%.in) nghttpx-logrotate
EXTRA_DIST = \
CMakeLists.txt \
$(configfiles:%=%.in) \
nghttpx-logrotate \
tlsticketupdate.go
edit = sed -e 's|@bindir[@]|$(bindir)|g'
nghttpx-init: %: $(srcdir)/%.in
nghttpx-init: $(srcdir)/nghttpx-init.in
rm -f $@ $@.tmp
$(edit) $< > $@.tmp
chmod +x $@.tmp
mv $@.tmp $@
nghttpx.service nghttpx-upstart.conf: %: $(srcdir)/%.in
nghttpx.service: $(srcdir)/nghttpx.service.in
$(edit) $< > $@
nghttpx-upstart.conf: $(srcdir)/nghttpx-upstart.conf.in
$(edit) $< > $@
$(configfiles): Makefile

73
contrib/nghttpx-init.in Normal file → Executable file
View File

@@ -20,7 +20,7 @@ NAME=nghttpx
# Depending on the configuration, binary may be located under @sbindir@
DAEMON=@bindir@/$NAME
PIDFILE=/var/run/$NAME.pid
DAEMON_ARGS="--conf /etc/nghttpx/nghttpx.conf --pid-file=$PIDFILE"
DAEMON_ARGS="--conf /etc/nghttpx/nghttpx.conf --pid-file=$PIDFILE --daemon"
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
@@ -83,19 +83,6 @@ do_stop()
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
@@ -114,34 +101,38 @@ case "$1" in
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
upgrade)
log_daemon_msg "Upgrade $DESC" "$NAME"
pid=`pidofproc -p $PIDFILE $NAME`
case "$?" in
0) echo "Sending USR2 signal to $pid"
kill -USR2 $pid
echo "Waiting for new binary..."
sleep 5
echo "Sending QUIT signal to $pid"
kill -QUIT $pid
log_end_msg 0
;;
*) echo "pidofproc() failed"
log_end_msg 1
;;
esac
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
log_daemon_msg "Upgrading $DESC" "$NAME"
oldpid=`pidofproc -p $PIDFILE $NAME`
case "$?" in
0)
log_progress_msg "Sending SIGUSR2 to $oldpid..."
kill -USR2 $oldpid
log_progress_msg "Waiting for new binary..."
for i in 1 2 3 4 5 ; do
sleep 1
newpid=`pidofproc -p $PIDFILE $NAME`
if [ "$newpid" != "$oldpid" ] ; then
break
fi
done
if [ "$newpid" != "$oldpid" ] ; then
log_progress_msg "Sending SIGQUIT to $oldpid..."
kill -QUIT $oldpid
log_end_msg 0
else
log_progress_msg "New binary failed to start"
log_end_msg 1
fi
;;
*)
log_progress_msg "pidofproc() failed"
log_end_msg 1
;;
esac
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the

View File

@@ -6,6 +6,6 @@
delaycompress
notifempty
postrotate
killall -USR1 nghttpx 2> /dev/null || true
[ -s /var/run/nghttpx.pid ] && kill -USR1 `cat /var/run/nghttpx.pid` 2> /dev/null || true
endscript
}

View File

@@ -1,10 +1,17 @@
[Unit]
Description=HTTP/2 experimental proxy
Description=HTTP/2 proxy
Documentation=man:nghttpx
After=network.target
[Service]
Type=simple
ExecStart=@bindir@/nghttpx --errorlog-syslog
Type=notify
ExecStart=@bindir@/nghttpx --conf=/etc/nghttpx/nghttpx.conf
ExecReload=/bin/kill --signal HUP $MAINPID
KillSignal=SIGQUIT
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full
Restart=always
[Install]
WantedBy=multi-user.target

113
contrib/tlsticketupdate.go Normal file
View File

@@ -0,0 +1,113 @@
//
// 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.
//
package main
import (
"bytes"
"crypto/rand"
"encoding/binary"
"flag"
"fmt"
"github.com/bradfitz/gomemcache/memcache"
"log"
"time"
)
func makeKey(len int) []byte {
b := make([]byte, len)
if _, err := rand.Read(b); err != nil {
log.Fatalf("rand.Read: %v", err)
}
return b
}
func main() {
var host = flag.String("host", "127.0.0.1", "memcached host")
var port = flag.Int("port", 11211, "memcached port")
var cipher = flag.String("cipher", "aes-128-cbc", "cipher for TLS ticket encryption")
var interval = flag.Int("interval", 3600, "interval to update TLS ticket keys")
flag.Parse()
var keylen int
switch *cipher {
case "aes-128-cbc":
keylen = 48
case "aes-256-cbc":
keylen = 80
default:
log.Fatalf("cipher: unknown cipher %v", cipher)
}
mc := memcache.New(fmt.Sprintf("%v:%v", *host, *port))
keys := [][]byte{
makeKey(keylen), // current encryption key
makeKey(keylen), // next encryption key; now decryption only
}
for {
buf := new(bytes.Buffer)
if err := binary.Write(buf, binary.BigEndian, uint32(1)); err != nil {
log.Fatalf("failed to write version: %v", err)
}
for _, key := range keys {
if err := binary.Write(buf, binary.BigEndian, uint16(keylen)); err != nil {
log.Fatalf("failed to write length: %v", err)
}
if _, err := buf.Write(key); err != nil {
log.Fatalf("buf.Write: %v", err)
}
}
mc.Set(&memcache.Item{
Key: "nghttpx:tls-ticket-key",
Value: buf.Bytes(),
Expiration: int32((*interval) + 300),
})
select {
case <-time.After(time.Duration(*interval) * time.Second):
}
// rotate keys. the last key is now encryption key.
// generate new key and append it to the last, so that
// we can at least decrypt TLS ticket encrypted by new
// key on the host which does not get new key yet.
// keep at most past 11 keys as decryption only key
n := len(keys) + 1
if n > 13 {
n = 13
}
newKeys := make([][]byte, n)
newKeys[0] = keys[len(keys)-1]
copy(newKeys[1:], keys[0:n-2])
newKeys[n-1] = makeKey(keylen)
keys = newKeys
}
}

16
contrib/usr.sbin.nghttpx Normal file
View File

@@ -0,0 +1,16 @@
#include <tunables/global>
/usr/sbin/nghttpx {
#include <abstractions/base>
#include <abstractions/nameservice>
#include <abstractions/openssl>
capability setgid,
capability setuid,
/usr/sbin/nghttpx rmix, # allow to run itself
/etc/nghttpx/nghttpx.conf r, # allow to read the config file
/etc/ssl/** r, # give access to ssl keys
/{,var/}run/nghttpx.pid lw, # allow to store a pid file
}

354
doc/CMakeLists.txt Normal file
View File

@@ -0,0 +1,354 @@
# Generated documents
set(APIDOCS
macros.rst
enums.rst
types.rst
nghttp2_check_header_name.rst
nghttp2_check_header_value.rst
nghttp2_hd_deflate_bound.rst
nghttp2_hd_deflate_change_table_size.rst
nghttp2_hd_deflate_del.rst
nghttp2_hd_deflate_get_dynamic_table_size.rst
nghttp2_hd_deflate_get_max_dynamic_table_size.rst
nghttp2_hd_deflate_get_num_table_entries.rst
nghttp2_hd_deflate_get_table_entry.rst
nghttp2_hd_deflate_hd.rst
nghttp2_hd_deflate_hd_vec.rst
nghttp2_hd_deflate_new.rst
nghttp2_hd_deflate_new2.rst
nghttp2_hd_inflate_change_table_size.rst
nghttp2_hd_inflate_del.rst
nghttp2_hd_inflate_end_headers.rst
nghttp2_hd_inflate_get_dynamic_table_size.rst
nghttp2_hd_inflate_get_max_dynamic_table_size.rst
nghttp2_hd_inflate_get_num_table_entries.rst
nghttp2_hd_inflate_get_table_entry.rst
nghttp2_hd_inflate_hd.rst
nghttp2_hd_inflate_hd2.rst
nghttp2_hd_inflate_new.rst
nghttp2_hd_inflate_new2.rst
nghttp2_http2_strerror.rst
nghttp2_is_fatal.rst
nghttp2_nv_compare_name.rst
nghttp2_option_del.rst
nghttp2_option_new.rst
nghttp2_option_set_builtin_recv_extension_type.rst
nghttp2_option_set_max_deflate_dynamic_table_size.rst
nghttp2_option_set_max_reserved_remote_streams.rst
nghttp2_option_set_max_send_header_block_length.rst
nghttp2_option_set_no_auto_ping_ack.rst
nghttp2_option_set_no_auto_window_update.rst
nghttp2_option_set_no_http_messaging.rst
nghttp2_option_set_no_recv_client_magic.rst
nghttp2_option_set_peer_max_concurrent_streams.rst
nghttp2_option_set_user_recv_extension_type.rst
nghttp2_option_set_max_settings.rst
nghttp2_pack_settings_payload.rst
nghttp2_priority_spec_check_default.rst
nghttp2_priority_spec_default_init.rst
nghttp2_priority_spec_init.rst
nghttp2_rcbuf_decref.rst
nghttp2_rcbuf_get_buf.rst
nghttp2_rcbuf_incref.rst
nghttp2_rcbuf_is_static.rst
nghttp2_select_next_protocol.rst
nghttp2_session_callbacks_del.rst
nghttp2_session_callbacks_new.rst
nghttp2_session_callbacks_set_before_frame_send_callback.rst
nghttp2_session_callbacks_set_data_source_read_length_callback.rst
nghttp2_session_callbacks_set_error_callback.rst
nghttp2_session_callbacks_set_on_begin_frame_callback.rst
nghttp2_session_callbacks_set_on_begin_headers_callback.rst
nghttp2_session_callbacks_set_on_data_chunk_recv_callback.rst
nghttp2_session_callbacks_set_on_extension_chunk_recv_callback.rst
nghttp2_session_callbacks_set_on_frame_not_send_callback.rst
nghttp2_session_callbacks_set_on_frame_recv_callback.rst
nghttp2_session_callbacks_set_on_frame_send_callback.rst
nghttp2_session_callbacks_set_on_header_callback.rst
nghttp2_session_callbacks_set_on_header_callback2.rst
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback.rst
nghttp2_session_callbacks_set_on_invalid_header_callback.rst
nghttp2_session_callbacks_set_on_invalid_header_callback2.rst
nghttp2_session_callbacks_set_on_stream_close_callback.rst
nghttp2_session_callbacks_set_pack_extension_callback.rst
nghttp2_session_callbacks_set_recv_callback.rst
nghttp2_session_callbacks_set_select_padding_callback.rst
nghttp2_session_callbacks_set_send_callback.rst
nghttp2_session_callbacks_set_send_data_callback.rst
nghttp2_session_callbacks_set_unpack_extension_callback.rst
nghttp2_session_change_stream_priority.rst
nghttp2_session_check_request_allowed.rst
nghttp2_session_check_server_session.rst
nghttp2_session_client_new.rst
nghttp2_session_client_new2.rst
nghttp2_session_client_new3.rst
nghttp2_session_consume.rst
nghttp2_session_consume_connection.rst
nghttp2_session_consume_stream.rst
nghttp2_session_create_idle_stream.rst
nghttp2_session_del.rst
nghttp2_session_find_stream.rst
nghttp2_session_get_effective_local_window_size.rst
nghttp2_session_get_effective_recv_data_length.rst
nghttp2_session_get_hd_deflate_dynamic_table_size.rst
nghttp2_session_get_hd_inflate_dynamic_table_size.rst
nghttp2_session_get_last_proc_stream_id.rst
nghttp2_session_get_local_settings.rst
nghttp2_session_get_local_window_size.rst
nghttp2_session_get_next_stream_id.rst
nghttp2_session_get_outbound_queue_size.rst
nghttp2_session_get_remote_settings.rst
nghttp2_session_get_remote_window_size.rst
nghttp2_session_get_root_stream.rst
nghttp2_session_get_stream_effective_local_window_size.rst
nghttp2_session_get_stream_effective_recv_data_length.rst
nghttp2_session_get_stream_local_close.rst
nghttp2_session_get_stream_local_window_size.rst
nghttp2_session_get_stream_remote_close.rst
nghttp2_session_get_stream_remote_window_size.rst
nghttp2_session_get_stream_user_data.rst
nghttp2_session_mem_recv.rst
nghttp2_session_mem_send.rst
nghttp2_session_recv.rst
nghttp2_session_resume_data.rst
nghttp2_session_send.rst
nghttp2_session_server_new.rst
nghttp2_session_server_new2.rst
nghttp2_session_server_new3.rst
nghttp2_session_set_local_window_size.rst
nghttp2_session_set_next_stream_id.rst
nghttp2_session_set_stream_user_data.rst
nghttp2_session_terminate_session.rst
nghttp2_session_terminate_session2.rst
nghttp2_session_upgrade.rst
nghttp2_session_upgrade2.rst
nghttp2_session_want_read.rst
nghttp2_session_want_write.rst
nghttp2_set_debug_vprintf_callback.rst
nghttp2_stream_get_first_child.rst
nghttp2_stream_get_next_sibling.rst
nghttp2_stream_get_parent.rst
nghttp2_stream_get_previous_sibling.rst
nghttp2_stream_get_state.rst
nghttp2_stream_get_sum_dependency_weight.rst
nghttp2_stream_get_weight.rst
nghttp2_strerror.rst
nghttp2_submit_altsvc.rst
nghttp2_submit_data.rst
nghttp2_submit_extension.rst
nghttp2_submit_goaway.rst
nghttp2_submit_headers.rst
nghttp2_submit_ping.rst
nghttp2_submit_priority.rst
nghttp2_submit_push_promise.rst
nghttp2_submit_request.rst
nghttp2_submit_response.rst
nghttp2_submit_rst_stream.rst
nghttp2_submit_settings.rst
nghttp2_submit_shutdown_notice.rst
nghttp2_submit_trailer.rst
nghttp2_submit_window_update.rst
nghttp2_version.rst
)
set(MAN_PAGES
nghttp.1
nghttpd.1
nghttpx.1
h2load.1
)
# Other .rst files from the source tree that need to be copied
# XXX move them to sources/ and create .in files?
set(RST_FILES
README.rst
programmers-guide.rst
nghttp.1.rst
nghttpd.1.rst
nghttpx.1.rst
h2load.1.rst
)
# XXX unused for now
set(EXTRA_DIST
mkapiref.py
${RST_FILES}
${APIDOCS}
sources/index.rst
sources/tutorial-client.rst
sources/tutorial-server.rst
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/sphinxcontrib/LICENSE.rubydomain
_exts/sphinxcontrib/__init__.py
_exts/sphinxcontrib/rubydomain.py
_themes/sphinx_rtd_theme/__init__.py
_themes/sphinx_rtd_theme/breadcrumbs.html
_themes/sphinx_rtd_theme/footer.html
_themes/sphinx_rtd_theme/layout.html
_themes/sphinx_rtd_theme/layout_old.html
_themes/sphinx_rtd_theme/search.html
_themes/sphinx_rtd_theme/searchbox.html
_themes/sphinx_rtd_theme/static/css/badge_only.css
_themes/sphinx_rtd_theme/static/css/theme.css
_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff
_themes/sphinx_rtd_theme/static/js/theme.js
_themes/sphinx_rtd_theme/theme.conf
_themes/sphinx_rtd_theme/versions.html
${MAN_PAGES}
bash_completion/nghttp
bash_completion/nghttpd
bash_completion/nghttpx
bash_completion/h2load
)
# Based on Makefile for Sphinx documentation
# You can set these variables from the command line.
set(SPHINXOPTS)
set(SPHINXBUILD sphinx-build)
set(PAPER)
set(BUILDDIR manual)
# Internal variables.
set(PAPEROPT_a4 -D latex_paper_size=a4)
set(PAPEROPT_letter -D latex_paper_size=letter)
set(ALLSPHINXOPTS -d ${BUILDDIR}/doctrees ${PAPEROPT_${PAPER}} ${SPHINXOPTS} .)
# "Please use `make <target>' where <target> is one of"
# " html to make standalone HTML files"
# " dirhtml to make HTML files named index.html in directories"
# " singlehtml to make a single large HTML file"
# " pickle to make pickle files"
# " json to make JSON files"
# " htmlhelp to make HTML files and a HTML help project"
# " qthelp to make HTML files and a qthelp project"
# " devhelp to make HTML files and a Devhelp project"
# " epub to make an epub"
# " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
# " latexpdf to make LaTeX files and run them through pdflatex"
# " text to make text files"
# " man to make manual pages"
# " changes to make an overview of all changed/added/deprecated items"
# " linkcheck to check all external links for integrity"
# " doctest to run all doctests embedded in the documentation (if enabled)"
# Copy files for out-of-tree builds
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
set(RST_BUILD_FILES)
foreach(rstfile IN LISTS RST_FILES)
set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${rstfile}")
add_custom_command(OUTPUT "${outfile}"
COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}" "${outfile}"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}"
)
list(APPEND RST_BUILD_FILES "${outfile}")
endforeach()
else()
set(RST_BUILD_FILES "${RST_FILES}")
endif()
set(apiref_SOURCES
${CMAKE_BINARY_DIR}/lib/includes/nghttp2/nghttp2ver.h
${CMAKE_SOURCE_DIR}/lib/includes/nghttp2/nghttp2.h
)
# Generates apiref.rst and other files
add_custom_command(
OUTPUT
apiref.rst
${APIDOCS}
COMMAND
"${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkapiref.py"
apiref.rst macros.rst enums.rst types.rst .
${apiref_SOURCES}
DEPENDS
${RST_BUILD_FILES}
${apiref_SOURCES}
)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${BUILDDIR}")
# Invokes sphinx-build and prints the given messages when completed
function(sphinxbuild builder)
set(echo_commands)
foreach(message IN LISTS ARGN)
list(APPEND echo_commands COMMAND ${CMAKE_COMMAND} -E echo "${message}")
endforeach()
add_custom_target(${builder}
COMMAND "${SPHINXBUILD}" -b ${builder} ${ALLSPHINXOPTS} "${BUILDDIR}/${builder}"
COMMAND ${CMAKE_COMMAND} -E echo
${echo_commands}
VERBATIM
DEPENDS apiref.rst
)
endfunction()
foreach(builder html dirhtml singlehtml)
sphinxbuild(${builder}
"Build finished. The HTML pages are in ${BUILDDIR}/${builder}.")
endforeach()
sphinxbuild(pickle "Build finished; now you can process the pickle files.")
sphinxbuild(json "Build finished; now you can process the JSON files.")
sphinxbuild(htmlhelp
"Build finished; now you can run HTML Help Workshop with the"
".hhp project file in ${BUILDDIR}/htmlhelp."
)
sphinxbuild(qthelp
"Build finished; now you can run \"qcollectiongenerator\" with the"
".qhcp project file in ${BUILDDIR}/qthelp, like this:"
"# qcollectiongenerator ${BUILDDIR}/qthelp/nghttp2.qhcp"
"To view the help file:"
"# assistant -collectionFile ${BUILDDIR}/qthelp/nghttp2.qhc"
)
sphinxbuild(devhelp
"Build finished."
"To view the help file:"
"# mkdir -p ~/.local/share/devhelp/nghttp2"
"# ln -s ${BUILDDIR}/devhelp ~/.local/share/devhelp/nghttp2"
"# devhelp"
)
sphinxbuild(epub "Build finished. The epub file is in ${BUILDDIR}/epub.")
sphinxbuild(latex
"Build finished; the LaTeX files are in ${BUILDDIR}/latex."
"Run `make' in that directory to run these through (pdf)latex"
"(use `make latexpdf' here to do that automatically)."
)
# Invoke the Makefile generated by sphinx
add_custom_target(latexpdf
COMMAND ${CMAKE_COMMAND} -E echo "Running LaTeX files through pdflatex..."
COMMAND make -C "${BUILDDIR}/latex" all-pdf
COMMAND ${CMAKE_COMMAND} -E echo "pdflatex finished; the PDF files are in ${BUILDDIR}/latex."
DEPENDS latex
)
sphinxbuild(text "Build finished. The text files are in ${BUILDDIR}/text.")
sphinxbuild(man "Build finished. The manual pages are in ${BUILDDIR}/man.")
sphinxbuild(changes "The overview file is in ${BUILDDIR}/changes.")
sphinxbuild(linkcheck
"Link check complete; look for any errors in the above output"
"or in ${BUILDDIR}/linkcheck/output.txt."
)
sphinxbuild(doctest
"Testing of doctests in the sources finished, look at the"
"results in ${BUILDDIR}/doctest/output.txt."
)
foreach(_man_page IN LISTS MAN_PAGES)
install(FILES ${_man_page}
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
)
endforeach()

View File

@@ -24,71 +24,114 @@
man_MANS = nghttp.1 nghttpd.1 nghttpx.1 h2load.1
APIDOCS= \
apiref.rst \
macros.rst \
enums.rst \
types.rst \
nghttp2_check_authority.rst \
nghttp2_check_header_name.rst \
nghttp2_check_header_value.rst \
nghttp2_hd_deflate_bound.rst \
nghttp2_hd_deflate_change_table_size.rst \
nghttp2_hd_deflate_del.rst \
nghttp2_hd_deflate_get_dynamic_table_size.rst \
nghttp2_hd_deflate_get_max_dynamic_table_size.rst \
nghttp2_hd_deflate_get_num_table_entries.rst \
nghttp2_hd_deflate_get_table_entry.rst \
nghttp2_hd_deflate_hd.rst \
nghttp2_hd_deflate_hd_vec.rst \
nghttp2_hd_deflate_new.rst \
nghttp2_hd_deflate_new2.rst \
nghttp2_hd_inflate_change_table_size.rst \
nghttp2_hd_inflate_del.rst \
nghttp2_hd_inflate_end_headers.rst \
nghttp2_hd_inflate_get_dynamic_table_size.rst \
nghttp2_hd_inflate_get_max_dynamic_table_size.rst \
nghttp2_hd_inflate_get_num_table_entries.rst \
nghttp2_hd_inflate_get_table_entry.rst \
nghttp2_hd_inflate_hd.rst \
nghttp2_hd_inflate_hd2.rst \
nghttp2_hd_inflate_new.rst \
nghttp2_hd_inflate_new2.rst \
nghttp2_http2_strerror.rst \
nghttp2_is_fatal.rst \
nghttp2_nv_compare_name.rst \
nghttp2_option_del.rst \
nghttp2_option_new.rst \
nghttp2_option_set_builtin_recv_extension_type.rst \
nghttp2_option_set_max_deflate_dynamic_table_size.rst \
nghttp2_option_set_max_reserved_remote_streams.rst \
nghttp2_option_set_max_send_header_block_length.rst \
nghttp2_option_set_no_auto_ping_ack.rst \
nghttp2_option_set_no_auto_window_update.rst \
nghttp2_option_set_no_closed_streams.rst \
nghttp2_option_set_no_http_messaging.rst \
nghttp2_option_set_peer_max_concurrent_streams.rst \
nghttp2_option_set_no_recv_client_magic.rst \
nghttp2_option_set_peer_max_concurrent_streams.rst \
nghttp2_option_set_user_recv_extension_type.rst \
nghttp2_option_set_max_outbound_ack.rst \
nghttp2_option_set_max_settings.rst \
nghttp2_pack_settings_payload.rst \
nghttp2_priority_spec_check_default.rst \
nghttp2_priority_spec_default_init.rst \
nghttp2_priority_spec_init.rst \
nghttp2_rcbuf_decref.rst \
nghttp2_rcbuf_get_buf.rst \
nghttp2_rcbuf_incref.rst \
nghttp2_rcbuf_is_static.rst \
nghttp2_select_next_protocol.rst \
nghttp2_session_callbacks_del.rst \
nghttp2_session_callbacks_new.rst \
nghttp2_session_callbacks_set_before_frame_send_callback.rst \
nghttp2_session_callbacks_set_data_source_read_length_callback.rst \
nghttp2_session_callbacks_set_error_callback.rst \
nghttp2_session_callbacks_set_error_callback2.rst \
nghttp2_session_callbacks_set_on_begin_frame_callback.rst \
nghttp2_session_callbacks_set_on_begin_headers_callback.rst \
nghttp2_session_callbacks_set_on_data_chunk_recv_callback.rst \
nghttp2_session_callbacks_set_on_extension_chunk_recv_callback.rst \
nghttp2_session_callbacks_set_on_frame_not_send_callback.rst \
nghttp2_session_callbacks_set_on_frame_recv_callback.rst \
nghttp2_session_callbacks_set_on_frame_send_callback.rst \
nghttp2_session_callbacks_set_on_header_callback.rst \
nghttp2_session_callbacks_set_on_header_callback2.rst \
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback.rst \
nghttp2_session_callbacks_set_on_invalid_header_callback.rst \
nghttp2_session_callbacks_set_on_invalid_header_callback2.rst \
nghttp2_session_callbacks_set_on_stream_close_callback.rst \
nghttp2_session_callbacks_set_pack_extension_callback.rst \
nghttp2_session_callbacks_set_recv_callback.rst \
nghttp2_session_callbacks_set_select_padding_callback.rst \
nghttp2_session_callbacks_set_send_callback.rst \
nghttp2_session_callbacks_set_send_data_callback.rst \
nghttp2_session_callbacks_set_unpack_extension_callback.rst \
nghttp2_session_change_stream_priority.rst \
nghttp2_session_check_request_allowed.rst \
nghttp2_session_check_server_session.rst \
nghttp2_session_client_new.rst \
nghttp2_session_client_new2.rst \
nghttp2_session_client_new3.rst \
nghttp2_session_consume.rst \
nghttp2_session_consume_connection.rst \
nghttp2_session_consume_stream.rst \
nghttp2_session_create_idle_stream.rst \
nghttp2_session_del.rst \
nghttp2_session_find_stream.rst \
nghttp2_session_get_effective_local_window_size.rst \
nghttp2_session_get_effective_recv_data_length.rst \
nghttp2_session_get_hd_deflate_dynamic_table_size.rst \
nghttp2_session_get_hd_inflate_dynamic_table_size.rst \
nghttp2_session_get_last_proc_stream_id.rst \
nghttp2_session_get_local_settings.rst \
nghttp2_session_get_local_window_size.rst \
nghttp2_session_get_next_stream_id.rst \
nghttp2_session_get_outbound_queue_size.rst \
nghttp2_session_get_remote_settings.rst \
nghttp2_session_get_remote_window_size.rst \
nghttp2_session_get_root_stream.rst \
nghttp2_session_get_stream_effective_local_window_size.rst \
nghttp2_session_get_stream_effective_recv_data_length.rst \
nghttp2_session_get_stream_local_close.rst \
nghttp2_session_get_stream_local_window_size.rst \
nghttp2_session_get_stream_remote_close.rst \
nghttp2_session_get_stream_remote_window_size.rst \
nghttp2_session_get_stream_user_data.rst \
@@ -100,17 +143,31 @@ APIDOCS= \
nghttp2_session_server_new.rst \
nghttp2_session_server_new2.rst \
nghttp2_session_server_new3.rst \
nghttp2_session_set_local_window_size.rst \
nghttp2_session_set_next_stream_id.rst \
nghttp2_session_set_stream_user_data.rst \
nghttp2_session_set_user_data.rst \
nghttp2_session_terminate_session.rst \
nghttp2_session_terminate_session2.rst \
nghttp2_session_upgrade.rst \
nghttp2_session_upgrade2.rst \
nghttp2_session_want_read.rst \
nghttp2_session_want_write.rst \
nghttp2_set_debug_vprintf_callback.rst \
nghttp2_stream_get_first_child.rst \
nghttp2_stream_get_next_sibling.rst \
nghttp2_stream_get_parent.rst \
nghttp2_stream_get_previous_sibling.rst \
nghttp2_stream_get_state.rst \
nghttp2_stream_get_sum_dependency_weight.rst \
nghttp2_stream_get_weight.rst \
nghttp2_strerror.rst \
nghttp2_submit_altsvc.rst \
nghttp2_submit_data.rst \
nghttp2_submit_extension.rst \
nghttp2_submit_goaway.rst \
nghttp2_submit_headers.rst \
nghttp2_submit_origin.rst \
nghttp2_submit_ping.rst \
nghttp2_submit_priority.rst \
nghttp2_submit_push_promise.rst \
@@ -123,15 +180,19 @@ APIDOCS= \
nghttp2_submit_window_update.rst \
nghttp2_version.rst
EXTRA_DIST = \
mkapiref.py \
RST_FILES = \
README.rst \
programmers-guide.rst \
$(APIDOCS) \
nghttp.1.rst \
nghttpd.1.rst \
nghttpx.1.rst \
h2load.1.rst \
h2load.1.rst
EXTRA_DIST = \
CMakeLists.txt \
mkapiref.py \
$(RST_FILES) \
$(APIDOCS) \
sources/index.rst \
sources/tutorial-client.rst \
sources/tutorial-server.rst \
@@ -142,20 +203,59 @@ EXTRA_DIST = \
sources/python-apiref.rst \
sources/building-android-binary.rst \
sources/contribute.rst \
sources/security.rst \
_exts/sphinxcontrib/LICENSE.rubydomain \
_exts/sphinxcontrib/__init__.py \
_exts/sphinxcontrib/rubydomain.py \
_themes/sphinx_rtd_theme/__init__.py \
_themes/sphinx_rtd_theme/breadcrumbs.html \
_themes/sphinx_rtd_theme/footer.html \
_themes/sphinx_rtd_theme/layout.html \
_themes/sphinx_rtd_theme/layout_old.html \
_themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/sphinx.pot \
_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.mo \
_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po \
_themes/sphinx_rtd_theme/search.html \
_themes/sphinx_rtd_theme/searchbox.html \
_themes/sphinx_rtd_theme/static/css/badge_only.css \
_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff \
_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff2 \
_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff \
_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff2 \
_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.eot \
_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.svg \
_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.ttf \
_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff \
_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff2 \
_themes/sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff \
_themes/sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff2 \
_themes/sphinx_rtd_theme/static/css/fonts/lato-bold.woff \
_themes/sphinx_rtd_theme/static/css/fonts/lato-bold.woff2 \
_themes/sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff \
_themes/sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff2 \
_themes/sphinx_rtd_theme/static/css/fonts/lato-normal.woff \
_themes/sphinx_rtd_theme/static/css/fonts/lato-normal.woff2 \
_themes/sphinx_rtd_theme/static/css/theme.css \
_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf \
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot \
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg \
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf \
_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff \
_themes/sphinx_rtd_theme/static/js/badge_only.js \
_themes/sphinx_rtd_theme/static/js/theme.js \
_themes/sphinx_rtd_theme/theme.conf \
_themes/sphinx_rtd_theme/versions.html \
@@ -200,30 +300,19 @@ help:
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
apiref.rst macros.rst enums.rst types.rst: \
apiref.rst: \
$(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \
$(top_builddir)/lib/includes/nghttp2/nghttp2.h
$(top_srcdir)/lib/includes/nghttp2/nghttp2.h
for i in $(RST_FILES); do [ -e $(builddir)/$$i ] || cp $(srcdir)/$$i $(builddir); done
$(PYTHON) $(top_srcdir)/doc/mkapiref.py \
$@ macros.rst enums.rst types.rst . $^
apiref.rst macros.rst enums.rst types.rst . $^
# Inspired by
# http://www.gnu.org/savannah-checkouts/gnu/automake/manual/html_node/Multiple-Outputs.html
apidoc.stamp: $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \
$(top_builddir)/lib/includes/nghttp2/nghttp2.h
@rm -f apidoc.tmp
@touch apidoc.tmp
$(PYTHON) $(top_srcdir)/doc/mkapiref.py \
$@ macros.rst enums.rst types.rst . $^
@mv -f apidoc.tmp $@
$(APIDOC): apidoc.stamp
## Recover from the removal of $@
@if test -f $@; then :; else \
rm -f apidoc.stamp; \
$(MAKE) $(AM_MAKEFLAGS) apidoc.stamp; \
fi
$(APIDOCS): apiref.rst
clean-local:
-rm $(APIDOCS)
if [ $(srcdir) != $(builddir) ]; then for i in $(RST_FILES); do rm -f $(builddir)/$$i; done fi
-rm -f apiref.rst
-rm -f $(APIDOCS)
-rm -rf $(BUILDDIR)/*
html-local: apiref.rst

View File

@@ -22,7 +22,7 @@ starts with ``/**``. In other words, it only processes the comment
block starting ``/**``. The comment block must end with ``*/``. The
``mkapiref.py`` requires that which type of the object this comment
block refers to. To specify the type of the object, the next line
must contain the so-caled action keyword. Currently, the following
must contain the so-called action keyword. Currently, the following
action keywords are supported: ``@function``, ``@functypedef``,
``@enum``, ``@struct`` and ``@union``. The following sections
describes each action keyword.

View File

@@ -0,0 +1,28 @@
If not otherwise noted, the extensions in this package are licensed
under the following license.
Copyright (c) 2010 by the contributors (see AUTHORS file).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
"""
sphinxcontrib
~~~~~~~~~~~~~
This package is a namespace package that contains all extensions
distributed in the ``sphinx-contrib`` distribution.
:copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
__import__('pkg_resources').declare_namespace(__name__)

View File

@@ -0,0 +1,703 @@
# -*- coding: utf-8 -*-
"""
sphinx.domains.ruby
~~~~~~~~~~~~~~~~~~~
The Ruby domain.
:copyright: Copyright 2010 by SHIBUKAWA Yoshiki
:license: BSD, see LICENSE for details.
"""
import re
from docutils import nodes
from docutils.parsers.rst import directives
from docutils.parsers.rst import Directive
from sphinx import addnodes
from sphinx import version_info
from sphinx.roles import XRefRole
from sphinx.locale import _
from sphinx.domains import Domain, ObjType, Index
from sphinx.directives import ObjectDescription
from sphinx.util.nodes import make_refnode
from sphinx.util.docfields import Field, GroupedField, TypedField
# REs for Ruby signatures
rb_sig_re = re.compile(
r'''^ ([\w.]*\.)? # class name(s)
(\$?\w+\??!?) \s* # thing name
(?: \((.*)\) # optional: arguments
(?:\s* -> \s* (.*))? # return annotation
)? $ # and nothing more
''', re.VERBOSE)
rb_paramlist_re = re.compile(r'([\[\],])') # split at '[', ']' and ','
separators = {
'method':'#', 'attr_reader':'#', 'attr_writer':'#', 'attr_accessor':'#',
'function':'.', 'classmethod':'.', 'class':'::', 'module':'::',
'global':'', 'const':'::'}
rb_separator = re.compile(r"(?:\w+)?(?:::)?(?:\.)?(?:#)?")
def _iteritems(d):
for k in d:
yield k, d[k]
def ruby_rsplit(fullname):
items = [item for item in rb_separator.findall(fullname)]
return ''.join(items[:-2]), items[-1]
class RubyObject(ObjectDescription):
"""
Description of a general Ruby object.
"""
option_spec = {
'noindex': directives.flag,
'module': directives.unchanged,
}
doc_field_types = [
TypedField('parameter', label=_('Parameters'),
names=('param', 'parameter', 'arg', 'argument'),
typerolename='obj', typenames=('paramtype', 'type')),
TypedField('variable', label=_('Variables'), rolename='obj',
names=('var', 'ivar', 'cvar'),
typerolename='obj', typenames=('vartype',)),
GroupedField('exceptions', label=_('Raises'), rolename='exc',
names=('raises', 'raise', 'exception', 'except'),
can_collapse=True),
Field('returnvalue', label=_('Returns'), has_arg=False,
names=('returns', 'return')),
Field('returntype', label=_('Return type'), has_arg=False,
names=('rtype',)),
]
def get_signature_prefix(self, sig):
"""
May return a prefix to put before the object name in the signature.
"""
return ''
def needs_arglist(self):
"""
May return true if an empty argument list is to be generated even if
the document contains none.
"""
return False
def handle_signature(self, sig, signode):
"""
Transform a Ruby signature into RST nodes.
Returns (fully qualified name of the thing, classname if any).
If inside a class, the current class name is handled intelligently:
* it is stripped from the displayed name if present
* it is added to the full name (return value) if not present
"""
m = rb_sig_re.match(sig)
if m is None:
raise ValueError
name_prefix, name, arglist, retann = m.groups()
if not name_prefix:
name_prefix = ""
# determine module and class name (if applicable), as well as full name
modname = self.options.get(
'module', self.env.temp_data.get('rb:module'))
classname = self.env.temp_data.get('rb:class')
if self.objtype == 'global':
add_module = False
modname = None
classname = None
fullname = name
elif classname:
add_module = False
if name_prefix and name_prefix.startswith(classname):
fullname = name_prefix + name
# class name is given again in the signature
name_prefix = name_prefix[len(classname):].lstrip('.')
else:
separator = separators[self.objtype]
fullname = classname + separator + name_prefix + name
else:
add_module = True
if name_prefix:
classname = name_prefix.rstrip('.')
fullname = name_prefix + name
else:
classname = ''
fullname = name
signode['module'] = modname
signode['class'] = self.class_name = classname
signode['fullname'] = fullname
sig_prefix = self.get_signature_prefix(sig)
if sig_prefix:
signode += addnodes.desc_annotation(sig_prefix, sig_prefix)
if name_prefix:
signode += addnodes.desc_addname(name_prefix, name_prefix)
# exceptions are a special case, since they are documented in the
# 'exceptions' module.
elif add_module and self.env.config.add_module_names:
if self.objtype == 'global':
nodetext = ''
signode += addnodes.desc_addname(nodetext, nodetext)
else:
modname = self.options.get(
'module', self.env.temp_data.get('rb:module'))
if modname and modname != 'exceptions':
nodetext = modname + separators[self.objtype]
signode += addnodes.desc_addname(nodetext, nodetext)
signode += addnodes.desc_name(name, name)
if not arglist:
if self.needs_arglist():
# for callables, add an empty parameter list
signode += addnodes.desc_parameterlist()
if retann:
signode += addnodes.desc_returns(retann, retann)
return fullname, name_prefix
signode += addnodes.desc_parameterlist()
stack = [signode[-1]]
for token in rb_paramlist_re.split(arglist):
if token == '[':
opt = addnodes.desc_optional()
stack[-1] += opt
stack.append(opt)
elif token == ']':
try:
stack.pop()
except IndexError:
raise ValueError
elif not token or token == ',' or token.isspace():
pass
else:
token = token.strip()
stack[-1] += addnodes.desc_parameter(token, token)
if len(stack) != 1:
raise ValueError
if retann:
signode += addnodes.desc_returns(retann, retann)
return fullname, name_prefix
def get_index_text(self, modname, name):
"""
Return the text for the index entry of the object.
"""
raise NotImplementedError('must be implemented in subclasses')
def _is_class_member(self):
return self.objtype.endswith('method') or self.objtype.startswith('attr')
def add_target_and_index(self, name_cls, sig, signode):
if self.objtype == 'global':
modname = ''
else:
modname = self.options.get(
'module', self.env.temp_data.get('rb:module'))
separator = separators[self.objtype]
if self._is_class_member():
if signode['class']:
prefix = modname and modname + '::' or ''
else:
prefix = modname and modname + separator or ''
else:
prefix = modname and modname + separator or ''
fullname = prefix + name_cls[0]
# note target
if fullname not in self.state.document.ids:
signode['names'].append(fullname)
signode['ids'].append(fullname)
signode['first'] = (not self.names)
self.state.document.note_explicit_target(signode)
objects = self.env.domaindata['rb']['objects']
if fullname in objects:
self.env.warn(
self.env.docname,
'duplicate object description of %s, ' % fullname +
'other instance in ' +
self.env.doc2path(objects[fullname][0]),
self.lineno)
objects[fullname] = (self.env.docname, self.objtype)
indextext = self.get_index_text(modname, name_cls)
if indextext:
self.indexnode['entries'].append(
_make_index('single', indextext, fullname, fullname))
def before_content(self):
# needed for automatic qualification of members (reset in subclasses)
self.clsname_set = False
def after_content(self):
if self.clsname_set:
self.env.temp_data['rb:class'] = None
class RubyModulelevel(RubyObject):
"""
Description of an object on module level (functions, data).
"""
def needs_arglist(self):
return self.objtype == 'function'
def get_index_text(self, modname, name_cls):
if self.objtype == 'function':
if not modname:
return _('%s() (global function)') % name_cls[0]
return _('%s() (module function in %s)') % (name_cls[0], modname)
else:
return ''
class RubyGloballevel(RubyObject):
"""
Description of an object on module level (functions, data).
"""
def get_index_text(self, modname, name_cls):
if self.objtype == 'global':
return _('%s (global variable)') % name_cls[0]
else:
return ''
class RubyEverywhere(RubyObject):
"""
Description of a class member (methods, attributes).
"""
def needs_arglist(self):
return self.objtype == 'method'
def get_index_text(self, modname, name_cls):
name, cls = name_cls
add_modules = self.env.config.add_module_names
if self.objtype == 'method':
try:
clsname, methname = ruby_rsplit(name)
except ValueError:
if modname:
return _('%s() (in module %s)') % (name, modname)
else:
return '%s()' % name
if modname and add_modules:
return _('%s() (%s::%s method)') % (methname, modname,
clsname)
else:
return _('%s() (%s method)') % (methname, clsname)
else:
return ''
class RubyClasslike(RubyObject):
"""
Description of a class-like object (classes, exceptions).
"""
def get_signature_prefix(self, sig):
return self.objtype + ' '
def get_index_text(self, modname, name_cls):
if self.objtype == 'class':
if not modname:
return _('%s (class)') % name_cls[0]
return _('%s (class in %s)') % (name_cls[0], modname)
elif self.objtype == 'exception':
return name_cls[0]
else:
return ''
def before_content(self):
RubyObject.before_content(self)
if self.names:
self.env.temp_data['rb:class'] = self.names[0][0]
self.clsname_set = True
class RubyClassmember(RubyObject):
"""
Description of a class member (methods, attributes).
"""
def needs_arglist(self):
return self.objtype.endswith('method')
def get_signature_prefix(self, sig):
if self.objtype == 'classmethod':
return "classmethod %s." % self.class_name
elif self.objtype == 'attr_reader':
return "attribute [R] "
elif self.objtype == 'attr_writer':
return "attribute [W] "
elif self.objtype == 'attr_accessor':
return "attribute [R/W] "
return ''
def get_index_text(self, modname, name_cls):
name, cls = name_cls
add_modules = self.env.config.add_module_names
if self.objtype == 'classmethod':
try:
clsname, methname = ruby_rsplit(name)
except ValueError:
return '%s()' % name
if modname:
return _('%s() (%s.%s class method)') % (methname, modname,
clsname)
else:
return _('%s() (%s class method)') % (methname, clsname)
elif self.objtype.startswith('attr'):
try:
clsname, attrname = ruby_rsplit(name)
except ValueError:
return name
if modname and add_modules:
return _('%s (%s.%s attribute)') % (attrname, modname, clsname)
else:
return _('%s (%s attribute)') % (attrname, clsname)
else:
return ''
def before_content(self):
RubyObject.before_content(self)
lastname = self.names and self.names[-1][1]
if lastname and not self.env.temp_data.get('rb:class'):
self.env.temp_data['rb:class'] = lastname.strip('.')
self.clsname_set = True
class RubyModule(Directive):
"""
Directive to mark description of a new module.
"""
has_content = False
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = False
option_spec = {
'platform': lambda x: x,
'synopsis': lambda x: x,
'noindex': directives.flag,
'deprecated': directives.flag,
}
def run(self):
env = self.state.document.settings.env
modname = self.arguments[0].strip()
noindex = 'noindex' in self.options
env.temp_data['rb:module'] = modname
env.domaindata['rb']['modules'][modname] = \
(env.docname, self.options.get('synopsis', ''),
self.options.get('platform', ''), 'deprecated' in self.options)
targetnode = nodes.target('', '', ids=['module-' + modname], ismod=True)
self.state.document.note_explicit_target(targetnode)
ret = [targetnode]
# XXX this behavior of the module directive is a mess...
if 'platform' in self.options:
platform = self.options['platform']
node = nodes.paragraph()
node += nodes.emphasis('', _('Platforms: '))
node += nodes.Text(platform, platform)
ret.append(node)
# the synopsis isn't printed; in fact, it is only used in the
# modindex currently
if not noindex:
indextext = _('%s (module)') % modname
inode = addnodes.index(entries=[_make_index(
'single', indextext, 'module-' + modname, modname)])
ret.append(inode)
return ret
def _make_index(entrytype, entryname, target, ignored, key=None):
# Sphinx 1.4 introduced backward incompatible changes, it now
# requires 5 tuples. Last one is categorization key. See
# http://www.sphinx-doc.org/en/stable/extdev/nodes.html#sphinx.addnodes.index
if version_info >= (1, 4, 0, '', 0):
return (entrytype, entryname, target, ignored, key)
else:
return (entrytype, entryname, target, ignored)
class RubyCurrentModule(Directive):
"""
This directive is just to tell Sphinx that we're documenting
stuff in module foo, but links to module foo won't lead here.
"""
has_content = False
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}
def run(self):
env = self.state.document.settings.env
modname = self.arguments[0].strip()
if modname == 'None':
env.temp_data['rb:module'] = None
else:
env.temp_data['rb:module'] = modname
return []
class RubyXRefRole(XRefRole):
def process_link(self, env, refnode, has_explicit_title, title, target):
if not has_explicit_title:
title = title.lstrip('.') # only has a meaning for the target
title = title.lstrip('#')
if title.startswith("::"):
title = title[2:]
target = target.lstrip('~') # only has a meaning for the title
# if the first character is a tilde, don't display the module/class
# parts of the contents
if title[0:1] == '~':
m = re.search(r"(?:\.)?(?:#)?(?:::)?(.*)\Z", title)
if m:
title = m.group(1)
if not title.startswith("$"):
refnode['rb:module'] = env.temp_data.get('rb:module')
refnode['rb:class'] = env.temp_data.get('rb:class')
# if the first character is a dot, search more specific namespaces first
# else search builtins first
if target[0:1] == '.':
target = target[1:]
refnode['refspecific'] = True
return title, target
class RubyModuleIndex(Index):
"""
Index subclass to provide the Ruby module index.
"""
name = 'modindex'
localname = _('Ruby Module Index')
shortname = _('modules')
def generate(self, docnames=None):
content = {}
# list of prefixes to ignore
ignores = self.domain.env.config['modindex_common_prefix']
ignores = sorted(ignores, key=len, reverse=True)
# list of all modules, sorted by module name
modules = sorted(_iteritems(self.domain.data['modules']),
key=lambda x: x[0].lower())
# sort out collapsable modules
prev_modname = ''
num_toplevels = 0
for modname, (docname, synopsis, platforms, deprecated) in modules:
if docnames and docname not in docnames:
continue
for ignore in ignores:
if modname.startswith(ignore):
modname = modname[len(ignore):]
stripped = ignore
break
else:
stripped = ''
# we stripped the whole module name?
if not modname:
modname, stripped = stripped, ''
entries = content.setdefault(modname[0].lower(), [])
package = modname.split('::')[0]
if package != modname:
# it's a submodule
if prev_modname == package:
# first submodule - make parent a group head
entries[-1][1] = 1
elif not prev_modname.startswith(package):
# submodule without parent in list, add dummy entry
entries.append([stripped + package, 1, '', '', '', '', ''])
subtype = 2
else:
num_toplevels += 1
subtype = 0
qualifier = deprecated and _('Deprecated') or ''
entries.append([stripped + modname, subtype, docname,
'module-' + stripped + modname, platforms,
qualifier, synopsis])
prev_modname = modname
# apply heuristics when to collapse modindex at page load:
# only collapse if number of toplevel modules is larger than
# number of submodules
collapse = len(modules) - num_toplevels < num_toplevels
# sort by first letter
content = sorted(_iteritems(content))
return content, collapse
class RubyDomain(Domain):
"""Ruby language domain."""
name = 'rb'
label = 'Ruby'
object_types = {
'function': ObjType(_('function'), 'func', 'obj'),
'global': ObjType(_('global variable'), 'global', 'obj'),
'method': ObjType(_('method'), 'meth', 'obj'),
'class': ObjType(_('class'), 'class', 'obj'),
'exception': ObjType(_('exception'), 'exc', 'obj'),
'classmethod': ObjType(_('class method'), 'meth', 'obj'),
'attr_reader': ObjType(_('attribute'), 'attr', 'obj'),
'attr_writer': ObjType(_('attribute'), 'attr', 'obj'),
'attr_accessor': ObjType(_('attribute'), 'attr', 'obj'),
'const': ObjType(_('const'), 'const', 'obj'),
'module': ObjType(_('module'), 'mod', 'obj'),
}
directives = {
'function': RubyModulelevel,
'global': RubyGloballevel,
'method': RubyEverywhere,
'const': RubyEverywhere,
'class': RubyClasslike,
'exception': RubyClasslike,
'classmethod': RubyClassmember,
'attr_reader': RubyClassmember,
'attr_writer': RubyClassmember,
'attr_accessor': RubyClassmember,
'module': RubyModule,
'currentmodule': RubyCurrentModule,
}
roles = {
'func': RubyXRefRole(fix_parens=False),
'global':RubyXRefRole(),
'class': RubyXRefRole(),
'exc': RubyXRefRole(),
'meth': RubyXRefRole(fix_parens=False),
'attr': RubyXRefRole(),
'const': RubyXRefRole(),
'mod': RubyXRefRole(),
'obj': RubyXRefRole(),
}
initial_data = {
'objects': {}, # fullname -> docname, objtype
'modules': {}, # modname -> docname, synopsis, platform, deprecated
}
indices = [
RubyModuleIndex,
]
def clear_doc(self, docname):
for fullname, (fn, _) in list(self.data['objects'].items()):
if fn == docname:
del self.data['objects'][fullname]
for modname, (fn, _, _, _) in list(self.data['modules'].items()):
if fn == docname:
del self.data['modules'][modname]
def find_obj(self, env, modname, classname, name, type, searchorder=0):
"""
Find a Ruby object for "name", perhaps using the given module and/or
classname.
"""
# skip parens
if name[-2:] == '()':
name = name[:-2]
if not name:
return None, None
objects = self.data['objects']
newname = None
if searchorder == 1:
if modname and classname and \
modname + '::' + classname + '#' + name in objects:
newname = modname + '::' + classname + '#' + name
elif modname and classname and \
modname + '::' + classname + '.' + name in objects:
newname = modname + '::' + classname + '.' + name
elif modname and modname + '::' + name in objects:
newname = modname + '::' + name
elif modname and modname + '#' + name in objects:
newname = modname + '#' + name
elif modname and modname + '.' + name in objects:
newname = modname + '.' + name
elif classname and classname + '.' + name in objects:
newname = classname + '.' + name
elif classname and classname + '#' + name in objects:
newname = classname + '#' + name
elif name in objects:
newname = name
else:
if name in objects:
newname = name
elif classname and classname + '.' + name in objects:
newname = classname + '.' + name
elif classname and classname + '#' + name in objects:
newname = classname + '#' + name
elif modname and modname + '::' + name in objects:
newname = modname + '::' + name
elif modname and modname + '#' + name in objects:
newname = modname + '#' + name
elif modname and modname + '.' + name in objects:
newname = modname + '.' + name
elif modname and classname and \
modname + '::' + classname + '#' + name in objects:
newname = modname + '::' + classname + '#' + name
elif modname and classname and \
modname + '::' + classname + '.' + name in objects:
newname = modname + '::' + classname + '.' + name
# special case: object methods
elif type in ('func', 'meth') and '.' not in name and \
'object.' + name in objects:
newname = 'object.' + name
if newname is None:
return None, None
return newname, objects[newname]
def resolve_xref(self, env, fromdocname, builder,
typ, target, node, contnode):
if (typ == 'mod' or
typ == 'obj' and target in self.data['modules']):
docname, synopsis, platform, deprecated = \
self.data['modules'].get(target, ('','','', ''))
if not docname:
return None
else:
title = '%s%s%s' % ((platform and '(%s) ' % platform),
synopsis,
(deprecated and ' (deprecated)' or ''))
return make_refnode(builder, fromdocname, docname,
'module-' + target, contnode, title)
else:
modname = node.get('rb:module')
clsname = node.get('rb:class')
searchorder = node.hasattr('refspecific') and 1 or 0
name, obj = self.find_obj(env, modname, clsname,
target, typ, searchorder)
if not obj:
return None
else:
return make_refnode(builder, fromdocname, obj[0], name,
contnode, name)
def get_objects(self):
for modname, info in _iteritems(self.data['modules']):
yield (modname, modname, 'module', info[0], 'module-' + modname, 0)
for refname, (docname, type) in _iteritems(self.data['objects']):
yield (refname, refname, type, docname, refname, 1)
def setup(app):
app.add_domain(RubyDomain)

View File

@@ -1,17 +1,34 @@
"""Sphinx ReadTheDocs theme.
"""
Sphinx Read the Docs theme.
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
"""
import os
VERSION = (0, 1, 8)
from os import path
__version__ = ".".join(str(v) for v in VERSION)
import sphinx
__version__ = '0.5.0'
__version_full__ = __version__
def get_html_theme_path():
"""Return list of HTML theme paths."""
cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
return cur_dir
# 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 sphinx.version_info >= (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)
return {'parallel_read_safe': True, 'parallel_write_safe': True}

View File

@@ -1,23 +1,84 @@
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
{% if page_source_suffix %}
{% set suffix = page_source_suffix %}
{% else %}
{% set suffix = source_suffix %}
{% endif %}
{% if meta is defined and meta is not none %}
{% set check_meta = True %}
{% else %}
{% set check_meta = False %}
{% endif %}
{% if check_meta and 'github_url' in meta %}
{% set display_github = 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">
<ul class="wy-breadcrumbs">
<li><a href="{{ pathto(master_doc) }}">Docs</a> &raquo;</li>
{% for doc in parents %}
{% block breadcrumbs %}
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> &raquo;</li>
{% for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
{% endfor %}
<li>{{ title }}</li>
{% endfor %}
<li>{{ title }}</li>
{% endblock %}
{% block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside">
{% if pagename != "search" %}
{% if hasdoc(pagename) and display_vcs_links %}
{% if display_github %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ source_suffix }}" class="fa fa-github"> Edit on GitHub</a>
{% 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 %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ source_suffix }}" class="fa fa-bitbucket"> Edit on Bitbucket</a>
{% 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 %}
<!-- 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 }}{{ source_suffix }}">View page source</a>
<a href="{{ source_url_prefix }}{{ pagename }}{{ 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>
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{% endif %}
{% endif %}
</li>
{% 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 %}
</div>
{% endif %}
<hr/>
</div>

View File

@@ -1,11 +1,11 @@
<footer>
{% if next or prev %}
{% 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">Next <span class="fa fa-arrow-circle-right"></span></a>
<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" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<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 %}
</div>
{% endif %}
@@ -16,21 +16,48 @@
<p>
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{% set path = pathto('copyright') %}
{% set copyright = copyright|e %}
&copy; <a href="{{ path }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright }}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{% set copyright = copyright|e %}
&copy; {% trans %}Copyright{% endtrans %} {{ copyright }}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- if build_id and build_url %}
<span class="build">
{# 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>.
</span>
{%- endif %}
{%- if last_updated %}
<span class="lastupdated">
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
</span>
{%- endif %}
</p>
</div>
{%- if show_sphinx %}
{% trans %}Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}.
{% 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 #}
<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. #}
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
{%- endif %}
{%- block extrafooter %} {% endblock %}
</footer>

View File

@@ -6,10 +6,11 @@
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' %}
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<html class="{{ sphinx_writer }}" lang="{{ lang_attr }}" >
<head>
<meta charset="utf-8">
{{ metatags }}
@@ -18,125 +19,192 @@
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{% 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" />
{%- 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 %} />
{%- else %}
<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 %}
{# FAVICON #}
{% if favicon %}
<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 %}
{# CSS #}
{# OPENSEARCH #}
{% if not embedded %}
{% if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{# 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>
{%- for scriptfile in script_files %}
{{ js_tag(scriptfile) }}
{%- endfor %}
{% else %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'{{ url_root }}',
VERSION:'{{ release|e }}',
LANGUAGE:'{{ language }}',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }},
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{% endif %}
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{% endif %}
{# RTD hosts this file, so just load on non RTD builds #}
{% if not READTHEDOCS %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
{% endif %}
{% for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{% endfor %}
{% for cssfile in extra_css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{% endfor %}
{# OPENSEARCH #}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- endif %}
{%- endblock %}
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}"
href="{{ pathto('about') }}"/>
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}"
href="{{ pathto('genindex') }}"/>
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/>
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/>
{%- endif %}
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>
{%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/>
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/>
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/>
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
{# Keep modernizr in head - http://modernizr.com/docs/#installing #}
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<body class="wy-body-for-nav">
{% block extrabody %} {% endblock %}
<div class="wy-grid-for-nav">
{# SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
{% block sidebartitle %}
<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 %}
{% if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{% else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{% 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 #}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" />
{% endif %}
</a>
{% include "searchbox.html" %}
{% endblock %}
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{% block menu %}
{% set toctree = toctree(maxdepth=4, collapse=False, includehidden=True) %}
{% if toctree %}
{{ toctree }}
{% if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{% else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{% 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
#}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
{% endif %}
</a>
{% if theme_display_version %}
{%- set nav_version = version %}
{% if READTHEDOCS and current_version %}
{%- set nav_version = current_version %}
{% endif %}
{% if nav_version %}
<div class="version">
{{ nav_version }}
</div>
{% endif %}
{% endif %}
{% include "searchbox.html" %}
{% 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 %}
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
{% endif %}
{% endif %}
{% endblock %}
</div>
{% endblock %}
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
<nav class="wy-nav-top" aria-label="top navigation">
{% block mobile_nav %}
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
{% endblock %}
</nav>
{# PAGE CONTENT #}
<div class="wy-nav-content">
{%- block content %}
{% if theme_style_external_links|tobool %}
<div class="rst-content style-external-links">
{% else %}
<div class="rst-content">
{% endif %}
{% include "breadcrumbs.html" %}
<div role="main" class="document">
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
{%- block document %}
<div itemprop="articleBody">
{% block body %}{% endblock %}
</div>
{% if self.comments()|trim %}
<div class="articleComments">
{% block comments %}{% endblock %}
</div>
{% endif%}
</div>
{%- endblock %}
{% include "footer.html" %}
</div>
{%- endblock %}
</div>
</section>
@@ -144,35 +212,27 @@
</div>
{% include "versions.html" %}
{% if not embedded %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'{{ url_root }}',
VERSION:'{{ release|e }}',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{% endif %}
{# RTD hosts this file, so just load on non RTD builds #}
{% if not READTHEDOCS %}
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{% endif %}
{# STICKY NAVIGATION #}
{% if theme_sticky_navigation %}
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
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 %}
<!-- Theme Analytics -->
<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');
ga('create', '{{ theme_analytics_id }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
{% endif %}
{%- block footer %} {% endblock %}

View File

@@ -1,205 +0,0 @@
{#
basic/layout.html
~~~~~~~~~~~~~~~~~
Master layout template for Sphinx themes.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{%- endblock %}
{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(sidebars != []) %}
{%- set url_root = pathto('', 1) %}
{# XXX necessary? #}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- macro relbar() %}
<div class="related">
<h3>{{ _('Navigation') }}</h3>
<ul>
{%- for rellink in rellinks %}
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
{%- endfor %}
{%- block rootrellink %}
<li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
{%- endblock %}
{%- for parent in parents %}
<li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
{%- endfor %}
{%- block relbaritems %} {% endblock %}
</ul>
</div>
{%- endmacro %}
{%- macro sidebar() %}
{%- if render_sidebar %}
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- if sidebars != None %}
{#- new style sidebar: explicitly include/exclude templates #}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
{%- else %}
{#- old style sidebars: using blocks -- should be deprecated #}
{%- block sidebartoc %}
{%- include "localtoc.html" %}
{%- endblock %}
{%- block sidebarrel %}
{%- include "relations.html" %}
{%- endblock %}
{%- block sidebarsourcelink %}
{%- include "sourcelink.html" %}
{%- endblock %}
{%- if customsidebar %}
{%- include customsidebar %}
{%- endif %}
{%- block sidebarsearch %}
{%- include "searchbox.html" %}
{%- endblock %}
{%- endif %}
</div>
</div>
{%- endif %}
{%- endmacro %}
{%- macro script() %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ url_root }}',
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{%- endmacro %}
{%- macro css() %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
{%- endmacro %}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
{{ metatags }}
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
{{ css() }}
{%- if not embedded %}
{{ script() }}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif %}
{%- endif %}
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
{%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
</head>
<body>
{%- block header %}{% endblock %}
{%- block relbar1 %}{{ relbar() }}{% endblock %}
{%- block content %}
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
<div class="document">
{%- block document %}
<div class="documentwrapper">
{%- if render_sidebar %}
<div class="bodywrapper">
{%- endif %}
<div class="body">
{% block body %} {% endblock %}
</div>
{%- if render_sidebar %}
</div>
{%- endif %}
</div>
{%- endblock %}
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
<div class="clearer"></div>
</div>
{%- endblock %}
{%- block relbar2 %}{{ relbar() }}{% endblock %}
{%- block footer %}
<div class="footer">
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{%- if show_sphinx %}
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</div>
<p>asdf asdf asdf asdf 22</p>
{%- endblock %}
</body>
</html>

Binary file not shown.

View File

@@ -0,0 +1,143 @@
# 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:
# Tom Kunze <transifex.com@tomabrafix.de>, 2019
#
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"
"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"
"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: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "Auf GitHub bearbeiten"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Auf Bitbucket bearbeiten"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Auf GitLab bearbeiten"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
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"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Build"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
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
#, 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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "bereitgestellt von %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "%(docstitle)s durchsuchen"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Über diese Dokumentation"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Suche"
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Suchergebnisse"
#: sphinx_rtd_theme/search.html:39
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 ""
"Es wurden keine mit deiner Suchanfrage übereinstimmenden Dokumente gefunden."
" Achte darauf, dass alle Wörter richtig geschrieben sind und dass genug "
"Kategorien ausgewählt sind."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Dokumentation durchsuchen"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versionen"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "Auf Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
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"

Binary file not shown.

View File

@@ -0,0 +1,156 @@
# 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.
#
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"
"PO-Revision-Date: 2019-07-16 15:43-0600\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
"Language-Team: en <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\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"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
msgid "Previous"
msgstr ""
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr ""
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr ""
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr ""
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr ""
#. the variable "sphinx_web" is a link to the Sphinx project documentation with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr ""
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr ""
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr ""
#: sphinx_rtd_theme/layout.html:121
msgid "Documentation Home"
msgstr ""
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr ""
#: sphinx_rtd_theme/search.html:29
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
msgid "Search Results"
msgstr ""
#: sphinx_rtd_theme/search.html:39
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: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 ""
#~ msgid "Docs"
#~ msgstr ""
#~ msgid "Free document hosting provided by"
#~ msgstr ""

Binary file not shown.

View File

@@ -0,0 +1,164 @@
# 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>, 2019
# Leonardo J. Caballero G. <leonardocaballero@gmail.com>, 2020
#
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"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Leonardo J. Caballero G. <leonardocaballero@gmail.com>, 2020\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"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "Editar en GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Editar en Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Editar en GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
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"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Construido"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
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."
#. the variable "sphinx_web" is a link to the Sphinx project documentation
#. with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#, python-format
msgid "Built with %(sphinx_web)s using a"
msgstr "Construido 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "proporcionado por %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Buscar en %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Sobre esta documentación"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Índice"
#: sphinx_rtd_theme/layout.html:93 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:128
msgid "Logo"
msgstr "Logotipo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Resultados de la búsqueda"
#: sphinx_rtd_theme/search.html:39
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 ""
"Su búsqueda no coincide con ningún documento. Por favor, asegúrese de que "
"todas las palabras estén correctamente escritas y que usted haya "
"seleccionado las suficientes categorías."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Buscar documentos"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versiones"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Descargas"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "En Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
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"

Binary file not shown.

View File

@@ -0,0 +1,155 @@
# 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>, 2020
# Ivar Smolin <okul@linux.ee>, 2020
#
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"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Ivar Smolin <okul@linux.ee>, 2020\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"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "Muuda GitHubis"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Muuda Bitbucketis"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Muuda GitLabis"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
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"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Ehitus"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr "Redaktsioon"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
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
#, 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
msgid "theme"
msgstr "kujundusteema"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Otsi dokumendist %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Nende dokumentide kirjeldused"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Indeks"
#: sphinx_rtd_theme/layout.html:93 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:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Otsingu tulemused"
#: sphinx_rtd_theme/search.html:39
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 ""
"Sinu otsingule ei vastanud ükski dokument. Palun veendu, et kõik sisestatud "
"sõnad on õigesti kirjutatud ja sa oled valikud piisaval hulgal kategooriaid."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Otsi dokumente"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versioonid"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Allalaadimised"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "Saidil Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
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,154 @@
# 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:
# Radina Matic <radina.matic@gmail.com>, 2020
# Anthony <aj@ohess.org>, 2020
#
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"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Anthony <aj@ohess.org>, 2020\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"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "Éditer sur GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Éditer sur Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Éditer sur GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
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"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Compilation"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr "Révision"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
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
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "fourni par %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Rechercher dans %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "À propos de cette documentation"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Rechercher"
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Résultats de la recherche"
#: sphinx_rtd_theme/search.html:39
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 ""
"Votre recherche ne correspond à aucun document. Assurez-vous que tous les "
"mots sont correctement orthographiés et que vous avez sélectionné "
"suffisamment de catégories."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Rechercher docs"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versions"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Téléchargements"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
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,157 @@
# 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:
# Jesse Tan, 2019
#
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"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Jesse Tan, 2019\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"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "Bewerk op GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Bewerk op BitBucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Bewerk op GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
msgid "View page source"
msgstr "Bekijk paginabron"
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
msgid "Next"
msgstr "Volgende"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
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"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Bouwresultaat"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr "Revisie"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
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
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "geleverd door %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Zoek binnen %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Over deze documenten"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Zoek"
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Zoekresultaten"
#: sphinx_rtd_theme/search.html:39
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 ""
"Zoekpoging vond geen documenten. Zorg ervoor dat alle woorden correct zijn "
"gespeld en dat voldoende categorieën zijn geselecteerd."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Zoek in documentatie"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versies"
#: 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 "Op Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
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,159 @@
# 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:
# Rafael Fontenelle <rffontenelle@gmail.com>, 2020
#
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"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2020\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"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "Editar no GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Editar no Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Editar no GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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"
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
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"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Compilação"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr "Revisão"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
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
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "fornecido por %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Pesquisar em %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Sobre esses documentos"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Índice"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Pesquisar"
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Resultados da pesquisa"
#: sphinx_rtd_theme/search.html:39
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 correspondente. Verifique se "
"todas as palavras estão escritas corretamente e se você selecionou "
"categorias suficientes."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Pesquisar documentos"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versões"
#: 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 "No Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
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"

Binary file not shown.

View File

@@ -0,0 +1,158 @@
# 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:
# Dmitry Shachnev <mitya57@gmail.com>, 2019
# lvv83 <vlozhkin83@gmail.com>, 2019
#
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"
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
"Last-Translator: lvv83 <vlozhkin83@gmail.com>, 2019\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"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"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
msgid "Edit on GitHub"
msgstr "Редактировать на GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Редактировать на BitBucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Редактировать на GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
msgid "Previous"
msgstr "Предыдущая"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "Авторские права"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Сборка"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
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:52
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "предоставленной %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Поиск в %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Об этих документах"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Алфавитный указатель"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Поиск"
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr "Логотип"
#: sphinx_rtd_theme/search.html:29
msgid "Please activate JavaScript to enable the search functionality."
msgstr "Активируйте JavaScript, чтобы использовать функционал поиска."
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
msgid "Search Results"
msgstr "Результаты поиска"
#: sphinx_rtd_theme/search.html:39
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: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 "На Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "Домашняя страница проекта"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "Сборки"
#~ msgid "Docs"
#~ msgstr "Документация"
#~ msgid "Free document hosting provided by"
#~ msgstr "Бесплатный хостинг документов, предоставленный"

View File

@@ -0,0 +1,149 @@
# Translations template for sphinx_rtd_theme.
# Copyright (C) 2020 ORGANIZATION
# This file is distributed under the same license as the sphinx_rtd_theme
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
#
#, fuzzy
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"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr ""
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
msgid "Previous"
msgstr ""
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr ""
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr ""
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr ""
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr ""
#. the variable "sphinx_web" is a link to the Sphinx project documentation with
#. the text "Sphinx"
#: sphinx_rtd_theme/footer.html:52
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr ""
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr ""
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr ""
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr ""
#: sphinx_rtd_theme/layout.html:121
msgid "Documentation Home"
msgstr ""
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr ""
#: sphinx_rtd_theme/search.html:29
msgid "Please activate JavaScript to enable the search functionality."
msgstr ""
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
msgid "Search Results"
msgstr ""
#: sphinx_rtd_theme/search.html:39
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: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 ""

Binary file not shown.

View File

@@ -0,0 +1,158 @@
# 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:
# Daniel Holmberg <daniel.holmberg97@gmail.com>, 2020
#
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"
"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"
"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: sv\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "Editera på GitHub"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Editera på Bitbucket"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "Editera på GitLab"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
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"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Bygg"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr "Ändra"
#: sphinx_rtd_theme/footer.html:41
#, python-format
msgid "Last updated on %(last_updated)s."
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
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "erhållet av %(readthedocs_web)s"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Sök i %(docstitle)s"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Om dessa dokument"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Index"
#: sphinx_rtd_theme/layout.html:93 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:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Sökresultat"
#: sphinx_rtd_theme/search.html:39
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 ""
"Din sökning gav inga träffar. Var vänlig och se till att alla ord är rätt "
"stavade och att du har valt tillräckligt många kategorier."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Sök i dokumentationen"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Versioner"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "Nerladdningar"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "På Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "Projekt Hem"
#~ msgid "Docs"
#~ msgstr "Dokumentation"
#~ msgid "Free document hosting provided by"
#~ msgstr "Gratis dokumentations hysning erhållen av"

Binary file not shown.

View File

@@ -0,0 +1,147 @@
# 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:
# BouRock, 2020
#
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"
"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"
"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: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "GitHub'da Düzenle"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "Bitbucket'ta Düzenle"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "GitLab'ta Düzenle"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
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ı"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
msgstr "Oluşturma"
#. the phrase "revision" comes from Git, referring to a commit
#: sphinx_rtd_theme/footer.html:37
msgid "Revision"
msgstr "Gözden geçirme"
#: sphinx_rtd_theme/footer.html:41
#, python-format
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
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
#, 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
#, python-format
msgid "Search within %(docstitle)s"
msgstr "%(docstitle)s içinde ara"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "Bu belgeler hakkında"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "Dizin"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "Arama"
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
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
msgid "Search Results"
msgstr "Arama Sonuçları"
#: sphinx_rtd_theme/search.html:39
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 ""
"Aramanız hiçbir belgeyle eşleşmedi. Lütfen tüm kelimelerin doğru "
"yazıldığından ve yeterli kategori seçtiğinizden emin olun."
#: sphinx_rtd_theme/searchbox.html:4
msgid "Search docs"
msgstr "Belgeleri arayın"
#: sphinx_rtd_theme/versions.html:11
msgid "Versions"
msgstr "Sürümler"
#: sphinx_rtd_theme/versions.html:17
msgid "Downloads"
msgstr "İndirmeler"
#. The phrase "Read the Docs" is not translated
#: sphinx_rtd_theme/versions.html:24
msgid "On Read the Docs"
msgstr "Read the Docs Üzerinde"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
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"

Binary file not shown.

View File

@@ -0,0 +1,151 @@
# 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:
# 王赛 <wangsai@bootcss.com>, 2019
# Anthony <aj@ohess.org>, 2020
#
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"
"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"
"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: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
msgid "Edit on GitHub"
msgstr "在 GitHub 上修改"
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
msgid "Edit on Bitbucket"
msgstr "在 Bitbucket 上修改"
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
msgid "Edit on GitLab"
msgstr "在 GitLab 上修改"
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
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
msgid "Previous"
msgstr "上一页"
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
#: sphinx_rtd_theme/layout.html:96
msgid "Copyright"
msgstr "版权所有"
#. Build is a noun, not a verb
#: sphinx_rtd_theme/footer.html:31
msgid "Build"
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:52
#, 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
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
#, python-format
msgid "provided by %(readthedocs_web)s"
msgstr "由 %(readthedocs_web)s开发"
#: sphinx_rtd_theme/layout.html:79
#, python-format
msgid "Search within %(docstitle)s"
msgstr "在 %(docstitle)s中搜索"
#: sphinx_rtd_theme/layout.html:87
msgid "About these documents"
msgstr "关于此文档"
#: sphinx_rtd_theme/layout.html:90
msgid "Index"
msgstr "索引"
#: sphinx_rtd_theme/layout.html:93 sphinx_rtd_theme/search.html:11
msgid "Search"
msgstr "搜索"
#: sphinx_rtd_theme/layout.html:128
msgid "Logo"
msgstr "Logo"
#: sphinx_rtd_theme/search.html:29
msgid "Please activate JavaScript to enable the search functionality."
msgstr "请启用 JavaScript 以便使用搜索功能"
#. Search is a noun, not a verb
#: sphinx_rtd_theme/search.html:37
msgid "Search Results"
msgstr "搜索结果"
#: sphinx_rtd_theme/search.html:39
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: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 "托管于 Read the Docs"
#: sphinx_rtd_theme/versions.html:26
msgid "Project Home"
msgstr "项目首页"
#: sphinx_rtd_theme/versions.html:29
msgid "Builds"
msgstr "构建"
#~ msgid "Docs"
#~ msgstr "文档"
#~ msgid "Free document hosting provided by"
#~ msgstr "此文档免费托管于"

View File

@@ -9,7 +9,11 @@
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
{% set script_files = script_files + ['_static/searchtools.js'] %}
{% set display_vcs_links = False %}
{%- block scripts %}
{{ super() }}
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
{%- endblock %}
{% block footer %}
<script type="text/javascript">
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
@@ -23,13 +27,14 @@
<noscript>
<div id="fallback" class="admonition warning">
<p class="last">
{% trans %}Please activate JavaScript to enable the search
{% trans trimmed %}Please activate JavaScript to enable the search
functionality.{% endtrans %}
</p>
</div>
</noscript>
{% if search_performed %}
{# Translators: Search is a noun, not a verb #}
<h2>{{ _('Search Results') }}</h2>
{% if not search_results %}
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>

View File

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

View File

@@ -1,2 +1 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}}
/*# sourceMappingURL=badge_only.css.map */
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

View File

@@ -1,7 +0,0 @@
{
"version": 3,
"mappings": "CAyDA,SAAY,EACV,qBAAsB,EAAE,UAAW,EAqDrC,QAAS,EARP,IAAK,EAAE,AAAC,EACR,+BAAS,EAEP,MAAO,EAAE,IAAK,EACd,MAAO,EAAE,CAAE,EACb,cAAO,EACL,IAAK,EAAE,GAAI,EC1Gb,SAkBC,EAjBC,UAAW,ECFJ,UAAW,EDGlB,UAAW,EAHqC,KAAM,EAItD,SAAU,EAJsD,KAAM,EAapE,EAAG,EAAE,qCAAwB,EAC7B,EAAG,EAAE,0PAAyE,ECZpF,SAAU,EACR,MAAO,EAAE,WAAY,EACrB,UAAW,EAAE,UAAW,EACxB,SAAU,EAAE,KAAM,EAClB,UAAW,EAAE,KAAM,EACnB,UAAW,EAAE,AAAC,EACd,cAAe,EAAE,MAAO,EAG1B,IAAK,EACH,MAAO,EAAE,WAAY,EACrB,cAAe,EAAE,MAAO,EAIxB,KAAG,EACD,MAAO,EAAE,WAAY,EACvB,sCAAiB,EAGf,IAAK,EAAE,MAAY,EAEvB,KAAM,EACJ,cAAe,EAAE,GAAI,EACrB,UAAW,EAAE,EAAG,EAChB,UAAW,EAAE,KAAM,EAEjB,YAAG,EACD,IAAK,EAAE,IAAI,EACb,oDAAiB,EAGf,aAAc,EAAE,OAAQ,EAG9B,cAAe,EACb,MAAO,EAAE,EAAO,EAElB,gBAAiB,EACf,MAAO,EAAE,EAAO,EAElB,oBAAqB,EACnB,MAAO,EAAE,EAAO,EAElB,sBAAuB,EACrB,MAAO,EAAE,EAAO,EAElB,kBAAmB,EACjB,MAAO,EAAE,EAAO,EAElB,oBAAqB,EACnB,MAAO,EAAE,EAAO,EAElB,oBAAqB,EACnB,MAAO,EAAE,EAAO,EAElB,sBAAuB,EACrB,MAAO,EAAE,EAAO,EAElB,qBAAsB,EACpB,MAAO,EAAE,EAAO,EAElB,uBAAwB,EACtB,MAAO,EAAE,EAAO,ECnElB,YAAa,EACX,OAAQ,EAAE,IAAK,EACf,KAAM,EAAE,AAAC,EACT,GAAI,EAAE,AAAC,EACP,IAAK,EC6E+B,IAAK,ED5EzC,IAAK,ECE+B,MAAyB,EDD7D,SAAU,EAAE,MAAkC,EAC9C,SAAU,EAAE,iBAAiC,EAC7C,UAAW,EEAyB,sDAAM,EFC1C,MAAO,EC+E6B,EAAG,ED9EvC,cAAC,EACC,IAAK,ECqE6B,MAAW,EDpE7C,cAAe,EAAE,GAAI,EACvB,6BAAgB,EACd,MAAO,EAAE,GAAI,EACf,iCAAoB,EAClB,MAAO,EAAE,GAAqB,EAC9B,eAAgB,EAAE,MAAkC,EACpD,MAAO,EAAE,IAAK,EACd,SAAU,EAAE,IAAK,EACjB,QAAS,EAAE,EAAG,EACd,KAAM,EAAE,MAAO,EACf,IAAK,ECiD6B,MAAM,EJgC1C,IAAK,EAAE,AAAC,EACR,iFAAS,EAEP,MAAO,EAAE,IAAK,EACd,MAAO,EAAE,CAAE,EACb,uCAAO,EACL,IAAK,EAAE,GAAI,EGrFX,qCAAG,EACD,IAAK,EClB2B,MAAyB,EDmB3D,0CAAQ,EACN,IAAK,EAAE,GAAI,EACb,4CAAU,EACR,IAAK,EAAE,GAAI,EACb,iDAAiB,EACf,eAAgB,ECQgB,MAAI,EDPpC,IAAK,EC0B2B,GAAM,EDzBxC,wDAAwB,EACtB,eAAgB,ECXgB,MAAO,EDYvC,IAAK,ECzB2B,GAAI,ED0BxC,yCAA8B,EAC5B,MAAO,EAAE,IAAK,EAChB,gCAAmB,EACjB,QAAS,EAAE,EAAG,EACd,MAAO,EAAE,GAAqB,EAC9B,IAAK,ECE6B,GAAwB,EDD1D,MAAO,EAAE,GAAI,EACb,mCAAE,EACA,MAAO,EAAE,IAAK,EACd,KAAM,EAAE,EAAG,EACX,KAAM,EAAE,AAAC,EACT,KAAM,EAAE,KAAM,EACd,MAAO,EAAE,AAAC,EACV,SAAU,EAAE,gBAA6C,EAC3D,mCAAE,EACA,MAAO,EAAE,WAAY,EACrB,KAAM,EAAE,AAAC,EACT,qCAAC,EACC,MAAO,EAAE,WAAY,EACrB,MAAO,EAAE,EAAqB,EAC9B,IAAK,ECjDyB,MAAyB,EDkD7D,sBAAW,EACT,IAAK,EAAE,GAAI,EACX,KAAM,EAAE,GAAI,EACZ,IAAK,EAAE,GAAI,EACX,GAAI,EAAE,GAAI,EACV,KAAM,EAAE,GAAI,EACZ,QAAS,ECkByB,IAAK,EDjBvC,iCAAU,EACR,IAAK,EAAE,GAAI,EACb,+BAAQ,EACN,IAAK,EAAE,GAAI,EACb,oDAA+B,EAC7B,SAAU,EAAE,IAAK,EACjB,6DAAQ,EACN,IAAK,EAAE,GAAI,EACb,+DAAU,EACR,IAAK,EAAE,GAAI,EACf,2CAAoB,EAClB,IAAK,EAAE,GAAI,EACX,KAAM,EAAE,GAAI,EACZ,UAAW,EAAE,GAAI,EACjB,MAAO,EAAE,IAAuB,EAChC,MAAO,EAAE,IAAK,EACd,SAAU,EAAE,KAAM,EGhDpB,mCAAsB,EHmDxB,YAAa,EACX,IAAK,EAAE,EAAG,EACV,MAAO,EAAE,GAAI,EACb,kBAAO,EACL,MAAO,EAAE,IAAK,EAClB,EAAG,EACD,IAAK,EAAE,GAAI,EACX,KAAM,EAAE,GAAI",
"sources": ["../../../bower_components/wyrm/sass/wyrm_core/_mixin.sass","../../../bower_components/bourbon/dist/css3/_font-face.scss","../../../sass/_theme_badge_fa.sass","../../../sass/_theme_badge.sass","../../../bower_components/wyrm/sass/wyrm_core/_wy_variables.sass","../../../sass/_theme_variables.sass","../../../bower_components/neat/app/assets/stylesheets/grid/_media.scss"],
"names": [],
"file": "badge_only.css"
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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