Commit Graph

1125 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 9302e3edf4 src: Use util::streq_l to compare against string literal 2015-02-20 23:57:40 +09:00
Tatsuhiro Tsujikawa ab93a700ce src: Announce h2 ALPN 2015-02-20 23:50:17 +09:00
Tatsuhiro Tsujikawa 4424cf5b65 nghttpx: Fix 1 second delay in HTTP/2 backend connection 2015-02-20 19:48:35 +09:00
Tatsuhiro Tsujikawa 00a83a44b4 nghttp: Simplify checking 2015-02-20 19:35:54 +09:00
Tatsuhiro Tsujikawa f755ea3894 nghttpx: Simplify HttpsUpstream::on_read 2015-02-20 19:24:48 +09:00
Tatsuhiro Tsujikawa 50c4aa061f nghttpx: Response with 503 when re-submission to backend failed 2015-02-20 19:23:52 +09:00
Tatsuhiro Tsujikawa 6657966334 nghttpx: HttpsUpdatem: Don't send error_page if response state is MSG_COMPLETE 2015-02-20 01:25:18 +09:00
Tatsuhiro Tsujikawa 512aa8942a nghttp: Fix -H does not work with -u upgrade request 2015-02-20 01:16:49 +09:00
Tatsuhiro Tsujikawa 489b4f307c nghttp, nghttpd, nghttpx: Remove validations libnghttp2 offers 2015-02-20 01:01:10 +09:00
Tatsuhiro Tsujikawa b157d4ebb2 Validate HTTP semantics by default
Previously we did not check HTTP semantics and it is left out for
application.  Although checking is relatively easy, but they are
scattered and error prone.  We have implemented these checks in our
applications and also feel they are tedious.  To make application
development a bit easier, this commit adds basic HTTP semantics
validation to library code.  We do following checks:

server:

* HEADERS is either request header or trailer header.  Other type of
header is disallowed.

client:

* HEADERS is either zero or more non-final response header or final
  response header or trailer header.  Other type of header is
  disallowed.

For both:

* Check mandatory pseudo header fields.
* Make sure that content-length matches the amount of DATA we
  received.

If validation fails, RST_STREAM of type PROTOCOL_ERROR is issued.
2015-02-20 01:01:10 +09:00
Tatsuhiro Tsujikawa 9845729709 nghttp: Update resource timing terminology according to Resource Timing TR 2015-02-18 00:45:52 +09:00
Tatsuhiro Tsujikawa dbfc02cba0 nghttpx: Issue RST_STREAM if END_STREAM seen without final response 2015-02-18 00:36:49 +09:00
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 bb856fe4c5 nghttp: Fix unaligned field output in --stat 2015-02-15 16:24:04 +09:00
Tatsuhiro Tsujikawa f87aaf1fbf nghttp: Show '*' to mark pushed resources in --stat output 2015-02-15 12:46:00 +09:00
Tatsuhiro Tsujikawa 685dabc2d6 nghttp: Don't request already pushed resources 2015-02-15 12:36:18 +09:00
Tatsuhiro Tsujikawa 4cafdb7670 nghttp: Show received size in --stat 2015-02-15 12:36:13 +09:00
Tatsuhiro Tsujikawa 58d3b5b4a0 nghttpx: Fix occasional HTTP/2 backend connection failure with proxy
Previously if HTTP/1 proxy is used for backend connection, we read all
incoming bytes from proxy including response body, which may be part
of HTTP/2 protocol.  While investigating this issue, we found that
http_parser_execute() returns 1-less length when we call
http_parser_pause() inside on_headers_complete callback.  To
workaround this, we increment the return value by 1.  This commit also
fixes possible segmentation fault error, which could be caused by the
lack of stopping libev watcher in disconnect().
2015-02-15 01:09:10 +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 6f4f252907 nghttpd: Handle return value from server.run() 2015-02-12 23:18:25 +09:00
Tatsuhiro Tsujikawa 115d7133a0 nghttpx: Don't check HEADERS category in on_frame_not_send_callback 2015-02-12 22:44:29 +09:00
Tatsuhiro Tsujikawa c462093555 src: Use same convention for len parameter in TLS I/O with cleartext I/O 2015-02-11 23:22:53 +09:00
Tatsuhiro Tsujikawa 364772f508 src: Fix error reported by coverity scan 2015-02-11 23:20:13 +09:00
Tatsuhiro Tsujikawa ae0100a9ab nghttpx: Refactor worker interface 2015-02-11 22:49:03 +09:00
Tatsuhiro Tsujikawa 756e2b3e9b nghttp, h2load: Fix regression introduced in 795a22a
We missed wb.reset(), which makes write buffer's capacity becomes 0
and communication stalls eventually.
2015-02-11 21:42:11 +09:00
Tatsuhiro Tsujikawa 73b999a662 src: Fix crash 2015-02-11 01:05:22 +09:00
Tatsuhiro Tsujikawa 4401f697e5 src: Try to write immediately after read 2015-02-11 00:44:30 +09:00
Tatsuhiro Tsujikawa f360b5c1e3 src: Prefer std::equal 2015-02-11 00:20:33 +09:00
Tatsuhiro Tsujikawa 07fdaaba45 src: Use case-insensitive match when parsing Link header field 2015-02-10 23:29:45 +09:00
Tatsuhiro Tsujikawa 7fa62c9904 src: Clean up string utlity functions 2015-02-10 23:16:34 +09:00
Tatsuhiro Tsujikawa 3e2714810a src: Fix invalid memory access 2015-02-10 21:28:17 +09:00
Tatsuhiro Tsujikawa 68866f53b0 src: Use nullptr instead of 0, since they are char* 2015-02-09 23:45:20 +09:00
Tatsuhiro Tsujikawa ad8e9a4741 src: Ignore URI with non-empty anchor parameter 2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa 3c5d8f446b src: Fix typo 2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa 2e425e3cb6 src: Support backslash escapes in quoted-string when parsing Link header 2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa 1b00bc1929 src: Support rel with quoted value in Link header parser 2015-02-09 23:25:10 +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 4d47c31ebe src: Refactor parse_next_link_header_once 2015-02-08 17:47:21 +09:00
Tatsuhiro Tsujikawa 9e723b6b1d src: Rename LinkHeader.url as LinkHeader.uri 2015-02-08 17:29:38 +09:00
Tatsuhiro Tsujikawa 7aff00496a nghttpx: Log push request headers 2015-02-08 17:25:21 +09:00
Tatsuhiro Tsujikawa 0efdeab1db nghttpx: Fix handling of return value from nghttp2_submit_push_promise 2015-02-08 17:21:27 +09:00
Tatsuhiro Tsujikawa 502b552b68 nghttpx: Add --no-server-push option 2015-02-08 16:19:12 +09:00
Tatsuhiro Tsujikawa 8c90e5314d src: Update doc 2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa af960f1982 nghttpx: Don't push if http2 proxy is used 2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa 7c09d5eb8d nghttpx: PUSH_PROMISE from client is handled by library 2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa 88f0bc70c4 nghttpx: Reworkd inherited request headers in PUSH_PROMISE 2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa b14cfaf308 src: Store token in Header object to avoid additional lookups 2015-02-08 16:10:01 +09:00