Tatsuhiro Tsujikawa
0479f833fc
Revert "nghttpx: Remove last write/read fields for TLS"
...
This reverts commit 585af93828
.
2015-05-15 22:20:15 +09:00
Tatsuhiro Tsujikawa
53bfc70c9e
Include inttypes.h (or cintypes for C++) instead of stdint.h
...
From autoconf manual, section 5.6.1 Portability of Headers, says:
"""
The C99 standard says that inttypes.h includes stdint.h, so there's no
need to include stdint.h separately in a standard environment. Some
implementations have inttypes.h but not stdint.h (e.g., Solaris 7),
but we don't know of any implementation that has stdint.h but not
inttypes.h.
"""
2015-05-14 00:17:45 +09:00
Tatsuhiro Tsujikawa
38cfc5c47c
Check more headers and funcs
2015-05-13 23:29:20 +09:00
Tatsuhiro Tsujikawa
5da49989f8
nghttpd: Add --echo-upload option to send back request body
2015-05-13 00:38:28 +09:00
Tatsuhiro Tsujikawa
2f2a7ace81
Fix corresponding upstream source reported in previous commits accordingly
2015-05-12 23:24:18 +09:00
Tatsuhiro Tsujikawa
a8625e15f0
clang-format
2015-05-08 19:24:17 +09:00
Tatsuhiro Tsujikawa
e63d6e490a
Merge branch 'master' into v1.0.0
...
Conflicts:
lib/nghttp2_option.h
lib/nghttp2_session.h
src/HttpServer.cc
2015-05-08 19:21:51 +09:00
Tatsuhiro Tsujikawa
2d5d9d5d04
nghttpd: Add -m, --max-concurrent-streams option
2015-05-06 10:42:43 +09:00
Tatsuhiro Tsujikawa
7ecca39025
nghttpx: Fix heap-use-after-free bug in http/1 frontend
...
This is a regression introduced in
4be4d875f3
2015-05-05 23:45:39 +09:00
Tatsuhiro Tsujikawa
4be4d875f3
nghttpx: Log absolute URI for HTTP/2 or client proxy request
2015-05-04 23:24:33 +09:00
Tatsuhiro Tsujikawa
1ab707713f
nghttpx: Accept reference instead of pointer by upstream_accesslog
2015-05-04 22:45:34 +09:00
Tatsuhiro Tsujikawa
cc46d363c5
h2load: Refactor statistics hanlding to scale more upcoming new metrics
2015-05-04 22:36:21 +09:00
Tatsuhiro Tsujikawa
016d40ea0f
Merge branch 'include_pull_request' of https://github.com/alex-nalivko/nghttp2 into alex-nalivko-include_pull_request
2015-05-03 16:50:52 +09:00
Tatsuhiro Tsujikawa
b4e8bea4b5
clang-format
2015-05-03 16:47:32 +09:00
Tatsuhiro Tsujikawa
555d5abac9
Merge branch 'finer_stats' of https://github.com/ericcarlschwartz/nghttp2 into ericcarlschwartz-finer_stats
2015-05-03 16:37:02 +09:00
Alex Nalivko
3137dc4a70
h2load_spdy_session errno include
2015-05-02 19:33:04 +00:00
es
4bba4bf66c
update h2load to give connect time and ttfb stats
...
finer statistics for h2load: update per comments from tatsuhiro-t
finer stats for h2load: fixed formatting
2015-05-01 10:30:09 -07:00
Tatsuhiro Tsujikawa
9dc5259593
nghttpx: Take into account request URI in header size in https frontend
2015-04-29 22:23:25 +09:00
Tatsuhiro Tsujikawa
ea8a566d98
nghttpx: Send 431 if header field size exceeded the configuration limit
2015-04-29 21:39:46 +09:00
Tatsuhiro Tsujikawa
8c6f9e899f
nghttpx: Enforce header field buffer limit for SPDY frontend
2015-04-29 21:27:36 +09:00
Tatsuhiro Tsujikawa
552f675466
nghttpx: Add --header-field-buffer and --max-header-fields options
2015-04-29 21:10:59 +09:00
Tatsuhiro Tsujikawa
1c4df1832b
Update doc, mainly for RFC numbers
2015-04-28 23:05:00 +09:00
Tatsuhiro Tsujikawa
1ad1fe6005
Merge branch 'master' into v1.0.0
2015-04-28 22:48:34 +09:00
Tatsuhiro Tsujikawa
f05a4830c5
nghttp: Fix assertion error if very large value is given to -t
2015-04-28 21:51:28 +09:00
Tatsuhiro Tsujikawa
b41835f19b
h2load: Effectively disable flow control by setting large window size
...
Previously h2load used default flow control window as described in
HTTP/2 and SPDY specification. The window size is 64KiB, which is a
bit small, and cannot utilize full server performance when response
size is not too small. Basically, we do this kind of benchmarking
test to measure server's throughput, and optimal performance. Smaller
window certainly degrades performance even in local testing because
server is so fast that it has to wait for WINDOW_UPDATE from h2load.
To make default behaviour suitable for peak performance test, we
decided to disable flow control in h2load by setting large enough
window size.
Most users used h2load without -w or -W options, so they were
implicitly throttled by flow control and the result was affected by
that negatively. Now flow control is disabled by default, the result
may improve depending on the implementations.
2015-04-27 21:23:01 +09:00
Tatsuhiro Tsujikawa
eb05777d88
clang-format
2015-04-24 00:17:13 +09:00
Tatsuhiro Tsujikawa
db4a68454a
Merge branch 'master' into v1.0.0
...
Conflicts:
lib/includes/nghttp2/nghttp2.h
2015-04-24 00:13:15 +09:00
Tatsuhiro Tsujikawa
77c556901c
nghttpx: Increase maximum header field set size
2015-04-22 22:27:48 +09:00
Tatsuhiro Tsujikawa
4928959213
asio: Document asynchronous parameter for listen_and_serve
2015-04-22 22:25:16 +09:00
Xiaoguang Sun
92a1ca5917
Graceful shutdown and joinable server
2015-04-22 17:51:28 +08:00
Tatsuhiro Tsujikawa
5937b4b6f7
Merge branch 'master' into v1.0.0
2015-04-19 23:13:38 +09:00
Tatsuhiro Tsujikawa
102ea7c0bb
nghttpd: Cache fd
...
Implement fd caching for static files. The response body for such as
404 was dynamically generated previously, but now it is written in
temporally file and its fd is cached. Currently, cache is reference
counted and expired when count becomes 0. This makes caching is not
effective other than "busy" period, but we don't need this feature if
we are not busy.
2015-04-19 17:38:06 +09:00
Tatsuhiro Tsujikawa
c4e994c97d
nghttp: Add --no-push option to disable server push
2015-04-17 23:35:16 +09:00
Tatsuhiro Tsujikawa
0b41e20d54
nghttp: Show stream ID in statistics output
2015-04-17 23:35:16 +09:00
Tatsuhiro Tsujikawa
436595df98
nghttp: Remove --dep-idle option
...
In this commit, we made --dep-idle behaviour by default. This is
because the previous default behaviour is not reflect current usage of
dependency priority and never will be because of fragility of tree due
to stream closure.
2015-04-17 22:24:06 +09:00
Tatsuhiro Tsujikawa
d3561a63b1
nghttp: Depend on "leader" anchor if js is linked inside head element
2015-04-17 21:25:31 +09:00
Tatsuhiro Tsujikawa
e23225689f
nghttp: Use same priority anchor nodes as Firefox does
2015-04-16 23:56:37 +09:00
Tatsuhiro Tsujikawa
8f4e2d941f
Revert accidental change in nghttp.cc
2015-04-16 22:58:25 +09:00
Tatsuhiro Tsujikawa
dc335b9025
Improve weight handling a bit
2015-04-16 21:38:13 +09:00
Tatsuhiro Tsujikawa
82e2c5bd22
Never index authorization and small cookie header field
...
nghttp2 library now use Literal Header Field never Indexed for
"authorization" header field and small "cookie" header field,
regardless of nghttp2_nv.flags.
2015-04-15 23:58:56 +09:00
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
cf0576253f
Merge branch 'master' into v1.0.0
2015-04-08 18:10:04 +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
3e50ef439d
Announce h2, final HTTP/2 ALPN identifier
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
d0c27d5229
Send 24 bytes client magic byte string by library
...
Previously nghttp2_session_send() and nghttp2_session_mem_send() did
not send 24 bytes client magic byte string (MAGIC). We made
nghttp2_session_recv() and nghttp2_session_mem_recv() process MAGIC by
default, so it is natural to make library send MAGIC as well. This
commit makes nghttp2_session_send() and nghttp2_session_mem_send()
send MAGIC. This commit also replace "connection preface" with
"client magic", since we call MAGIC as "connection preface" but it is
just a part of connection preface. NGHTTP2_CLIENT_CONNECTION_PREFACE
macro was replaced with NGHTTP2_CLIENT_MAGIC. The already deprecated
NGHTTP2_CLIENT_CONNECTION_HEADER macro was removed permanently.
nghttp2_option_set_no_recv_client_preface() was renamed as
nghttp2_option_set_no_recv_client_magic(). NGHTTP2_ERR_BAD_PREFACE
was renamed as NGHTTP2_ERR_BAD_CLIENT_MAGIC.
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
ebf214c8fc
nghttp2_on_invalid_frame_recv_callback should have lib_error_code as param
...
nghttp2_error_code is HTTP/2 standard error code and is too coarse to
know what's going on.
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
250ea53e4b
Deal with 24 bytes client connection preface by default
...
Since HTTP/2 spec requires for client to send connection preface, it
is reasonable to make this option enabled by default. It is still a
use case to disable this, so replace this option with
nghttp2_option_set_no_recv_client_preface().
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
01af6ea70c
Remove ALTSVC related code
...
HTTP/2 and HPACK are going to be published as RFC, but ALTSVC is still
in draft state. To make our API stable, it would be better to remove
ALTSVC API for 1.0.0 release.
2015-04-05 23:15:20 +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
Tatsuhiro Tsujikawa
89b8039466
nghttp, nghttpd: Add --hexdump option to hexdump incoming traffic
...
The output format is similar to `hexdump -C`
2015-03-24 02:30:51 +09:00
Tatsuhiro Tsujikawa
661fb2eb0e
NULL-terminate name and value in nghttp2_nv
...
Guaranteeing NULL-termination is very useful when name or value are
used with C functions which requires NULL-terminated string.
2015-03-23 23:25:57 +09:00
Tatsuhiro Tsujikawa
6893608ae2
Use literal instead of computed value in token lookup
2015-03-21 23:03:37 +09:00
mod-h2-dev
076eefbed6
fix for segfault by reserving correct worker count
2015-03-16 17:42:22 +02:00
Tatsuhiro Tsujikawa
08ec5b3fc0
nghttp: Restore same message displayed when some requests failed
2015-03-14 18:32:53 +09:00
Tatsuhiro Tsujikawa
4219fe7822
Bump up libnghttp2_asio LT revision to 1:0:0
2015-03-14 18:20:00 +09:00
Tatsuhiro Tsujikawa
8ea26fddfd
Fix compile error "chosen constructor is explicit in copy-initialization"
2015-03-14 15:54:55 +09:00
Tatsuhiro Tsujikawa
98add63cdf
nghttp: Treat stream as success if we see END_STREAM from peer
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
7b90404072
nghttpx: Omit well-known port from hostport in downstream request
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
de0543f684
nghttpx: Refactor a bit
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
46e3be7b5b
nghttpx: Simplify backend request line construction
...
It turns out that the cause of complication in backend request line
construction is a absolute-form in HTTP/1 request. In HTTP/2, we have
separated pseudo-header fields and no problem at all. In this commit,
we parse request URI in HTTP/1 frontend and extract values from it to
make backend logic simpler. This patch removes host header field
emission in HTTP/2 backend if :authority is emitted. It also rewrites
host header field with authority part in absolute-form URI as per RFC
7230.
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
d46e50b112
nghttpx: Refactor DownstreamQueue to avoid expensive std::map
2015-03-12 01:13:55 +09:00
Tatsuhiro Tsujikawa
0f87cedc2d
nghttpx: Use doubly linked list for dconns_ and streams_
2015-03-11 21:35:47 +09:00
Tatsuhiro Tsujikawa
d34095cf49
nghttpx: Pin HTTP/2 upstream to one Http2Session to improve performance
2015-03-11 21:14:55 +09:00
Tatsuhiro Tsujikawa
4877f72a75
nghttpx: Optimize a bit
2015-03-11 00:42:18 +09:00
Tatsuhiro Tsujikawa
274b3a2296
nghttpx: Reset connection check timer on successful write while not checking
2015-03-11 00:27:51 +09:00
Tatsuhiro Tsujikawa
93013f4205
nghttpx: Remove --backend-http2-connection-check option, enable it by default
2015-03-11 00:22:05 +09:00
Tatsuhiro Tsujikawa
a0524ef05d
Fix busy loop
2015-03-11 00:11:51 +09:00
Tatsuhiro Tsujikawa
0e3ae63965
nghttpx: Add --backend-http2-connections-per-worker
2015-03-10 23:43:25 +09:00
Tatsuhiro Tsujikawa
3e14261ebf
nghttpx: Setting failure mode in on_connect() may affect other backends
2015-03-10 23:21:48 +09:00
Tatsuhiro Tsujikawa
446de923f3
nghttpx: Support multiple HTTP/2 session per worker
...
Currently, we use same number of HTTP/2 sessions per worker with given
backend addresses. New option to specify the number of HTTP/2 session
per worker will follow.
2015-03-10 23:20:21 +09:00
Tatsuhiro Tsujikawa
c5860fc6f4
nghttpx: Support multiple -b option for HTTP/2 backend
2015-03-10 21:54:29 +09:00
Tatsuhiro Tsujikawa
6b714030dd
nghttpx: Disable acceptor temporarily when process runs out of fd
2015-03-10 21:25:20 +09:00
Tatsuhiro Tsujikawa
8483225839
nghttpx: Don't rewrite host for CONNECT method
2015-03-10 00:44:35 +09:00
Tatsuhiro Tsujikawa
585af93828
nghttpx: Remove last write/read fields for TLS
...
It seems that we don't care about this since we don't change buffer
pointer between would-block write/read and next write/read. Somehow
we decided we need these fields. As a precaution, we set
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER in SSL_set_mode() for both server
and client contexts.
2015-03-10 00:11:11 +09:00
Tatsuhiro Tsujikawa
41e266181e
nghttpx: Attempt to improve HTTP/2 backend connection check
...
It turns out that writing successfully to network is not enough.
After apparently successful network write, read fails and then we
first know network has been lost (at least my android mobile network).
In this change, we say connection check is successful only when
successful read. We already send PING in this case, so we just wait
PING ACK with short timeout. If timeout has expired, drop connection.
Since waiting for PING ACK could degrade performance for fast reliably
connected network, we decided to disable connection check by default.
Use --backend-http2-connection-check to enable it.
2015-03-09 23:37:54 +09:00
Kazuho Oku
2a4f347dbc
do not send pseudo-headers when in HTTP/1
2015-03-09 11:40:13 +09:00
Tatsuhiro Tsujikawa
b9d6fff962
nghttpx: Allow accepting trailer part in h1 frontend
...
Downstream's headers mutation functions have been rewritten to share
code.
2015-03-08 18:39:45 +09:00
Tatsuhiro Tsujikawa
9ffbc45ba6
nghttpx: Allow sending trailer part in h1 backend link
2015-03-08 17:58:00 +09:00
Tatsuhiro Tsujikawa
961f41d7ce
nghttp, nghttpd: Add trailer header field when sending trailer part
2015-03-08 17:52:36 +09:00
Tatsuhiro Tsujikawa
928d3e5f3f
nghttpx: Allow sending trailer header field
2015-03-08 17:51:52 +09:00
Tatsuhiro Tsujikawa
42eeebc7f6
nghttpx: Add function to send trailer part in h1 frontend
2015-03-08 17:32:38 +09:00
Tatsuhiro Tsujikawa
991baf9e69
nghttpx: Use http2::copy_headers_to_nva in trailer part handling
2015-03-08 17:32:01 +09:00
Tatsuhiro Tsujikawa
6ad63a06b0
nghttpx: Support response trailer part handling in h1 backend
2015-03-08 17:20:38 +09:00
Tatsuhiro Tsujikawa
60c2fe5a2e
nghttpx: Support trailer-part in h2 <- h2 path
2015-03-08 16:48:45 +09:00
Tatsuhiro Tsujikawa
41b5077330
nghttpx: Support trailer part in h2 -> h2 path
2015-03-08 16:33:40 +09:00
Tatsuhiro Tsujikawa
d10dc4bb9b
nghttp, nghttpd: Clean up around NGHTTP2_DATA_FLAG_NO_END_STREAM
2015-03-08 16:28:23 +09:00
Tatsuhiro Tsujikawa
c4b487be05
asio: Add client::request::write_trailer()
2015-03-07 23:04:31 +09:00
Tatsuhiro Tsujikawa
c976a0fcd1
asio: Add server::response::write_trailer()
2015-03-07 19:26:42 +09:00
Tatsuhiro Tsujikawa
80a7523b49
nghttpd: Add --trailer to send trailer header fields
2015-03-07 17:50:03 +09:00
Tatsuhiro Tsujikawa
4c55a2340b
nghttp: Add --trailer optiont to send trailer header fields with -d option
2015-03-07 17:45:46 +09:00
Tatsuhiro Tsujikawa
196d7da53f
nghttpx: Use http2::expect_response_body()
2015-03-07 15:50:52 +09:00
Tatsuhiro Tsujikawa
6824319fe6
asio: Link with http-parser
2015-03-07 15:48:38 +09:00
Tatsuhiro Tsujikawa
66d00954a5
asio: Quote ServeMux documents in http2::handle()
2015-03-07 03:17:13 +09:00
Tatsuhiro Tsujikawa
a043230371
asio: Fix crach in client code
2015-03-07 01:38:59 +09:00
Tatsuhiro Tsujikawa
c2f49fa478
nghttpd: Fix bug that date header field value is not updated
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
773b108eeb
asio: Add noexcept for move constructor and move assignment operator
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
36a9cbf41f
asio: Use large window size for client
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
f8182333b4
asio: Improve date header field precision
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
c3265de625
asio: Remove signal handling from server
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
fa21b95274
asio: Provide move constructor and move assignment operator to server::http2
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
5dccc88a7c
asio: Add host_service_from_uri() to extract remote address from URI
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
2cadd38b6b
asio: Fix path matching in server
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
d7cfe464a2
asio: client::configure_tls_context takes error_code
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
018e9eaf6d
asio: Clean up server API to explicitly set error code
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
94ca9705ef
asio: Rewrite response body handling if response body is not expected
2015-03-06 21:36:40 +09:00
Tatsuhiro Tsujikawa
05a847b6b8
asio: Use passed URI for request
2015-03-06 02:35:44 +09:00
Tatsuhiro Tsujikawa
38788d707b
asio: Don't send response body if it is not expected by status code or method
2015-03-06 02:15:34 +09:00
Tatsuhiro Tsujikawa
44c0d32a1b
asio: Fix compile error with gcc
2015-03-06 02:05:01 +09:00
Tatsuhiro Tsujikawa
36aae8c310
asio: Move server::http2 to its own file
2015-03-06 01:58:56 +09:00
Tatsuhiro Tsujikawa
34ac90443f
asio: Rename http2::listen as http2::listen_and_serve
2015-03-06 01:54:28 +09:00
Tatsuhiro Tsujikawa
992c14e354
asio: Rename *_reader as *_generator and read_cb as generator_cb
2015-03-06 01:47:55 +09:00
Tatsuhiro Tsujikawa
529fc937dc
asio: Document public APIs
2015-03-06 01:41:06 +09:00
Tatsuhiro Tsujikawa
05b8d8c5b7
asio: Start sending response header when write_head is called
2015-03-06 00:06:53 +09:00
Tatsuhiro Tsujikawa
a1c937a007
src: Add missing dquote in HTML
2015-03-05 23:34:42 +09:00
Tatsuhiro Tsujikawa
8baec366f0
asio: Make redirect_handler and status_handler part of public API
2015-03-05 23:32:21 +09:00
Tatsuhiro Tsujikawa
c64bb62ffe
asio: Make redirect_handler use passed uri as is and percent-encode path part
2015-03-05 23:23:17 +09:00
Tatsuhiro Tsujikawa
6020b727d8
asio: Add signal_write() to server::http2_handler to avoid scattered ifs
2015-03-05 22:00:14 +09:00
Tatsuhiro Tsujikawa
7f04968950
asio: Add dtor to API classes
2015-03-05 21:51:44 +09:00
Tatsuhiro Tsujikawa
ca1f43dfca
asio: Export session_impl* from stream rather than delegating everything
2015-03-05 21:48:37 +09:00
Tatsuhiro Tsujikawa
9efb62f40b
asio: Move server classes to dedicated files
2015-03-05 21:42:48 +09:00
Tatsuhiro Tsujikawa
f1c7d3edfd
asio: Rename server::http2_stream as server::stream
2015-03-05 21:03:03 +09:00
Tatsuhiro Tsujikawa
7ff38eeb2e
asio: Start writing on cancel
2015-03-05 03:00:18 +09:00
Tatsuhiro Tsujikawa
e4ce595ebb
asio: Add serve_mux class to route incoming requet by path
...
serve_mux is direct port of ServeMux from go
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
8accf3898a
asio: Add client::request::resume() member function
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
690a1622aa
asio: Add const qualifier to client::session member functions
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
aaef798566
asio: Add server::response::io_service()
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
0753fcd6e5
asio: Add error_code parameter to cancel()
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
a14029744c
asio:: Add cancel() and on_close() to server::response
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
7e46d0b142
asio: Call signal_write() on session_impl::cancel()
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
726e6c087d
asio: server: Move push member function to response object
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
ff0eaf8399
asio: Indicate EOF by passing 0 to the second parameter to data_cb
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
7fb7575f78
asio: read_cb: Use similar semantics with nghttp2_data_source_read_callback
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
44642af227
asio: Remove unused struct header
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
e7d052100c
asio: Utilize aggregate or value-initialization for header_value
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
fc2170e488
asio: Use uri_ref in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
0cda2282dd
asio: Assign values to uri_ref directly
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
6753b6d61e
asio: Use header_map in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
35817876fe
asio: Move server API to asio_http2_server.h
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
7d753d779e
asio: Fix resource leak (socket not closed) in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
f6f908a541
asio: Make impl() const
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
b0c1986a46
asio: Avoid shared_ptr for request and response
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
9671eaa850
asio: Set stream pointer to request and response in stream ctor
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
062b42918c
asio: Remove threaded task runner
...
This is too complicated and not suitable for event driven server. We
plan to expose io_service instead.
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
2fa28e790d
asio: Separate client API to asio_http2_client.h
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
76eab3faa0
asio: Pass connected address to connect_cb
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
70ea774f23
asio: Clear up TLS peer verification
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
e15d302985
asio: Introduce uri_ref
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
b2196f215a
asio: Use boost::system::error_code for on_error callback
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
8afd75ca47
Make request, response const
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
0676535caf
Do async-resove in ctor
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
dd741a58ae
Use header_map instead of wrapping it
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
26304546c4
[WIP] Add asio client interface
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
c2426bc732
Merge branch 'pthread-getspecific' of https://github.com/icing/nghttp2 into icing-pthread-getspecific
2015-03-05 02:04:56 +09:00
Tatsuhiro Tsujikawa
08d0cdfd31
Fix typo
2015-03-04 02:48:20 +09:00
Stefan Eissing
1fd44b1567
replacing thread_local, which does not exist on OS X, with pthread_getspecific call
2015-03-03 17:09:15 +01:00
acesso
6a2e6b744f
Update shrpx_config.cc
...
declaration of make_socket_closeonexec need the proper scope here, it was there per request at https://github.com/tatsuhiro-t/nghttp2/pull/142 , not sure why is was removed.
2015-03-02 17:14:09 -03:00
Tatsuhiro Tsujikawa
4de8db523f
nghttpx: Check frame type in HTTP/2 backend on_begin_headers_callback
2015-03-02 00:53:48 +09:00
Tatsuhiro Tsujikawa
cf5ac0f363
nghttpx: Fix broken server push after HTTP upgrade
2015-03-01 11:03:48 +09:00
Tatsuhiro Tsujikawa
185ebd7b79
nghttpx: Fix crash when upgrading HTTP/2 failed
2015-03-01 10:11:45 +09:00
Tatsuhiro Tsujikawa
f3a0ab6552
nghttpd: Fix help output so that it can be generated in man/html nicely
2015-02-27 00:56:26 +09:00
Tatsuhiro Tsujikawa
1c2c5bdd05
Revert "nghttpx: Add missing Downstream::end_upload_data() call in HTTP/2 and SPDY"
...
This reverts commit ef090d425e
.
2015-02-27 00:32:48 +09:00
Tatsuhiro Tsujikawa
3715a89655
Merge branch 'bcard/address-nghttp2-server' of https://github.com/bcard/nghttp2 into bcard-bcard/address-nghttp2-server
...
Conflicts:
src/nghttp.cc
2015-02-27 00:02:45 +09:00
Tatsuhiro Tsujikawa
ef090d425e
nghttpx: Add missing Downstream::end_upload_data() call in HTTP/2 and SPDY
...
This ensures that all frontend code calls
Downstream::end_upload_data() when request was all received.
2015-02-26 23:50:21 +09:00
Tatsuhiro Tsujikawa
e1bb06d8ab
nghttpx: Remove unused error check
2015-02-26 23:46:42 +09:00
Brian Card
1bdf664f4d
Changing signature of numeric_name from numeric_name(addrinfo *addr)
...
to numeric_name(const struct sockaddr *sa, socklen_t salen) to remove
dependency on addrinfo struct.
2015-02-26 08:59:25 -05:00
Tatsuhiro Tsujikawa
1c0d617742
nghttpx: Rename WorkerConfig as LogConfig
...
This is a sign that we only use thread-local storage for logging only.
2015-02-26 00:02:29 +09:00
Tatsuhiro Tsujikawa
b161dfe573
nghttpx: Move graceful_shutdown flag from WorkerConfig to Worker
...
A part of an effort to eliminate thread_local WorkerConfig
2015-02-25 22:53:53 +09:00
Brian Card
b773d63b92
Moving nghttp's numeric_name function to util.cc and using this to generate the address name in HttpServer.cc
2015-02-24 09:50:18 -05:00
Tatsuhiro Tsujikawa
66b6787fbe
src: Use "sensitive" to indicate "never indexed" header field
2015-02-24 23:12:12 +09:00
Tatsuhiro Tsujikawa
1a2bccd71c
nghttpx: Share nghttp2_session_callbacks between objects
2015-02-24 15:21:10 +09:00
Tatsuhiro Tsujikawa
8417275368
nghttpx: Code cleanup
2015-02-24 15:11:09 +09:00
Tatsuhiro Tsujikawa
c98cf045d6
nghttpx: Use omit minor version in case of HTTP/2 in via header and accesslog
2015-02-24 14:43:01 +09:00
Brian Card
933b9636e5
removing additional space after option variable
2015-02-23 07:15:54 -05:00
Brian Card
d10bce3dc8
fixing formatiing
2015-02-23 07:13:03 -05:00
Tatsuhiro Tsujikawa
8b533e19bb
nghttpx: Remove option name from unix path sample since it is a bit strange
2015-02-22 18:09:37 +09:00
Tatsuhiro Tsujikawa
df32a534fc
nghttpx: Rename ConnectionHandler::acceptor4_ as acceptor_
...
This change is motivated by that fact that we use it for UNIX domain
socket as well as IPv4.
2015-02-22 17:59:50 +09:00
Tatsuhiro Tsujikawa
e583a25a8b
nghttpx: Fix error found by coverity scan
2015-02-22 17:53:12 +09:00
Tatsuhiro Tsujikawa
da2376effd
nghttpx: Add host_unix field to DownstreamAddr to tell it is UNIX domain sock
2015-02-22 17:25:23 +09:00
Tatsuhiro Tsujikawa
0c4ae3dea5
nghttpx: Support UNIX domain socket on frontend
...
This commit also fixes environment variables used to tell inherited
file descriptors to new binary are stacked up each time new binary is
executed.
2015-02-22 17:25:23 +09:00
Tatsuhiro Tsujikawa
e457c9a414
src: Add util::strieq_l
2015-02-22 15:32:48 +09:00
Tatsuhiro Tsujikawa
997f9233bc
nghttpx: Support UNIX domain socket in backend connections
2015-02-22 12:27:51 +09:00
Tatsuhiro Tsujikawa
49781da8f0
nghttpx: Don't need to const_cast to sockaddr*
2015-02-22 12:06:31 +09:00
Tatsuhiro Tsujikawa
7f9de007d0
nghttpx: Fix crash in http/1 backend when backend returns more bytes than CL
...
This is typically programming mistake that we did not check return
value before doing another.
2015-02-21 21:17:52 +09:00
Tatsuhiro Tsujikawa
c84a190ac7
nghttpx: Use return 0 instead of break for readability
2015-02-21 17:08:03 +09:00
Tatsuhiro Tsujikawa
a26a597453
nghttpx: Cast configuration value to rlim_t to avoid compile error on 32bit
2015-02-21 16:57:02 +09:00
Tatsuhiro Tsujikawa
04ef26473a
asio-lib: Increase output buffer size
2015-02-21 00:08:10 +09:00
Tatsuhiro Tsujikawa
7897f5b94b
asio-lib: Remove validation offered by nghttp2 lib
2015-02-21 00:06:05 +09:00
Tatsuhiro Tsujikawa
9302e3edf4
src: Use util::streq_l to compare against string literal
2015-02-20 23:57:40 +09:00
Tatsuhiro Tsujikawa
ab93a700ce
src: Announce h2 ALPN
2015-02-20 23:50:17 +09:00
Tatsuhiro Tsujikawa
4424cf5b65
nghttpx: Fix 1 second delay in HTTP/2 backend connection
2015-02-20 19:48:35 +09:00
Tatsuhiro Tsujikawa
00a83a44b4
nghttp: Simplify checking
2015-02-20 19:35:54 +09:00
Tatsuhiro Tsujikawa
f755ea3894
nghttpx: Simplify HttpsUpstream::on_read
2015-02-20 19:24:48 +09:00
Tatsuhiro Tsujikawa
50c4aa061f
nghttpx: Response with 503 when re-submission to backend failed
2015-02-20 19:23:52 +09:00
Tatsuhiro Tsujikawa
6657966334
nghttpx: HttpsUpdatem: Don't send error_page if response state is MSG_COMPLETE
2015-02-20 01:25:18 +09:00
Tatsuhiro Tsujikawa
512aa8942a
nghttp: Fix -H does not work with -u upgrade request
2015-02-20 01:16:49 +09:00
Tatsuhiro Tsujikawa
489b4f307c
nghttp, nghttpd, nghttpx: Remove validations libnghttp2 offers
2015-02-20 01:01:10 +09:00
Tatsuhiro Tsujikawa
b157d4ebb2
Validate HTTP semantics by default
...
Previously we did not check HTTP semantics and it is left out for
application. Although checking is relatively easy, but they are
scattered and error prone. We have implemented these checks in our
applications and also feel they are tedious. To make application
development a bit easier, this commit adds basic HTTP semantics
validation to library code. We do following checks:
server:
* HEADERS is either request header or trailer header. Other type of
header is disallowed.
client:
* HEADERS is either zero or more non-final response header or final
response header or trailer header. Other type of header is
disallowed.
For both:
* Check mandatory pseudo header fields.
* Make sure that content-length matches the amount of DATA we
received.
If validation fails, RST_STREAM of type PROTOCOL_ERROR is issued.
2015-02-20 01:01:10 +09:00
Tatsuhiro Tsujikawa
9845729709
nghttp: Update resource timing terminology according to Resource Timing TR
2015-02-18 00:45:52 +09:00
Tatsuhiro Tsujikawa
dbfc02cba0
nghttpx: Issue RST_STREAM if END_STREAM seen without final response
2015-02-18 00:36:49 +09:00
Tatsuhiro Tsujikawa
d1a1e882bf
nghttpx: Fix request re-submission bug in HTTP/2 backend
2015-02-17 23:15:53 +09:00
Tatsuhiro Tsujikawa
799778af69
Revert "nghttpx: Fix request resubmit bug on HTTP/2 backend connection check"
...
This reverts commit d45f5a51e4
.
2015-02-17 22:28:03 +09:00
Tatsuhiro Tsujikawa
d45f5a51e4
nghttpx: Fix request resubmit bug on HTTP/2 backend connection check
2015-02-17 21:50:32 +09:00
Tatsuhiro Tsujikawa
bb856fe4c5
nghttp: Fix unaligned field output in --stat
2015-02-15 16:24:04 +09:00
Tatsuhiro Tsujikawa
f87aaf1fbf
nghttp: Show '*' to mark pushed resources in --stat output
2015-02-15 12:46:00 +09:00
Tatsuhiro Tsujikawa
685dabc2d6
nghttp: Don't request already pushed resources
2015-02-15 12:36:18 +09:00
Tatsuhiro Tsujikawa
4cafdb7670
nghttp: Show received size in --stat
2015-02-15 12:36:13 +09:00
Tatsuhiro Tsujikawa
58d3b5b4a0
nghttpx: Fix occasional HTTP/2 backend connection failure with proxy
...
Previously if HTTP/1 proxy is used for backend connection, we read all
incoming bytes from proxy including response body, which may be part
of HTTP/2 protocol. While investigating this issue, we found that
http_parser_execute() returns 1-less length when we call
http_parser_pause() inside on_headers_complete callback. To
workaround this, we increment the return value by 1. This commit also
fixes possible segmentation fault error, which could be caused by the
lack of stopping libev watcher in disconnect().
2015-02-15 01:09:10 +09:00
Tatsuhiro Tsujikawa
011e3b325d
nghttpx: Cancel backend request when frontend HTTP/1 connection is lost
2015-02-13 22:41:50 +09:00
Tatsuhiro Tsujikawa
6f4f252907
nghttpd: Handle return value from server.run()
2015-02-12 23:18:25 +09:00
Tatsuhiro Tsujikawa
115d7133a0
nghttpx: Don't check HEADERS category in on_frame_not_send_callback
2015-02-12 22:44:29 +09:00
Tatsuhiro Tsujikawa
c462093555
src: Use same convention for len parameter in TLS I/O with cleartext I/O
2015-02-11 23:22:53 +09:00
Tatsuhiro Tsujikawa
364772f508
src: Fix error reported by coverity scan
2015-02-11 23:20:13 +09:00
Tatsuhiro Tsujikawa
ae0100a9ab
nghttpx: Refactor worker interface
2015-02-11 22:49:03 +09:00
Tatsuhiro Tsujikawa
756e2b3e9b
nghttp, h2load: Fix regression introduced in 795a22a
...
We missed wb.reset(), which makes write buffer's capacity becomes 0
and communication stalls eventually.
2015-02-11 21:42:11 +09:00
Tatsuhiro Tsujikawa
73b999a662
src: Fix crash
2015-02-11 01:05:22 +09:00
Tatsuhiro Tsujikawa
4401f697e5
src: Try to write immediately after read
2015-02-11 00:44:30 +09:00
Tatsuhiro Tsujikawa
f360b5c1e3
src: Prefer std::equal
2015-02-11 00:20:33 +09:00
Tatsuhiro Tsujikawa
07fdaaba45
src: Use case-insensitive match when parsing Link header field
2015-02-10 23:29:45 +09:00
Tatsuhiro Tsujikawa
7fa62c9904
src: Clean up string utlity functions
2015-02-10 23:16:34 +09:00
Tatsuhiro Tsujikawa
3e2714810a
src: Fix invalid memory access
2015-02-10 21:28:17 +09:00
Tatsuhiro Tsujikawa
68866f53b0
src: Use nullptr instead of 0, since they are char*
2015-02-09 23:45:20 +09:00
Tatsuhiro Tsujikawa
ad8e9a4741
src: Ignore URI with non-empty anchor parameter
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
3c5d8f446b
src: Fix typo
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
2e425e3cb6
src: Support backslash escapes in quoted-string when parsing Link header
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
1b00bc1929
src: Support rel with quoted value in Link header parser
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
d151759f8a
nghttpx: Fix location rewrite, take 2
2015-02-08 21:26:47 +09:00
Tatsuhiro Tsujikawa
807d39abe3
nghttpx: Fix location rewrite does not work
2015-02-08 18:54:24 +09:00
Tatsuhiro Tsujikawa
4d47c31ebe
src: Refactor parse_next_link_header_once
2015-02-08 17:47:21 +09:00
Tatsuhiro Tsujikawa
9e723b6b1d
src: Rename LinkHeader.url as LinkHeader.uri
2015-02-08 17:29:38 +09:00
Tatsuhiro Tsujikawa
7aff00496a
nghttpx: Log push request headers
2015-02-08 17:25:21 +09:00
Tatsuhiro Tsujikawa
0efdeab1db
nghttpx: Fix handling of return value from nghttp2_submit_push_promise
2015-02-08 17:21:27 +09:00
Tatsuhiro Tsujikawa
502b552b68
nghttpx: Add --no-server-push option
2015-02-08 16:19:12 +09:00
Tatsuhiro Tsujikawa
8c90e5314d
src: Update doc
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
af960f1982
nghttpx: Don't push if http2 proxy is used
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
7c09d5eb8d
nghttpx: PUSH_PROMISE from client is handled by library
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
88f0bc70c4
nghttpx: Reworkd inherited request headers in PUSH_PROMISE
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
b14cfaf308
src: Store token in Header object to avoid additional lookups
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
8dd8d68b83
src: Make index of header int16_t
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
c55d7343ca
nghttpx: Support server push using Link header field
...
nghttpx server push is initiated by looking for Link header field from
backend server response. Currently we only enable server push for
HTTP/1 backend and without HTTP/2 proxy mode. The URIs which have
rel=preload are eligible to resource to be pushed.
2015-02-08 16:10:00 +09:00
Tatsuhiro Tsujikawa
4dea318b5b
nghttpx: Fix compile error if SOCK_NONBLOCK is undefined
2015-02-08 00:49:56 +09:00
Tatsuhiro Tsujikawa
795a22a320
src: Remove ringbuf.h, use buffer.h instead
2015-02-06 23:40:34 +09:00
Tatsuhiro Tsujikawa
b4b2ddad3b
src: Rewrite defer function template
2015-02-06 23:27:15 +09:00
Tatsuhiro Tsujikawa
6ff67ae869
src: Move array_size to nghttp2 namespace
2015-02-06 22:44:09 +09:00
Tatsuhiro Tsujikawa
33879219ff
Refactor ALPN/NPN protocol selection and introduce NGHTTP2_PROTO_ALPN macro
2015-02-06 22:35:30 +09:00
Tatsuhiro Tsujikawa
4956bdc4da
src: Use std::copy_n
2015-02-06 21:35:03 +09:00
Tatsuhiro Tsujikawa
b165775811
nghttpx: Refactor CertLookupTree
2015-02-06 21:25:43 +09:00
Tatsuhiro Tsujikawa
90746cdd0e
nghttpx: Fix compile error with OpenSSL 1.0.2
2015-02-06 21:14:04 +09:00
Tatsuhiro Tsujikawa
4cda09beff
src: Prefer std::array
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
9a2d36fc6c
src: Use std::copy instead of std::copy_n since gcc-4.7 does not have it
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
ab6663c785
src: Use std::array instead of std::vector if size is compile time constant
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
54851ef7a6
src: Move make_unique to nghttp2 namespace
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
f8f9b36acd
http2: Use std::array for indexing headers
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
6774fa6e07
buffer: Refactor
2015-02-06 00:15:43 +09:00