adapting test result expectations for new nghttp2 1.45 change in checking
pseudo header fields for invalid characters.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1894189 13f79535-47bb-0310-9956-
ffa450edef68
dnl # nghttp2 >= 1.15.0: get/set stream window sizes
AC_CHECK_FUNCS([nghttp2_session_get_stream_local_window_size],
[APR_ADDTO(MOD_CPPFLAGS, ["-DH2_NG2_LOCAL_WIN_SIZE"])], [])
+dnl # nghttp2 >= 1.15.0: don't keep info on closed streams
+ AC_CHECK_FUNCS([nghttp2_option_set_no_closed_streams],
+ [APR_ADDTO(MOD_CPPFLAGS, ["-DH2_NG2_NO_CLOSED_STREAMS"])], [])
else
AC_MSG_WARN([nghttp2 version is too old])
fi
/* We need to handle window updates ourself, otherwise we
* get flooded by nghttp2. */
nghttp2_option_set_no_auto_window_update(options, 1);
+#ifdef H2_NG2_NO_CLOSED_STREAMS
/* We do not want nghttp2 to keep information about closed streams as
* that accumulates memory on long connections. This makes PRIORITY
* setting in relation to older streams non-working. */
nghttp2_option_set_no_closed_streams(options, 1);
-
+#endif
rv = nghttp2_session_server_new2(&session->ngh2, callbacks,
session, options);
nghttp2_session_callbacks_del(callbacks);
opt = ["-H:method: GET /hello.py"]
r = env.nghttp().get(url, options=opt)
assert r.exit_code == 0, r
- assert r.response
- assert r.response["status"] == 400
+ # nghttp version >= 1.45.0 check pseudo headers and RST streams,
+ # which means we see no response.
+ if r.response is not None:
+ assert r.response["status"] == 400
url = env.mkurl("https", "cgi", "/proxy/hello.py")
r = env.nghttp().get(url, options=opt)
assert r.exit_code == 0, r
- assert r.response
- assert r.response["status"] == 400
+ if r.response is not None:
+ assert r.response["status"] == 400