Compare commits

...

6 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 60c86dee7f Update man pages 2017-01-05 22:22:50 +09:00
Tatsuhiro Tsujikawa eaf38c8c98 Bump up version number to v1.18.1 2017-01-03 17:36:56 +09:00
Tatsuhiro Tsujikawa 417321072f nghttpx: Fix assertion error in libev ev_io_start 2017-01-03 17:36:08 +09:00
Tatsuhiro Tsujikawa fafccc4b98 nghttpx: Handle c-ares success without result 2017-01-03 17:36:08 +09:00
Tatsuhiro Tsujikawa 483e5f4e7b nghttpx: Fix bug that DNS timeout was erroneously disabled 2017-01-03 17:36:08 +09:00
Tatsuhiro Tsujikawa db3a5f9aef nghttpx: Fix bug that DNS timeout was ignored 2017-01-03 17:36:08 +09:00
9 changed files with 23 additions and 11 deletions

View File

@ -24,7 +24,7 @@
cmake_minimum_required(VERSION 3.0)
# XXX using 1.8.90 instead of 1.9.0-DEV
project(nghttp2 VERSION 1.18.0)
project(nghttp2 VERSION 1.18.1)
# See versioning rule:
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

View File

@ -25,7 +25,7 @@ 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.18.0], [t-tujikawa@users.sourceforge.net])
AC_INIT([nghttp2], [1.18.1], [t-tujikawa@users.sourceforge.net])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "H2LOAD" "1" "Dec 27, 2016" "1.18.0" "nghttp2"
.TH "H2LOAD" "1" "Jan 05, 2017" "1.18.1" "nghttp2"
.SH NAME
h2load \- HTTP/2 benchmarking tool
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "NGHTTP" "1" "Dec 27, 2016" "1.18.0" "nghttp2"
.TH "NGHTTP" "1" "Jan 05, 2017" "1.18.1" "nghttp2"
.SH NAME
nghttp \- HTTP/2 client
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "NGHTTPD" "1" "Dec 27, 2016" "1.18.0" "nghttp2"
.TH "NGHTTPD" "1" "Jan 05, 2017" "1.18.1" "nghttp2"
.SH NAME
nghttpd \- HTTP/2 server
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "NGHTTPX" "1" "Dec 27, 2016" "1.18.0" "nghttp2"
.TH "NGHTTPX" "1" "Jan 05, 2017" "1.18.1" "nghttp2"
.SH NAME
nghttpx \- HTTP/2 proxy
.
@ -1255,7 +1255,7 @@ backend server, the custom error pages are not used.
.B \-\-server\-name=<NAME>
Change server response header field value to <NAME>.
.sp
Default: \fBnghttpx nghttp2/1.18.0\fP
Default: \fBnghttpx nghttp2/1.18.1\fP
.UNINDENT
.INDENT 0.0
.TP

View File

@ -1134,7 +1134,7 @@ HTTP
Change server response header field value to <NAME>.
Default: ``nghttpx nghttp2/1.18.0``
Default: ``nghttpx nghttp2/1.18.1``
.. option:: --no-server-rewrite

View File

@ -99,6 +99,7 @@ namespace {
void timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) {
auto resolv = static_cast<DNSResolver *>(w->data);
resolv->on_timeout();
process_result(resolv);
}
} // namespace
@ -215,7 +216,9 @@ void DNSResolver::reset_timeout() {
if (tv == nullptr) {
return;
}
timer_.repeat = tv->tv_sec + tv->tv_usec / 1000000.;
// To avoid that timer_.repeat becomes 0, which makes ev_timer_again
// useless, add tiny fraction of time.
timer_.repeat = tv->tv_sec + tv->tv_usec / 1000000. + 1e-9;
ev_timer_again(loop_, &timer_);
}
@ -295,7 +298,13 @@ void DNSResolver::on_result(int status, hostent *hostent) {
}
auto ap = *hostent->h_addr_list;
assert(ap);
if (!ap) {
if (LOG_ENABLED(INFO)) {
LOG(INFO) << "Name lookup for " << name_ << "failed: no address returned";
}
status_ = DNS_STATUS_ERROR;
return;
}
switch (hostent->h_addrtype) {
case AF_INET:

View File

@ -83,13 +83,16 @@ void RateLimit::regen() {
avail_ += rate_;
}
if (avail_ > 0 && startw_req_) {
if (w_->fd >= 0 && avail_ > 0 && startw_req_) {
ev_io_start(loop_, w_);
handle_tls_pending_read();
}
}
void RateLimit::startw() {
if (w_->fd < 0) {
return;
}
startw_req_ = true;
if (rate_ == 0 || avail_ > 0) {
ev_io_start(loop_, w_);