Tatsuhiro Tsujikawa
079682f313
deflatehd: Fix crash
2014-12-19 23:23:42 +09:00
Tatsuhiro Tsujikawa
eb8138bfbd
nghttp: Advance next stream ID only when --idle-dep is used
2014-12-17 23:36:29 +09:00
Tatsuhiro Tsujikawa
adc22ec80b
nghttp: Print failed address
2014-12-17 00:26:41 +09:00
Tatsuhiro Tsujikawa
d695d2ccc0
nghttp, nghttpx, nghttpd, h2load: Support h2-16 in NPN/ALPN
...
The nghttp2 library itself is still h2-14. To experiment with the
implementations to require h2-16 to test new features (e.g.,
prioritization), nghttp, nghttpx, nghttpd and h2load now support h2-16
as well as h2-14. Cleartext HTTP Upgrade is still limited to h2-14
however.
2014-12-16 22:57:58 +09:00
Tatsuhiro Tsujikawa
5fa9dd7cd5
nghttpx: Remove unused variable
2014-12-16 01:10:54 +09:00
Tatsuhiro Tsujikawa
b352ae03a9
src: Fix undefined reference error
2014-12-16 01:09:19 +09:00
Tatsuhiro Tsujikawa
c93da867e0
nghttpx: Fix bug SPDY upstream requires content-length if no FIN in SYN_STREAM
2014-12-15 23:42:59 +09:00
Tatsuhiro Tsujikawa
556811ec64
nghttpx: Don't connect backend if connection is not establish up front
2014-12-15 23:34:00 +09:00
Tatsuhiro Tsujikawa
403ece66e3
nghttpd: Fail if listen failed
2014-12-15 23:17:50 +09:00
Tatsuhiro Tsujikawa
9a35dbc4ab
src: Just check emptiness for value since spaces around value are stripped
2014-12-15 23:14:07 +09:00
Tatsuhiro Tsujikawa
6f70a53da6
src: http2::add_header: strip white spaces in value
2014-12-15 23:04:45 +09:00
Tatsuhiro Tsujikawa
93ee9e30d8
nghttp, h2load: Use recommended ciphers and assign sane SSL_CTX options
2014-12-13 01:37:57 +09:00
Tatsuhiro Tsujikawa
a84c319d62
src: Print stream ID in priority field as dep_stream_id
2014-12-13 01:20:58 +09:00
Tatsuhiro Tsujikawa
467b419947
nghttp: Add --dep-idle option to create anchor idle node for dependency
2014-12-13 01:19:27 +09:00
Tatsuhiro Tsujikawa
e4c59dd164
nghttpd: Fix next_session_id_ is not incremented
2014-12-10 01:21:12 +09:00
Tatsuhiro Tsujikawa
dce20c3e6a
nghttpx: Check HTTP/2 downstream connection after certain idle time
...
Previously when requests are issued to HTTP/2 downstream connection,
but it turns out that connection is down, handlers of those requests
are deleted. In some situations, we only know connection is down when
we write something to network, so we'd like to handle this kind of
situation in more robust manner. In this change, certain seconds
passed after last network activity, we first issue PING frame to
downstream connection before issuing new HTTP request. If writing
PING frame is failed, it means connection was lost. In this case,
instead of deleting handler, pending requests are migrated to new
HTTP2/ downstream connection, so that it can continue without
affecting upstream connection.
2014-12-09 21:41:29 +09:00
Tatsuhiro Tsujikawa
c0ffed7788
Support custom memory allocator
...
nghttp2_mem structure is introduced to hold custom memory allocator
functions and user supplied pointer. nghttp2_mem object can be passed
to nghttp2_session_client_new3(), nghttp2_session_server_new3(),
nghttp2_hd_deflate_new2() and nghttp2_hd_inflate_new2() to replace
standard malloc(), free(), calloc() and realloc(). nghttp2_mem
structure has user supplied pointer mem_user_data which can be used as
per session/object memory pool.
2014-12-08 00:55:55 +09:00
Tatsuhiro Tsujikawa
b607a22076
nghttpx: Support multiple HTTP/1 backend address
...
For HTTP/1 backend, -b option can be used several times to specify
multiple backend address. HTTP/2 backend does not support multiple
addresses and only uses first address even if multiple addresses are
specified.
2014-12-06 19:30:27 +09:00
Tatsuhiro Tsujikawa
b8dafbdf5e
nghttpx: Pass NI_NUMERICSERV to getnameinfo to get numeric service name
2014-12-06 01:07:05 +09:00
Tatsuhiro Tsujikawa
3b03ff626a
nghttpx: Don't log access log for blocked streams
2014-12-05 21:29:31 +09:00
Tatsuhiro Tsujikawa
9614611969
nghttpx: Limit # of downstream connections per host when h2 proxy is used
...
This commit limits the number of concurrent HTTP/1 downstream
connections to same host. By defualt, it is limited to 8 connections.
--backend-connections-per-frontend option was replaced with
--backend-http1-connections-per-host, which changes the maximum number
of connections per host. This limitation only kicks in when h2 proxy
is used (-s option).
2014-12-05 01:47:03 +09:00
Tatsuhiro Tsujikawa
f178b78816
nghttpx: Longer read timeouts
2014-12-03 23:45:44 +09:00
Tatsuhiro Tsujikawa
e180d8e594
nghttpx: Longer downstream HTTP/1 idle connection timeout
2014-12-03 23:00:53 +09:00
Tatsuhiro Tsujikawa
cbb5da5285
nghttpx: Fix --backend-http-proxy-uri does not work
2014-12-02 03:03:14 +09:00
Tatsuhiro Tsujikawa
03877c3752
asio-lib: Put ${AM_CPPFLAGS} before ${BOOST_CPPFLAGS}
2014-12-01 23:20:53 +09:00
Tatsuhiro Tsujikawa
54a3209cf5
configure.ac: Rename some variables so that they follow automake convention
2014-12-01 23:14:28 +09:00
Tatsuhiro Tsujikawa
7036859823
Do not change user variable CFLAGS in configure.ac
2014-12-01 23:06:11 +09:00
Tatsuhiro Tsujikawa
dcc7b23980
nghttpx: Remove cipher suite requirement
...
This makes the library h2-16 compatible now.
2014-11-30 22:52:34 +09:00
Tatsuhiro Tsujikawa
b9667fd209
asio: Listen to all resolved addresses
2014-11-30 22:39:16 +09:00
Tatsuhiro Tsujikawa
204ff787fa
nghttpx: Submit RST_STREAM if HEADERS appears in the middle of a stream
2014-11-28 00:23:46 +09:00
Tatsuhiro Tsujikawa
b1f807abd1
Reformat lines with clang-format-3.5
2014-11-27 23:56:30 +09:00
Tatsuhiro Tsujikawa
c67ccad74d
nghttpx: Use cached get_config()->pid in save_pid()
2014-11-27 22:41:14 +09:00
Tatsuhiro Tsujikawa
04dae32509
nghttpx: Store PID to Config again after daemon()
2014-11-27 21:32:34 +09:00
Tatsuhiro Tsujikawa
e11834d1c9
src: Add code in case struct tm.tm_gmtoff is not available
2014-11-24 18:39:35 +09:00
Tatsuhiro Tsujikawa
9bba616426
nghttpx: Add $alpn variable to accesslog formatting
...
$alpn is a variable which represents ALPN identifier of the protocol
which generates the response.
2014-11-24 15:24:09 +09:00
Tatsuhiro Tsujikawa
1fe50f272b
nghttpx: Add $pid to --accesslog-format variable
...
$pid refers to the PID of the running process.
2014-11-24 14:34:43 +09:00
Tatsuhiro Tsujikawa
93023acc6c
nghttpx: Make --accesslog-format usage doc help2man friendly
...
This is unfortunate but help2man behaves badly when there is indented
lines in help messages in commnad-line args. We removed indentations
to make help2man happy.
2014-11-24 14:16:48 +09:00
Tatsuhiro Tsujikawa
daf659c64e
nghttpx: Note the conversion made in <VAR>
2014-11-24 14:04:37 +09:00
Tatsuhiro Tsujikawa
de2a855572
Implement faster formatting for format_iso8601 and format_common_log
2014-11-24 14:00:52 +09:00
Lucas Pardue
6e178653a5
fixed conflict
2014-11-23 21:10:51 +00:00
Lucas Pardue
9cf1a0c77c
Add features to logging, client and server port,
...
time_iso8601 and request_time.
2014-11-23 20:37:51 +00:00
Tatsuhiro Tsujikawa
74ec1d3377
nghttpx: Write accesslog when upstream connection is lost for HTTP/2 and SPDY
2014-11-23 17:24:23 +09:00
Tatsuhiro Tsujikawa
1e4f288a7c
nghttpx: Remove misleading logging
2014-11-23 16:45:36 +09:00
Tatsuhiro Tsujikawa
ecd143fcc2
nghttpx: Send RST_STREAM with NO_ERROR when closing upgraded connection
2014-11-22 23:13:29 +09:00
Tatsuhiro Tsujikawa
bd9389b956
nghttpx: Refactor http2_data_read_callback
2014-11-22 21:12:28 +09:00
Tatsuhiro Tsujikawa
1a09cef0ef
nghttpx: Avoid 0-length DATA in HTTP/2 upstream
2014-11-22 21:12:28 +09:00
Tatsuhiro Tsujikawa
bded1d1115
h2load: Support ALPN
2014-11-22 01:13:18 +09:00
Tatsuhiro Tsujikawa
fa4f03525e
nghttp: Fix compile error and warning with libc++
2014-11-22 00:37:37 +09:00
Tatsuhiro Tsujikawa
ee65dea8af
nghttp: Fix compile error without libjansson
2014-11-19 21:18:31 +09:00
Tatsuhiro Tsujikawa
27609327ee
nghttpx: Fix heap-after-free crash in https upstream
...
Add Upstream::on_handler_delete() hook to safely write log for
HttpsUpstream.
2014-11-19 01:59:09 +09:00
Tatsuhiro Tsujikawa
958cd0de64
nghttpx: Add configurable access logging format
...
This commit adds functionality to customize access logging format in
nghttpx. The format variables are inspired by nginx. The default
format is combined format.
2014-11-19 01:29:55 +09:00
Tatsuhiro Tsujikawa
1d7601edfb
nghttpx: Better handling EOF from downstream connection to tunnel stream
2014-11-18 00:03:52 +09:00
Tatsuhiro Tsujikawa
8a0fdcfea9
nghttpd: Fix crash
2014-11-17 19:01:06 +09:00
Tatsuhiro Tsujikawa
75a1ad8bdb
src: format_iso8601: Fix invalid millisecond formatting
2014-11-16 17:32:35 +09:00
Tatsuhiro Tsujikawa
54232c6542
nghttp: Add --no-dep option to disable sending priority hints to server
2014-11-15 23:42:26 +09:00
Tatsuhiro Tsujikawa
ee2856f9bc
nghttp: Update doc
2014-11-15 23:34:37 +09:00
Tatsuhiro Tsujikawa
737cea0b38
nghttp: Add -r, --har option to output HTTP transactions in HAR format
2014-11-15 23:34:10 +09:00
Tatsuhiro Tsujikawa
a2bc88f6db
nghttpx: Check max length of ALPN field
2014-11-14 23:19:16 +09:00
Tatsuhiro Tsujikawa
5ce8ae79f0
nghttpx: Disable spdy/3 and spdy/2 by default
2014-11-14 23:16:06 +09:00
Tatsuhiro Tsujikawa
d98e9a63d0
src: Refactor code around ALPN setup
2014-11-14 23:14:39 +09:00
Tatsuhiro Tsujikawa
8e30adbca0
asio: Add http2::backlog API function
2014-11-10 23:26:01 +09:00
Tatsuhiro Tsujikawa
9adfd08848
asio_http2_handler: Use util::utos instead of std::to_string
2014-11-10 22:39:20 +09:00
Tatsuhiro Tsujikawa
2e3419ccbb
nghttpd: Cache formatted date string
2014-11-10 22:35:08 +09:00
Tatsuhiro Tsujikawa
5b6b6dc1b7
src: Rewrite http_date
2014-11-10 21:53:19 +09:00
Tatsuhiro Tsujikawa
d0271a90b5
nghttpd: Use util::utos instead of slow util::to_str
2014-11-10 21:23:26 +09:00
Tatsuhiro Tsujikawa
2ba9a009fe
nghttpd: Fix resource leak
2014-11-08 23:07:40 +09:00
Tatsuhiro Tsujikawa
80b361dbb0
nghttpx: Use exit instead of abort for DIE macro
2014-11-08 21:38:57 +09:00
Tatsuhiro Tsujikawa
58254adb11
h2load: Print used SSL/TLS cipher name and parameters
2014-11-08 21:24:24 +09:00
Tatsuhiro Tsujikawa
ce71e65aee
nghttpx: Replace WARNING with WARN for consistency
2014-11-08 10:51:56 +09:00
Tatsuhiro Tsujikawa
1119701071
nghttpx: Fix -L option help message
...
WARNING should be WARN.
2014-11-08 10:45:58 +09:00
Tatsuhiro Tsujikawa
c410f4055f
Merge branch 'log_notice' of https://github.com/LPardue/nghttp2 into LPardue-log_notice
2014-11-07 21:15:02 +09:00
Tatsuhiro Tsujikawa
1e86635572
h2load: Make shutdown sequence simpler
2014-11-07 00:28:10 +09:00
Lucas Pardue
a067eb02a5
Add LOG_NOTICE level logging for application lifecycle events
2014-11-06 14:32:56 +00:00
Tatsuhiro Tsujikawa
154876a17b
nghttpx: Apply TLS record length limit to DATA frame payload
...
This is not obvious but it makes intermediaries flush and forward DATA
frame boundary without excessive buffering. Since we have different
TCP connections frontend and backend, this may not work. This is
still experimental.
2014-11-06 21:14:14 +09:00
Tatsuhiro Tsujikawa
f8c70993c0
nghttpx: Adjust TLS record size dynamically
...
Use the same behaviour the current Google server does: start with 1300
TLS record size and after transmitting 1MiB, change record size to
16384. After 1 second idle time, reset to 1300. Only applies to
HTTP/2 and SPDY upstream connections.
2014-11-06 02:36:53 +09:00
Tatsuhiro Tsujikawa
03a2828fcf
src: Disable SSL_MODE_ENABLE_PARTIAL_WRITE for apps which use libevent
2014-11-05 01:15:38 +09:00
Tatsuhiro Tsujikawa
2fc0056ada
nghttp: Allow multiple -v option to increase verbosity
...
Now the number of -v option specifies verbosity level. Current all
verbose output are turned on for at lest one -v option, except for the
debug output for each data chunk which is only turned on more than one
-v options.
2014-11-05 00:42:12 +09:00
Tatsuhiro Tsujikawa
29fcd7c946
nghttpd: Use http2::Headers
2014-11-02 23:33:04 +09:00
Tatsuhiro Tsujikawa
189f122dd7
nghttpd: Perform redirect if directory is requested
2014-11-02 23:27:38 +09:00
Tatsuhiro Tsujikawa
7d282cd0bd
Code cleanup
2014-10-30 23:31:28 +09:00
Tatsuhiro Tsujikawa
4d93dd9d91
Upate to draft-15
...
* Add NGHTTP2_HTTP_1_1_REQUIRED error code
* Allow transmission of WINDOW_UPDATE on reserved (remote)
* Allow reception of WINDOW_UPDATE on reserved (local)
* Treat frame larger than MAX_FRAME_SIZE as FRAME_SIZE_ERROR
ALPN identifier is still h2-14 to continue interop, since draft-14 and
-15 are binary compatible. The new error code was added in draft-15,
but HTTP/2 allows extensions can freely add new error code, so it is
not a problem.
2014-10-30 22:40:02 +09:00
Tatsuhiro Tsujikawa
be1a513c59
nghttpx: Shut up scan-build
2014-10-30 22:36:22 +09:00
Tatsuhiro Tsujikawa
20900b133e
nghttpx: Fix heap-use-after-free in ClientHandler object
...
This bug was found by scan-build
2014-10-30 21:47:38 +09:00
Tatsuhiro Tsujikawa
0ef99b90d9
asio-lib: Make request_cb take const ref and use int64_t as http_date arg
2014-10-28 01:01:48 +09:00
Tatsuhiro Tsujikawa
7fa0f2763e
nghttpx: Update Alt-Svc header field spec to alt-svc-04
2014-10-28 00:17:32 +09:00
Tatsuhiro Tsujikawa
6933e0ef54
h2load: Use Headers instead of std::vector<std::pair<>> to store custom headers
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
a9ecdca08a
h2load: Read URIs from stdin if -i- is used
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
af5bedd45f
h2load: Move code pasing URIs to separate function
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
7097a31968
h2load: Uniform handling of URIs from command-line and file
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
4122920dc6
h2load: Fix doc and remove trailing spaces
2014-10-27 21:23:36 +09:00
Lucas Pardue
9ea4905f68
Added X-Forwarded-For header stripping option to nghttpx
2014-10-27 10:23:20 +00:00
Tatsuhiro Tsujikawa
c6cfcc3c30
src: Disable insecure SSLv3
2014-10-22 23:14:07 +09:00
Tatsuhiro Tsujikawa
566a252577
Merge branch 'header_add_override' of https://github.com/kennypeng/nghttp2 into kennypeng-header_add_override
2014-10-22 21:25:53 +09:00
Kenny (kang-yen) Peng
27c766cb04
fix some comments and descriptions
2014-10-21 22:38:45 +00:00
Kenny (kang-yen) Peng
41dd6d0205
use option i to accept input URI list file
2014-10-21 22:29:36 +00:00
Kenny (kang-yen) Peng
db071ca35c
fix comments of header add/override
2014-10-21 21:25:38 +00:00
Tatsuhiro Tsujikawa
e3af9d8bd3
nghttp: Use Headers to store custom headers
2014-10-21 23:24:50 +09:00
Tatsuhiro Tsujikawa
73955f0519
nghttp: Take advantage the fact that custom headers are already lower cased
2014-10-21 23:17:53 +09:00
Tatsuhiro Tsujikawa
5df21e3683
nghttp: Add missing metavar to -H and add example
2014-10-21 22:47:24 +09:00
Kenny (kang-yen) Peng
a6e1a40c05
support uri list file input
2014-10-20 20:59:55 +00:00