mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a8d5e5dd9 | ||
|
|
9bcb0ffdef | ||
|
|
1945d0f02a | ||
|
|
4870edb33d |
@@ -25,7 +25,7 @@ dnl Do not change user variables!
|
|||||||
dnl http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
|
dnl http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
|
||||||
|
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ(2.61)
|
||||||
AC_INIT([nghttp2], [1.0.3], [t-tujikawa@users.sourceforge.net])
|
AC_INIT([nghttp2], [1.0.4], [t-tujikawa@users.sourceforge.net])
|
||||||
AC_USE_SYSTEM_EXTENSIONS
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
|
||||||
LT_PREREQ([2.2.6])
|
LT_PREREQ([2.2.6])
|
||||||
@@ -48,7 +48,7 @@ AC_CONFIG_HEADERS([config.h])
|
|||||||
dnl See versioning rule:
|
dnl See versioning rule:
|
||||||
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||||
AC_SUBST(LT_CURRENT, 14)
|
AC_SUBST(LT_CURRENT, 14)
|
||||||
AC_SUBST(LT_REVISION, 3)
|
AC_SUBST(LT_REVISION, 4)
|
||||||
AC_SUBST(LT_AGE, 0)
|
AC_SUBST(LT_AGE, 0)
|
||||||
|
|
||||||
major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
|
major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "H2LOAD" "1" "June 23, 2015" "1.0.3" "nghttp2"
|
.TH "H2LOAD" "1" "June 23, 2015" "1.0.4" "nghttp2"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
h2load \- HTTP/2 benchmarking tool
|
h2load \- HTTP/2 benchmarking tool
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "NGHTTP" "1" "June 23, 2015" "1.0.3" "nghttp2"
|
.TH "NGHTTP" "1" "June 23, 2015" "1.0.4" "nghttp2"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
nghttp \- HTTP/2 experimental client
|
nghttp \- HTTP/2 experimental client
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "NGHTTPD" "1" "June 23, 2015" "1.0.3" "nghttp2"
|
.TH "NGHTTPD" "1" "June 23, 2015" "1.0.4" "nghttp2"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
nghttpd \- HTTP/2 experimental server
|
nghttpd \- HTTP/2 experimental server
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "NGHTTPX" "1" "June 23, 2015" "1.0.3" "nghttp2"
|
.TH "NGHTTPX" "1" "June 23, 2015" "1.0.4" "nghttp2"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
nghttpx \- HTTP/2 experimental proxy
|
nghttpx \- HTTP/2 experimental proxy
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -356,7 +356,12 @@ static int stream_update_dep_on_detach_item(nghttp2_stream *stream,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(stream->dpri == NGHTTP2_STREAM_DPRI_TOP);
|
if (stream->dpri == NGHTTP2_STREAM_DPRI_NO_ITEM) {
|
||||||
|
/* nghttp2_stream_defer_item() does not clear stream->item, but
|
||||||
|
set dpri = NGHTTP2_STREAM_DPRI_NO_ITEM. Catch this case
|
||||||
|
here. */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
stream->dpri = NGHTTP2_STREAM_DPRI_NO_ITEM;
|
stream->dpri = NGHTTP2_STREAM_DPRI_NO_ITEM;
|
||||||
|
|
||||||
|
|||||||
@@ -266,6 +266,8 @@ int main(int argc _U_, char *argv[] _U_) {
|
|||||||
test_nghttp2_session_send_data_callback) ||
|
test_nghttp2_session_send_data_callback) ||
|
||||||
!CU_add_test(pSuite, "session_on_begin_headers_temporal_failure",
|
!CU_add_test(pSuite, "session_on_begin_headers_temporal_failure",
|
||||||
test_nghttp2_session_on_begin_headers_temporal_failure) ||
|
test_nghttp2_session_on_begin_headers_temporal_failure) ||
|
||||||
|
!CU_add_test(pSuite, "session_defer_then_close",
|
||||||
|
test_nghttp2_session_defer_then_close) ||
|
||||||
!CU_add_test(pSuite, "http_mandatory_headers",
|
!CU_add_test(pSuite, "http_mandatory_headers",
|
||||||
test_nghttp2_http_mandatory_headers) ||
|
test_nghttp2_http_mandatory_headers) ||
|
||||||
!CU_add_test(pSuite, "http_content_length",
|
!CU_add_test(pSuite, "http_content_length",
|
||||||
|
|||||||
@@ -7469,6 +7469,45 @@ void test_nghttp2_session_on_begin_headers_temporal_failure(void) {
|
|||||||
nghttp2_bufs_free(&bufs);
|
nghttp2_bufs_free(&bufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_nghttp2_session_defer_then_close(void) {
|
||||||
|
nghttp2_session *session;
|
||||||
|
nghttp2_session_callbacks callbacks;
|
||||||
|
nghttp2_data_provider prd;
|
||||||
|
int rv;
|
||||||
|
const uint8_t *datap;
|
||||||
|
ssize_t datalen;
|
||||||
|
nghttp2_frame frame;
|
||||||
|
|
||||||
|
memset(&callbacks, 0, sizeof(nghttp2_session_callbacks));
|
||||||
|
callbacks.send_callback = null_send_callback;
|
||||||
|
|
||||||
|
nghttp2_session_client_new(&session, &callbacks, NULL);
|
||||||
|
|
||||||
|
prd.read_callback = defer_data_source_read_callback;
|
||||||
|
|
||||||
|
rv = nghttp2_submit_request(session, NULL, reqnv, ARRLEN(reqnv), &prd, NULL);
|
||||||
|
CU_ASSERT(rv > 0);
|
||||||
|
|
||||||
|
/* This sends HEADERS */
|
||||||
|
datalen = nghttp2_session_mem_send(session, &datap);
|
||||||
|
|
||||||
|
CU_ASSERT(datalen > 0);
|
||||||
|
|
||||||
|
/* This makes DATA item deferred */
|
||||||
|
datalen = nghttp2_session_mem_send(session, &datap);
|
||||||
|
|
||||||
|
CU_ASSERT(datalen == 0);
|
||||||
|
|
||||||
|
nghttp2_frame_rst_stream_init(&frame.rst_stream, 1, NGHTTP2_CANCEL);
|
||||||
|
|
||||||
|
/* Assertion failure; GH-264 */
|
||||||
|
rv = nghttp2_session_on_rst_stream_received(session, &frame);
|
||||||
|
|
||||||
|
CU_ASSERT(rv == 0);
|
||||||
|
|
||||||
|
nghttp2_session_del(session);
|
||||||
|
}
|
||||||
|
|
||||||
static void check_nghttp2_http_recv_headers_fail(
|
static void check_nghttp2_http_recv_headers_fail(
|
||||||
nghttp2_session *session, nghttp2_hd_deflater *deflater, int32_t stream_id,
|
nghttp2_session *session, nghttp2_hd_deflater *deflater, int32_t stream_id,
|
||||||
int stream_state, const nghttp2_nv *nva, size_t nvlen) {
|
int stream_state, const nghttp2_nv *nva, size_t nvlen) {
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ void test_nghttp2_session_cancel_reserved_remote(void);
|
|||||||
void test_nghttp2_session_reset_pending_headers(void);
|
void test_nghttp2_session_reset_pending_headers(void);
|
||||||
void test_nghttp2_session_send_data_callback(void);
|
void test_nghttp2_session_send_data_callback(void);
|
||||||
void test_nghttp2_session_on_begin_headers_temporal_failure(void);
|
void test_nghttp2_session_on_begin_headers_temporal_failure(void);
|
||||||
|
void test_nghttp2_session_defer_then_close(void);
|
||||||
void test_nghttp2_http_mandatory_headers(void);
|
void test_nghttp2_http_mandatory_headers(void);
|
||||||
void test_nghttp2_http_content_length(void);
|
void test_nghttp2_http_content_length(void);
|
||||||
void test_nghttp2_http_content_length_mismatch(void);
|
void test_nghttp2_http_content_length_mismatch(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user