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
011e3b325d
nghttpx: Cancel backend request when frontend HTTP/1 connection is lost
2015-02-13 22:41:50 +09:00
Tatsuhiro Tsujikawa
d151759f8a
nghttpx: Fix location rewrite, take 2
2015-02-08 21:26:47 +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
4cda09beff
src: Prefer std::array
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
b2fb888363
Share I/O code with all upstreams/downstream objects
2015-02-05 03:05:34 +09:00
Tatsuhiro Tsujikawa
b707cfe986
nghttpx: Fix busy loop when HTTP/2 backend reset after connection established
...
We have now Downstream retry count to be limited to 5 times. At 6th
failure, we send 503 message to client.
2015-02-03 01:47:04 +09:00
Tatsuhiro Tsujikawa
f1049a66e2
nghttpx: Detach DownstreamConnection early
2015-01-31 01:11:55 +09:00
Tatsuhiro Tsujikawa
6b1ef95d3f
nghttpx: Replace RingBuf with sequential Buffer
...
It turns out that we don't need circular buffer functionality. We
replaced RingBuf with simple sequential Buffer.
2015-01-29 22:57:56 +09:00
Tatsuhiro Tsujikawa
8ddad1a53d
nghttpx: Remove shrinking memchunks for now
...
It requires more careful optimization. Remove it for now.
2015-01-28 21:25:22 +09:00
Tatsuhiro Tsujikawa
4e68ca8233
integration: Add tests about via header field manipulation
...
This test reveals bug in SPDY upstream code, and contains its fix.
2015-01-27 00:19:57 +09:00
Tatsuhiro Tsujikawa
68510f1282
nghttpx: SpdyUpstream: Handle error from error_reply
2015-01-25 15:37:09 +09:00
Tatsuhiro Tsujikawa
5770c6bd04
nghttpx: Return 503 on hard disconnect in HTTP/2 backend
2015-01-21 23:30:48 +09:00
Tatsuhiro Tsujikawa
e219d6a94f
nghttpx: Clarify error_reply upstream method
...
There is no application level failure in h1 upstream. For h2, SPDY
upstreams, don't call DIE(), instead return -1 to delete handler.
2015-01-21 22:55:00 +09:00
Tatsuhiro Tsujikawa
41e72064e0
nghttpx: Log error in INFO level when frame cannot be sent
2015-01-21 22:49:00 +09:00
Tatsuhiro Tsujikawa
041d9863c2
nghttpx: Set request_start_time_ at Downstream ctor
...
.. so that we can avoid the problem that request_start_time_ is 0
2015-01-21 22:28:15 +09:00
Tatsuhiro Tsujikawa
8997e4369d
nghttpx: Adjust backend buffers
2015-01-21 01:47:43 +09:00
Tatsuhiro Tsujikawa
5a6d6ccbd4
nghttpx: Read from backend eagerly in all upstreams
2015-01-21 01:41:17 +09:00
Tatsuhiro Tsujikawa
16e91746d9
nghttpx: Return 400 error if multiple CLs are received in SPDY upstream
...
This change adds SPDY upstream tests.
2015-01-21 01:03:56 +09:00
Tatsuhiro Tsujikawa
8059380fb0
nghttpx: Don't need to set response state to MSG_COMPLETE after error_reply
2015-01-20 23:33:45 +09:00
Tatsuhiro Tsujikawa
a440bdf15e
nghttpx: Response 502 if HTTP/2 backend receives invalid Content-Length
2015-01-19 23:44:23 +09:00
Tatsuhiro Tsujikawa
af24f8394e
nghttpx: Fix nghttp2 error code use in SPDY upstream
2015-01-17 21:35:36 +09:00
Tatsuhiro Tsujikawa
62b9e4bb56
nghttpx: Validate received request body length against content-length
2015-01-17 21:33:23 +09:00
Tatsuhiro Tsujikawa
441f1cc282
nghttpx: Validate received response body length against content-length
2015-01-17 21:33:23 +09:00
Tatsuhiro Tsujikawa
90914b38f1
nghttpx: Do not limit DATA frame length
2015-01-07 01:25:43 +09:00
Tatsuhiro Tsujikawa
d80952a2bc
nghttpx: Implement stream level timeout using ev_timer
2015-01-06 00:30:57 +09:00
Tatsuhiro Tsujikawa
3ae44ef2f3
nghttpd, nghttpx: Rework incoming header handling
2015-01-05 01:46:41 +09:00
Tatsuhiro Tsujikawa
db6eec653b
Fix errors reported by scan-build
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
7db1864766
nghttpx: Add --backend-http1-connections-per-frontend option
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
bfac015d61
src: Use libev for rest of the applications
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
5fa9dd7cd5
nghttpx: Remove unused variable
2014-12-16 01:10:54 +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
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
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
b1f807abd1
Reformat lines with clang-format-3.5
2014-11-27 23:56:30 +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
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
ce71e65aee
nghttpx: Replace WARNING with WARN for consistency
2014-11-08 10:51:56 +09: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
0d4120ce2c
nghttpx: Apply same fix from a225bb2
to spdy upstream
2014-10-13 21:13:45 +09:00
Tatsuhiro Tsujikawa
b305495a75
nghttpx: Reset both timeouts when either read or write succeeds
...
Previously read and write timeouts work independently. When we are
writing response to the client, read timeout still ticks (e.g., HTTP/2
or tunneled HTTPS connection). So read timeout may occur during long
download. This commit fixes this issue. This commit only fixes the
upstream part. We need similar fix for the downstream.
2014-09-18 23:03:36 +09:00
Tatsuhiro Tsujikawa
8890e593e6
src: Add util::array_size
2014-08-28 00:45:12 +09:00