Commit Graph

266 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa bcc97b8699 Implement CACHE_DIGEST frame for nghttp and nghttpd
We use https://tools.ietf.org/html/draft-kazuho-h2-cache-digest-01 as
specification.  We haven't implemented flags handling yet.
2016-07-03 11:33:07 +09:00
Tatsuhiro Tsujikawa e4dc6cf432 src: Use nghttp2_session_set_local_window_size() 2016-05-29 23:34:38 +09:00
Tatsuhiro Tsujikawa d00788ceeb nghttp: More robust error handling while reading file 2016-05-14 00:23:44 +09:00
Tatsuhiro Tsujikawa e0df95a1d8 nghttp: Eliminate zero length DATA frame at the end if possible 2016-05-14 00:18:22 +09:00
Tatsuhiro Tsujikawa 68059ccda9 nghttp: Use nghttp2_session_mem_recv 2016-04-21 23:30:35 +09:00
Tatsuhiro Tsujikawa 795ee8c20f altsvc: Receive ALTSVC frame 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa c17b3b8517 clang-format 2016-03-31 20:06:14 +09:00
Tatsuhiro Tsujikawa 2b22ec42c7 Merge branch 'dev/expect-continue' of https://github.com/jchampio/nghttp2 into jchampio-dev/expect-continue 2016-03-31 20:00:27 +09:00
Jacob Champion dfdeeb3815 nghttp: only stop ContinueTimers if they exist
Fix a crash on disconnect if --expect-continue isn't actually in use.
2016-03-29 16:02:10 -07:00
Jacob Champion 4bed7854b5 nghttp: move ownership of ContinueTimer to Request
Each Request now owns its own (optional) ContinueTimer for
Expect/Continue handshakes. This removes the need for
shared_ptr/weak_ptr logic.
2016-03-29 13:11:27 -07:00
Jacob Champion aa64e7ad3c nghttp: stop ContinueTimers on response or reset
If the stream itself is reset, or the server sends a final response
immediately, any Expect/Continue handshake should be cancelled.
2016-03-29 12:41:28 -07:00
Jacob Champion edb874e659 nghttp: move ContinueTimer start to on_frame_send
The ContinueTimer could expire before the full HEADERS frame was
actually sent. By moving the call to timer->start() to the
on_frame_send_callback(), this race is fixed.
2016-03-28 15:24:20 -07:00
Tatsuhiro Tsujikawa 0875e66aab src: Remove streq(const char *) overload 2016-03-25 00:02:07 +09:00
Jacob Champion 3b7b6a660e nghttp: prevent ContinueTimer double-invocation
If a 100 Continue interim response was received after the continue
timeout was reached, dispatch_continue() would force a double submission
of DATA frames. This patch prevents dispatch_continue() from doing
anything if the timer callback has already been invoked. This makes
ContinueTimer a single-shot mechanism, as originally intended.
2016-03-23 09:09:13 -07:00
Jacob Champion 1bc5cf5ee4 nghttp: time out on long Expect/Continue waits
To deal with servers that don't conform to RFC 7231 (or, potentially,
connections with a large round-trip time), don't wait forever for a 100
Continue status to come back. Currently, the timeout is hard-coded to
one second.

A ContinueTimer encapsulates the handshake timeout logic for a single
request. Somewhat counterintuitively, ContinueTimers are owned by the
HttpClient instead of the Request object, because their lifetime must be
bound to the life of the connection (which is owned by the HttpClient
and not the Requests). A Request is associated with its corresponding
ContinueTimer through a std::weak_ptr.
2016-03-22 13:10:00 -07:00
Jacob Champion f4c7ebcbca nghttp: implement Expect/Continue handshake
Requests that expect a 100 Continue will not submit their DATA frames
until the server sends the interim response.
2016-03-22 13:10:00 -07:00
Jacob Champion feb3d1b478 nghttp: add an --expect-continue option
Add a placeholder for the expect-continue option, which will perform an
Expect/Continue handshake for DATA uploads.
2016-03-22 13:10:00 -07:00
Tatsuhiro Tsujikawa 2a606bae4c Add nghttp2_error_callback to tell application human readable error message 2016-03-13 18:22:52 +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 907eeeda8a src: Return StringRef from util::get_uri_field 2016-03-08 21:38:15 +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 ff22862b9d nghttp: Limit incoming header field buffer 2016-02-11 23:20:31 +09:00
Tatsuhiro Tsujikawa 85bb37ab7c Enable ConstructorInitializerAllOnOneLineOrOnePerLine for better diff 2016-01-27 21:14:07 +09:00
Tatsuhiro Tsujikawa fe8005327a src: Make util::utos_with_unit and utos_with_funit names shorter 2016-01-11 18:12:31 +09:00
Tatsuhiro Tsujikawa 7ca9ead36b nghttp: Update doc for default value of -M 2015-12-04 23:08:58 +09:00
Tatsuhiro Tsujikawa a151a44caf Set max number of outgoing concurrent streams to 100 by default
Instead of using nonsensical large value for max outgoing concurrent
streams, use more sensible value, 100.
2015-12-03 23:45:03 +09:00
Tatsuhiro Tsujikawa 1ba28bef1f util: Remove unused functions; rename regacy camel-case function names 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa c0858d8c1a src: Minor optimization for appending single character 2015-11-28 00:03:16 +09:00
Tatsuhiro Tsujikawa c6ef1c02b9 Switch to clang-format-3.6 2015-11-13 00:53:29 +09:00
Tatsuhiro Tsujikawa c711a80411 src: Fix typo
Apply typo fixes to the original source files in the previous commit
which were done in generated text.
2015-11-09 21:43:25 +09:00
Tatsuhiro Tsujikawa eaefce3792 nghttp: Record request method to output it in har correctly 2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa 558934cee5 src: Use nghttp2_session_upgrade2 2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa 6958d0b55d nghttp: Use method given in -H with ":method" in HTTP Upgrade 2015-11-07 11:14:28 +09:00
Tatsuhiro Tsujikawa d1b8f60776 nghttp: Allow multiple -c option occurrence, and take min and last value 2015-10-24 18:11:47 +09:00
Tatsuhiro Tsujikawa d3475f5fe2 nghttp: Remove redundant std::move 2015-10-23 00:17:00 +09:00
Tatsuhiro Tsujikawa f0bf2233d2 Remove the word "experimental" since HTTP/2 has been finalized 2015-10-20 00:19:49 +09:00
Tatsuhiro Tsujikawa eff3dfd50b src: Move exception handling code to one function 2015-10-17 23:34:05 +09:00
Tatsuhiro Tsujikawa 5594e3df25 src: Handle exception in main 2015-10-17 11:52:33 +09:00
Tatsuhiro Tsujikawa f150f9aec4 Fix compile error without BoringSSL 2015-09-29 23:45:13 +09:00
Tatsuhiro Tsujikawa f0d2c9f94b Compile with BoringSSL
Compile with BoringSSL except for neverbleed and libnghttp2_asio.  The
former uses ENGINE and RSA_METHOD, and they are quite different
between OpenSSL and BoringSSL.  The latter uses boost::asio, which
calls OpenSSL functions deleted in BoringSSL.
2015-09-29 23:38:17 +09:00
Tatsuhiro Tsujikawa c6785abd1f nghttp: Check req is null, found by coverity 2015-09-16 22:18:09 +09:00
Tatsuhiro Tsujikawa ee4732a676 nghttp: Show error if HEADERS frame cannot be sent for whatever reason 2015-09-16 00:41:55 +09:00
Tatsuhiro Tsujikawa 921e393dcd src: Use <PATH> instead of <FILE> in usage text 2015-07-20 23:50:05 +09:00
Tatsuhiro Tsujikawa 5dc060c1a2 src: Use C++11 value-initialization, instead of memset-ing 0 2015-07-19 17:55:37 +09:00
Tatsuhiro Tsujikawa 7c301defbd clang-format src/nghttp.cc 2015-07-14 21:37:34 +09:00
Tatsuhiro Tsujikawa 8fcf5f60e4 nghttp: Add --max-concurrent-streams option 2015-07-08 00:22:21 +09:00
acesso 49c3d75f9a Right place for comment
comment of pushed moved from request to entry array
added stream_id as string to connection element as string
2015-06-29 15:31:00 -03:00
acesso 2ea1deafd0 Add comment on HAR on pushed objects
It seems that HAR 1.2 does not have a proper representaion for pushed objects. I could´t just add a custom parameter so I think a comment at response will not hurt anybody.
2015-06-27 09:47:53 -03:00
Tatsuhiro Tsujikawa 301df2a856 src: Disable SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 2015-06-22 23:26:45 +09:00
Tatsuhiro Tsujikawa 39f89f4a60 src: Use user-defined literals for k, m, and g. 2015-06-21 14:32:47 +09:00