Tatsuhiro Tsujikawa
23ecfd412d
nghttpx: Fix mruby compile error, clean up add_header interface
2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
3ff148811b
nghttpx: Use StringRef for add_hedeader
2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
6f1347fc8b
nghttpx: Tokenize trailer field as well so that we can ditch prohibited headers in HTTP/2
2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
d8c8a4631d
nghttpx: Interleave text/html pushed resources with associated resource
2016-02-14 00:28:08 +09:00
Tatsuhiro Tsujikawa
17758126fa
nghttpx: Add headers given in add-response-headers for mruby response
2016-02-13 22:31:38 +09:00
Tatsuhiro Tsujikawa
b440f585bc
nghttpx: Use Header to store custom request/response header fields
2016-02-13 22:19:05 +09:00
Tatsuhiro Tsujikawa
ee07694783
nghttpx: Add request-header-field-buffer and max-request-header-fields options
...
This commit adds request-header-field-buffer and
max-request-header-fields, and deprecates header-field-buffer and
max-header-fields options.
2016-02-06 17:22:23 +09:00
Tatsuhiro Tsujikawa
85bb37ab7c
Enable ConstructorInitializerAllOnOneLineOrOnePerLine for better diff
2016-01-27 21:14:07 +09:00
Tatsuhiro Tsujikawa
98253b1d0d
nghttpx: Use DefaultMemchunks as HTTP/2 and SPDY frontend response buffer
2016-01-27 15:28:01 +09:00
Tatsuhiro Tsujikawa
497ffc6387
nghttpx: Change pushed stream's priority
...
By default, as RFC 7540 calls for, pushed stream depends on its
associated (parent) stream. There are some situations that this is
sub-optimal. For example, if associated stream is HTML, and server is
configured to push css and javascript files which are in critical
rendering path. Then the default priority scheme is sub-optimal,
since browser typically blocks rendering while waiting for critical
resources. In this case, it is better to at least give pushed stream
the same priority of associated stream, and interleave these streams.
This change gives pushed stream the same priority of associated stream
if pushed stream has content-type "application/javascript" or
"text/css". The pushed stream now depends on the stream which
associated stream depends on. We use the same weight of associated
stream.
2016-01-21 21:11:57 +09:00
Tatsuhiro Tsujikawa
eb8649bf9b
nghttpx: Don't greedily read data from backend
...
This might help throughput, but it interfere stream priority. The
throughput issue is generally caused by the small buffer size to store
response body, which was 16K. We increased it to 128K to compensate
this change.
2016-01-20 11:20:15 +09:00
Tatsuhiro Tsujikawa
0402481be4
nghttpx: Organize connection related configuration into struct
2016-01-19 16:56:12 +09:00
Tatsuhiro Tsujikawa
16549bb276
nghttpx: Structured configurations for http and http2
2016-01-18 17:00:20 +09:00
Tatsuhiro Tsujikawa
ef5d981ab1
nghttpx: Simplify
2016-01-17 17:04:16 +09:00
Tatsuhiro Tsujikawa
d16ff1f519
nghttpx: Use StringAdaptor for Config::server_name
2016-01-17 01:15:11 +09:00
Tatsuhiro Tsujikawa
f25fd09bbb
nghttpx: Don't emit :authority if request dones not contain authority info
...
RFC 7540 says that proxy should not emit :authority when translating
HTTP/1 request in origin or asterisk form to HTTP/2. To keep this
semantics in tact, we should also refrain from emitting :authority if
it is missing (host header field is required in this case).
2016-01-16 21:12:51 +09:00
Tatsuhiro Tsujikawa
f8472f4709
nghttpx: Remove backend priority handling code
...
Currently, this does not do anything useful.
2016-01-15 00:17:40 +09:00
Tatsuhiro Tsujikawa
5a8cf94361
nghttpx: Refactor Downstream::response_sent_bodylen_
2016-01-14 23:54:28 +09:00
Tatsuhiro Tsujikawa
fa31d0940c
nghttpx: Refactor Downstream::request_datalen_
2016-01-14 23:36:47 +09:00
Tatsuhiro Tsujikawa
e7e52b11ce
nghttpx: Refactor Downstream::response_bodylen_
2016-01-14 23:20:44 +09:00
Tatsuhiro Tsujikawa
3b8889a2a1
nghttpx: Extract response related fields to Response struct
2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa
919f08eb38
nghttpx: Extract request related fields to Request struct
...
Header field related functions are now gathered into FieldStore class.
This commit only handles request. Subsequent commit will do the same
thing for response.
2016-01-14 01:04:32 +09:00
Tatsuhiro Tsujikawa
6566ea7d6b
nghttpx: Update doc
2016-01-11 17:36:47 +09:00
Tatsuhiro Tsujikawa
2f50bc1b3c
nghttpx: Take into account of trailers when applying max_header_fields
2016-01-05 16:47:44 +09:00
Tatsuhiro Tsujikawa
1753bea692
nghttpx: Support server push from HTTP/2 backend
...
This commits enables HTTP/2 server push from HTTP/2 backend to be
relayed to HTTP/2 frontend. To use this feature, --http2-bridge or
--client is required. Server push via Link header field contiues to
work.
2015-11-16 23:12:25 +09:00
Tatsuhiro Tsujikawa
c3459c9e86
nghttpx: Clarify return value of nghttp2_submit_push_promise is stream ID
2015-11-16 21:44:36 +09:00
Tatsuhiro Tsujikawa
fe8720341d
nghttpx: Fix crash on non-final response from backend server
2015-11-13 23:59:36 +09:00
Tatsuhiro Tsujikawa
c6ef1c02b9
Switch to clang-format-3.6
2015-11-13 00:53:29 +09:00
Tatsuhiro Tsujikawa
558934cee5
src: Use nghttp2_session_upgrade2
2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa
ac41946533
nghttpx: Use NGHTTP2_NV_FLAG_NO_COPY_NAME and NGHTTP2_NV_FLAG_NO_COPY_VALUE
...
For both HTTP/2 frontend and backend.
Also adds http2::stringify_status to optimize status code
serialization.
2015-11-05 23:47:11 +09:00
Tatsuhiro Tsujikawa
0155c9115a
nghttpx: Fix so that --padding option works again
2015-10-04 10:36:20 +09:00
Tatsuhiro Tsujikawa
e95b39d534
nghttpx: Fix sent bodylen logging
2015-10-03 19:14:26 +09:00
Tatsuhiro Tsujikawa
ccbaaa1e14
nghttpx: Fix freeze in large transfer
2015-10-03 19:00:16 +09:00
Tatsuhiro Tsujikawa
777e1ee2c5
nghttpx: Use send_data_callback for higher throughput
2015-10-03 17:56:37 +09:00
Tatsuhiro Tsujikawa
da89f9c150
nghttpx: Refactor client handler write
...
Move write buffer to Upstream objects
2015-10-03 11:09:42 +09:00
Tatsuhiro Tsujikawa
d22573086f
nghttpx: Add x-http2-push header field for pushed resource
...
Fixes GH-352
2015-09-14 00:28:19 +09:00
Tatsuhiro Tsujikawa
1148584526
nghttpx: Reserve room for required header fields for PUSH_PROMISE
2015-09-14 00:26:50 +09:00
Tatsuhiro Tsujikawa
57aee184ca
Update doc
2015-09-12 18:33:07 +09:00
Tatsuhiro Tsujikawa
3ce1c1d39f
nghttpx: Add date header field to error_reply and send_reply
2015-09-07 23:11:23 +09:00
Tatsuhiro Tsujikawa
1b63e6d478
nghttpx: Call request phase hook for pushed resource as well
2015-09-06 15:21:36 +09:00
Tatsuhiro Tsujikawa
28defbfb4a
nghttpx: Allow link header server push for HTTP/2 backend as well
2015-09-06 15:12:20 +09:00
Tatsuhiro Tsujikawa
1df682140c
nghttpx: Don't do mruby push with --no-server-push option
2015-09-06 00:06:48 +09:00
Tatsuhiro Tsujikawa
ef1595672c
nghttpx: Add Request#push in mruby scripting
...
Refactor Http2Upstream so that we can share code between link header
field based push and mruby push.
2015-09-06 00:05:07 +09:00
Tatsuhiro Tsujikawa
77958eab46
Merge branch 'master' into nghttpx-mruby
2015-09-05 19:04:04 +09:00
Tatsuhiro Tsujikawa
8f41accf41
nghttpx: Don't initiate push if client disabled push
2015-09-05 19:02:55 +09:00
Tatsuhiro Tsujikawa
e19d5efced
nghttpx: Allow absolute URI in Link header field for push
2015-09-05 19:01:02 +09:00
Tatsuhiro Tsujikawa
a9338f1c0e
nghttpx: Fix hang when error page is sent on response phase hook error
2015-09-04 22:34:40 +09:00
Tatsuhiro Tsujikawa
9e685a2734
nghttpx: Various test failures
2015-09-04 02:47:25 +09:00
Tatsuhiro Tsujikawa
d044c58558
nghttpx: Detect mruby presence and guard mruby related code with ifdef
2015-09-04 00:54:41 +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