Commit Graph

134 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa a31a2e3b2c nghttpx: Remember which resource is pushed
Remember which resource is pushed in order to conform to the semantics
described in RFC 8297.
2018-01-04 22:35:22 +09:00
Tatsuhiro Tsujikawa 4d1139f653 Remove SPDY 2017-12-17 13:28:44 +09:00
Tatsuhiro Tsujikawa b8fda6808b nghttpx: Cookie based session affinity 2017-11-01 22:18:03 +09:00
Tatsuhiro Tsujikawa aaeeec8f1c Fix typos 2017-10-28 22:25:42 +09:00
Tatsuhiro Tsujikawa 2576855ded nghttpx: Send non-final response to HTTP/1.1 or HTTP/2 client only 2017-09-21 21:42:56 +09:00
Tatsuhiro Tsujikawa e5b84fad09 nghttpx: Fix bug that old config is used during reloading config 2017-02-16 22:46:22 +09:00
Tatsuhiro Tsujikawa 685e926494 nghttpx: Add --accesslog-write-early option
--accesslog-write-early option is analogous to HAProxy's logasap.  If
used, nghttpx writes access log when response header fields are
received from backend rather than when request transaction finishes.
2017-01-13 22:12:21 +09:00
Tatsuhiro Tsujikawa 33aa327ef5 nghttpx: Fix access.log timestamp
access.log timestamp is now when request header fields are received,
rather than when access log is written.
2017-01-11 20:47:17 +09:00
Tatsuhiro Tsujikawa c4aeadd57d nghttpx: Retry h1 backend request if first write fails 2016-12-25 22:19:51 +09:00
Tatsuhiro Tsujikawa da01d8dedb nghttpx: Delete outdated comment 2016-11-03 16:48:24 +09:00
Tatsuhiro Tsujikawa 68a6d8c50b nghttpx: Realloc header buffer 2016-10-01 22:52:02 +09:00
Tatsuhiro Tsujikawa f267e400fa nghttpx: Migrate backend stream to another h2 session on graceful shutdown 2016-09-15 00:53:41 +09:00
Tatsuhiro Tsujikawa ad3d43b8be nghttpx: Add access log variable for backend host and port
Use $backend_host and $backend_port.  $backend_host is backend host
name given in --backend option.  It could be a path to UNIX domain
socket.
2016-08-05 00:04:47 +09:00
Tatsuhiro Tsujikawa d2f4e4e325 nghttpx: Always expect response trailer fields 2016-04-27 23:00:36 +09:00
Tatsuhiro Tsujikawa 2d2b72d4eb nghttpx: Don't add 0-length DATA when response HEADERS bears END_STREAM flag 2016-04-27 21:19:28 +09:00
Tatsuhiro Tsujikawa dcae6efaa2 nghttpx: Rewrite Downstream::assemble_request_cookie using StringRef 2016-03-19 11:38:09 +09:00
Tatsuhiro Tsujikawa 12dad32890 Add nghttp2_on_header_callback2 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa eb393985b7 nghttpx: Make a copy before adding header to Downstream 2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa b1b57cc740 nghttpx: Use StringRef for authority, scheme and path 2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa fa601e5ba3 Add isolation_threshold, use field to store block size rather than template parameter 2016-03-09 21:25:11 +09:00
Tatsuhiro Tsujikawa bae37e3e4a nghttpx: Add custom memory allocator mainly for header related objects 2016-03-09 21:16:28 +09:00
Tatsuhiro Tsujikawa b68be1e1fb src: Make token of type int32_t; we have no reason to use int16_t 2016-02-21 16:44:00 +09:00
Tatsuhiro Tsujikawa 9678daa46a nghttpx: Rename index_headers() as parse_content_length() 2016-02-20 23:30:02 +09:00
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 1703201084 nghttpx: Get rid of hdidx 2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa 85bb37ab7c Enable ConstructorInitializerAllOnOneLineOrOnePerLine for better diff 2016-01-27 21:14:07 +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 7b2d4b6ae6 nghttpx: Optimize logging further 2016-01-17 15:04:09 +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 698f00596d Update doc 2016-01-15 00:05:56 +09:00
Tatsuhiro Tsujikawa 5a8cf94361 nghttpx: Refactor Downstream::response_sent_bodylen_ 2016-01-14 23:54:28 +09:00
Tatsuhiro Tsujikawa 3218c160be nghttpx: Refactor Downstream::response_datalen_ 2016-01-14 23:49:21 +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 bdef0e0b1a nghttpx: Refactor Downstream::request_bodylen_ 2016-01-14 23:14:58 +09:00
Tatsuhiro Tsujikawa 6d6a00f1f5 nghttpx: Return assemble cookie on the fly 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa 3b8889a2a1 nghttpx: Extract response related fields to Response struct 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa a7fd37ffdf nghttpx: Remove FieldStore::set_last_{header,trailer}_value
Use FieldStore::append_last_{header,trailer}_value instead.
2016-01-14 01:04:53 +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 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 777e1ee2c5 nghttpx: Use send_data_callback for higher throughput 2015-10-03 17:56:37 +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 e06af02573 nghttpx: Add Response mruby object 2015-09-03 00:40:14 +09:00
Tatsuhiro Tsujikawa 45cdb10c46 nghttpx: Use ruby block to run request hook 2015-09-02 22:25:04 +09:00
Tatsuhiro Tsujikawa 1508c50a45 nghttpx: Add basic infrastructure for mruby support 2015-09-02 02:45:15 +09:00
Tatsuhiro Tsujikawa 44cbc785fc nghttpx: Don't reuse backend connection if it is not clean 2015-07-22 21:41:16 +09:00
Tatsuhiro Tsujikawa fc062976a1 nghttpx: Delete DownstreamConnection from Downstream explicitly 2015-07-15 23:31:32 +09:00