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.
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
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).
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>
Previously, mruby context is wrongly shared by multiple patterns if
the underlying SharedDownstreamAddr is shared by multiple
DownstreamAddrGroups. This commit fixes it.
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>