Tatsuhiko Kubo
59f8397659
Use nullptr instead of NULL in C++.
2015-04-15 21:18:39 +09:00
Tatsuhiko Kubo
061732adf0
improved malloc error handlings.
2015-04-15 09:20:45 +09:00
Tatsuhiro Tsujikawa
5c2ca28706
asio: client: Call error_cb on error occurred in do_read and do_write
...
Fixes GH-207
2015-04-13 21:33:43 +09:00
Tatsuhiro Tsujikawa
a8ea86cfe5
src: constexpr
2015-04-12 17:51:23 +09:00
Tatsuhiro Tsujikawa
7451a73def
nghttpx: Don't push resource if link header has non empty loadpolicy
2015-04-12 17:42:25 +09:00
Tatsuhiro Tsujikawa
889e705f35
nghttpx: Add logging for somewhat important events (logs, tickets, and ocsp)
2015-04-11 00:08:28 +09:00
Tatsuhiro Tsujikawa
14d4979c54
Don't install libnghttp2_asio headers if they are disabled
2015-04-10 23:11:40 +09:00
Tatsuhiro Tsujikawa
095bc178f3
nghttpx: Robust HTTP/1 backend CL and TE handling
...
We should ignore Content-Length and Transfer-Encoding for upgraded
response, and reset content-length if this is a non-final response.
2015-04-10 22:30:20 +09:00
Tatsuhiro Tsujikawa
308738025c
nghttpx: Don't set response content-length if HTTP/2 response upgraded
2015-04-10 22:24:17 +09:00
Tatsuhiro Tsujikawa
97366bf55c
nghttpx: Set content-length after complete request/response headers
2015-04-10 22:10:51 +09:00
Tatsuhiro Tsujikawa
9803f92e9c
nghttpx: Set Downstream to stream user data on HTTP Upgrade to h2
2015-04-10 02:40:09 +09:00
Tatsuhiro Tsujikawa
44b4cda200
src: Check return value from nghttp2_session_get_stream_user_data
2015-04-10 00:21:31 +09:00
Tatsuhiro Tsujikawa
69a4f3bf42
nghttp: Consider :authority custom header field for SNI
2015-04-10 00:15:01 +09:00
Tatsuhiro Tsujikawa
b873930802
nghttpx: Now ocsp works without threads
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
bc53c81616
nghttpx: Replace posix_spawn functions with fork + dup2 + execve
...
Although posx_spawn is very convenient and useful, we have platform
which don't have these functions (e.g., Android NDK r10d).
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
09c485e712
nghttpx: Eliminate 1 second refresh timer
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
d247470da2
nghttpx: Rewrite ocsp without thread
...
Since libev handles SIGCHLD, using waitpid in separate thread to wait
for the completion of fetch-ocsp-response script process is undefined.
This commit rewrite ocsp handling code so that it utilizes libev
ev_child watcher and perform ocsp update without thread.
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
1fcd881395
nghttpx: Document that stderr is redirected to error log file
2015-04-08 17:33:18 +09:00
Tatsuhiro Tsujikawa
dd435b51ab
nghttpx: Redirect stderr to errorlog file
2015-04-08 16:59:58 +09:00
Tatsuhiro Tsujikawa
80743ddc7b
nghttpx: Set promised Downstream as nghttp2 stream user data
2015-04-08 16:07:53 +09:00
Tatsuhiro Tsujikawa
36a8f24559
nghttpx: Finish incomplete incoming request with END_STREAM flag
...
Previously we send RST_STREAM when we send DATA with END_STREAM flag
set. With this commit, we also do this when we send HEADERS with
END_STREAM flag set.
2015-04-08 16:07:13 +09:00
Tatsuhiro Tsujikawa
b25e19e876
nghttpx: HTTP backend: Check parser error first so that we can get error msg
2015-04-08 14:39:27 +09:00
Tatsuhiro Tsujikawa
e9660c3558
nghttpx: Fix heap-use-after-free
...
The bug was introduced by 8c3b379b66
.
2015-04-08 13:43:57 +09:00
Tatsuhiro Tsujikawa
8c3b379b66
Pool Memchunk per worker
2015-04-08 00:10:48 +09:00
Tatsuhiro Tsujikawa
d42f31ca78
nghttpx: Fix bug that data buffered in SSL object are not read
...
This is same issue described in https://github.com/h2o/h2o/issues/268 .
That is if SSL object has decrypted data buffered inside it, and
application does not read it for some reason (e.g., rate limit), we
have to check the existence of data using SSL_pending. This is
because buffered data inside SSL is not notified by io watcher. It is
obvious, but we totally missed it.
nghttpx code normally reads everything until SSL_read returns error
(want-read). But if rate limit is involved, we stop reading early.
Also in HTTP/1 code, while processing one request, we just read until
buffer is filled up. In these cases, we may suffer from this problem.
This commit fixes this problem, by performing SSL_pending() and if it
has buffered data and read io watcher is enabled, we feed event using
ev_feed_event().
2015-04-06 22:31:36 +09:00
Tatsuhiro Tsujikawa
7522d50d1a
nghttpd, tiny-nghttpd: No need to check existence of stream
...
The stream existence is guaranteed by library as of
cc03a12b75
.
2015-04-05 23:13:29 +09:00
Tatsuhiro Tsujikawa
9eff511c5e
Add nghttp2_send_data_callback to send DATA payload without copying
...
To avoid buffer copy in nghttp2_data_source_read_callback, this commit
introduces NGHTTP2_DATA_FLAG_NO_COPY and nghttp2_send_data_callback.
By using NGHTTP2_DATA_FLAG_NO_COPY in
nghttp2_data_source_read_callback, application can avoid to copy
application data to given buffer. Instead, application has to
implement nghttp2_send_data_callback to send complete DATA frame by
itself. We see noticeable performance increase in nghttpd and
tiny-nghttpd using this new feature. On the other hand, nghttpx does
not show such difference, probably because buffer copy is not
bottleneck. Using nghttp2_send_data_callback adds complexity, so it
is recommended to measure the performance to see whether this extra
complexity worth it.
2015-04-04 21:23:50 +09:00
Tatsuhiro Tsujikawa
1442b1bd0a
nghttpx: Remove --tls-ctx-per-worker option
...
--tls-ctx-per-worker option does not work well of OCSP stapling. Also
it makes session ID useless.
2015-03-31 00:42:21 +09:00
Tatsuhiro Tsujikawa
cc94632b29
src: Use separator "--" to mark start of the footer without ambiguity
2015-03-31 00:21:52 +09:00
Tatsuhiro Tsujikawa
5df770b9c1
h2load: Fix compile error with Android NDK
2015-03-30 23:59:03 +09:00
Tatsuhiro Tsujikawa
4bc9afe20a
nghttpx: Add OCSP stapling feature
2015-03-30 23:58:28 +09:00
Tatsuhiro Tsujikawa
ccea4d42b5
Refactor .gitignore files
2015-03-29 18:40:37 +09:00
Tatsuhiro Tsujikawa
12ced1cddc
nghttpx: Add flag to track connection state in HTTP/1 backend
2015-03-29 01:47:22 +09:00
Tatsuhiro Tsujikawa
3576f20e5a
nghttpx: Revert part of 6f58434d89
...
The reverted part of the change may use not connected socket in HTTP/1
backend.
2015-03-29 01:32:27 +09:00
Tatsuhiro Tsujikawa
a2486daee1
nghttpd: Rename Http2Handler::on_connect as connection_made
2015-03-28 20:21:12 +09:00
Tatsuhiro Tsujikawa
8bf440b89c
nghttpx: Rename Http2Session::on_connect as connection_made
2015-03-28 20:19:17 +09:00
Tatsuhiro Tsujikawa
e9cdb9c896
h2load: Remove unused fields in Client class
2015-03-28 20:17:30 +09:00
Tatsuhiro Tsujikawa
c4804ee50b
h2load: Remove Client::noop
2015-03-28 20:14:12 +09:00
Tatsuhiro Tsujikawa
95cb284e27
h2load: Rename Client::on_connect as connection_made
2015-03-28 20:13:37 +09:00
Tatsuhiro Tsujikawa
c4ccc376df
nghttp: Refactor function names
...
on_SOMETHING should be used only for I/O callback functions
2015-03-28 20:07:12 +09:00
Tatsuhiro Tsujikawa
6f58434d89
nghttpx, h2load: Perform write whenever read succeeds
2015-03-28 19:13:14 +09:00
Tatsuhiro Tsujikawa
de2c2ad65c
src: Update hexdump usage output so that help2rst.py can produce good output
2015-03-27 00:36:19 +09:00
Tatsuhiro Tsujikawa
dc85623060
nghttpx: Fix PUSH_PROMISE header field corruption
...
Fixes GH-194
2015-03-26 22:52:51 +09:00
Tatsuhiro Tsujikawa
8afbb6ca26
h2load: Fix crash if -t > -c
2015-03-26 19:57:37 +09:00
Tatsuhiro Tsujikawa
ed79637737
h2load: Add -d option to upload data to server
2015-03-26 19:53:42 +09:00
Tatsuhiro Tsujikawa
3b24be3bcd
src: Fix compile error with clang-3.6
2015-03-25 01:27:18 +09:00
Tatsuhiro Tsujikawa
ece8289aaf
nghttpx: Forward only "trailers" keyword in te when forwarding HTTP/2 backend
2015-03-25 01:20:41 +09:00
Tatsuhiro Tsujikawa
4042ff0fc4
nghttpx: Fix te header field is duplicated when forwarding HTTP/2 backend
2015-03-25 01:17:06 +09:00
Tatsuhiro Tsujikawa
125e32eb56
src: Refactor a bit
2015-03-24 21:45:59 +09:00
Tatsuhiro Tsujikawa
94bf8dcd4e
src: Refactor util::hexdump
2015-03-24 21:43:28 +09:00