Tatsuhiro Tsujikawa
02adaac368
nghttpx: Write h1 header into downstream buffer directly
2015-09-11 23:49:47 +09:00
Tatsuhiro Tsujikawa
200217d8ea
nghttpx: Store empty string to path for server-wide OPTIONS request
...
This change is required to show path attribute to mruby script. It is
desirable to construct URI from parts. Just checking method and path
is "*" is awkward.
2015-09-04 00:14:09 +09:00
Tatsuhiro Tsujikawa
02bb2c3e83
nghttpx: Create authority from host or authority-form for CONNECT request
2015-09-03 23:36:49 +09:00
Tatsuhiro Tsujikawa
baadec5ef4
nghttpx: Add response mruby hook
2015-09-03 01:33:52 +09:00
Tatsuhiro Tsujikawa
e91a576179
nghttpx: Rewrite TLS async handshake using memchunk buffers
2015-08-13 00:42:59 +09:00
Tatsuhiro Tsujikawa
cd25c6846e
nghttpx: Create struct Address which holds struct sockaddr_union and length
2015-07-27 01:41:10 +09:00
Tatsuhiro Tsujikawa
efcd43a367
nghttpx: Don't enable read timer while connecting to HTTP/1 server
2015-07-27 01:18:52 +09:00
Tatsuhiro Tsujikawa
fc062976a1
nghttpx: Delete DownstreamConnection from Downstream explicitly
2015-07-15 23:31:32 +09:00
Tatsuhiro Tsujikawa
20e63151a5
nghttpx: Fix bug that idle timer is used after reuse
2015-07-15 23:18:32 +09:00
Tatsuhiro Tsujikawa
6d10799301
nghttpx: Don't pool failed HTTP/1 backend connection
2015-07-15 19:46:48 +09:00
Tatsuhiro Tsujikawa
6307f96fb3
nghttpx: Enable host-path backend routing in HTTP/2 backend
...
To achieve host-path backend routing, we changed behaviour of
--backend-http2-connections-per-worker. It now sets the number of
HTTP/2 physical connections per pattern group if pattern is used in -b
option.
Fixes GH-292
2015-07-12 23:02:30 +09:00
Tatsuhiro Tsujikawa
3119fc259c
Select backend based on request host and path by extending -b option
...
-b option syntax is now <HOST>,<PORT>[;<PATTERN>[:...]]. The optional
<PATTERN>s specify the request host and path it is used for. The
<PATTERN> can contain path, host + path or host. The matching rule is
closely designed to ServeMux in Go programming language.
2015-07-11 00:15:52 +09:00
Tatsuhiro Tsujikawa
39f89f4a60
src: Use user-defined literals for k, m, and g.
2015-06-21 14:32:47 +09:00
Tatsuhiro Tsujikawa
8aab74ad36
nghttpx: Refactor a bit
2015-06-16 21:31:33 +09:00
Tatsuhiro Tsujikawa
41dd5f6897
nghttpx: Tokenize request method
...
We share the same method value with http-parser. This commit also
returns 501 for unknown request method on HTTP/2 and SPDY frontend.
2015-06-09 23:33:14 +09:00
Tatsuhiro Tsujikawa
bbbddedb8f
Fix compiler warning
2015-06-06 23:37:46 +09:00
Tatsuhiro Tsujikawa
00efa86fb6
nghttpx: Add --add-request-header option
2015-06-05 23:04:20 +09:00
Tatsuhiro Tsujikawa
323fc8c552
nghttpx: Make WebSocket upgrade work
...
This commit makes sure that WebSocket upgrade works for HTTP/1.1
frontend and backend pair. Actually, this implementation probably
supports other upgrade as well, other than HTTP/2 Upgrade, which is
handled specially in other place.
2015-05-26 22:26:17 +09:00
Tatsuhiro Tsujikawa
5fdb36239a
nghttpx: Don't send Expect header field twice
2015-05-25 23:59:18 +09:00
Tatsuhiro Tsujikawa
9a0b9428da
nghttpx: Fill request scheme in upstream
...
We may log before filling scheme in Downstream, so we leave
construct_absolute_request_uri as is.
2015-05-22 02:22:59 +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
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
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
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
12ced1cddc
nghttpx: Add flag to track connection state in HTTP/1 backend
2015-03-29 01:47:22 +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
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
8483225839
nghttpx: Don't rewrite host for CONNECT method
2015-03-10 00:44:35 +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
6ad63a06b0
nghttpx: Support response trailer part handling in h1 backend
2015-03-08 17:20:38 +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
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
49781da8f0
nghttpx: Don't need to const_cast to sockaddr*
2015-02-22 12:06:31 +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
ae0100a9ab
nghttpx: Refactor worker interface
2015-02-11 22:49:03 +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
6ff67ae869
src: Move array_size to nghttp2 namespace
2015-02-06 22:44:09 +09:00
Tatsuhiro Tsujikawa
4cda09beff
src: Prefer std::array
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
b2fb888363
Share I/O code with all upstreams/downstream objects
2015-02-05 03:05:34 +09:00
Tatsuhiro Tsujikawa
a68c4c1e3c
nghttpx: Add --no-host-rewrite option
2015-02-04 01:42:26 +09:00
Tatsuhiro Tsujikawa
82f90f9030
nghttpx: Rewrite :authority and host header field
...
We don't rewrite them if -s or -p is used
2015-02-04 01:42:19 +09:00
Tatsuhiro Tsujikawa
ecfd593076
nghttpx: Call ConnectBlocker::on_success when connection is established
2015-01-23 23:00:18 +09:00
Tatsuhiro Tsujikawa
a0028ea8ef
nghttpx: Add logging when downstream connect is blocked by connect_blocker
2015-01-23 00:15:38 +09:00
Tatsuhiro Tsujikawa
d174ffeb00
memchunk: Rename append_cstr as append
...
We may later add append(const T &), where we require T for .size() and
.data(). We can coexist former append_cstr and new one. If we pass
string literal, append(const (&)[N]) is selected.
2015-01-22 23:54:30 +09:00
Tatsuhiro Tsujikawa
ac1cc56fbb
nghttpx: Stop wev_ on h1 backend connect failure
2015-01-22 21:13:34 +09:00