Commit Graph

231 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa f1beff1e10 src: Enable TLS 1.3 with boringssl
This commit enables TLS 1.3 using latest boringssl.  This doesn't
compile with OpenSSL or libressl at the moment.
2017-01-09 23:16:15 +09:00
Tatsuhiro Tsujikawa 3933280d29 src: Fix assertion error with boringssl
boringssl says:

/* It is an error to clear any bits that have already been set. (We can't try
 * to get a second close_notify or send two.) */
assert((SSL_get_shutdown(ssl) & mode) == SSL_get_shutdown(ssl));
2017-01-02 11:48:38 +09:00
Tatsuhiro Tsujikawa 208d71561a src: Add missing mandatory SP after status code 2016-11-04 02:19:37 +09:00
Tatsuhiro Tsujikawa 0cf6848646 clang-format-3.9 2016-10-15 18:36:04 +09:00
Tatsuhiro Tsujikawa 3ec71bf5a2 nghttpd: Add --encoder-header-table-size option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa 3753b47475 src: Fix compiler warnings 2016-05-31 21:26:21 +09:00
Tatsuhiro Tsujikawa e4dc6cf432 src: Use nghttp2_session_set_local_window_size() 2016-05-29 23:34:38 +09:00
Tatsuhiro Tsujikawa 5c82a36072 nghttpd: Set content-length in status response 2016-05-14 17:29:50 +09:00
Tatsuhiro Tsujikawa 15a9dfbaea nghttpd: Enable kqueue if it is available on the running platform 2016-05-06 23:45:56 +09:00
Tatsuhiro Tsujikawa 17ccbae084 src: Don't compare against c-string 2016-03-25 00:07:21 +09:00
Tatsuhiro Tsujikawa 0875e66aab src: Remove streq(const char *) overload 2016-03-25 00:02:07 +09:00
Tatsuhiro Tsujikawa dc3119303a Rewrite concat_string_ref 2016-03-20 17:55:17 +09:00
Tatsuhiro Tsujikawa d7051f5207 nghttpx: Add custom error pages 2016-03-19 23:41:21 +09:00
Tatsuhiro Tsujikawa db1ee3aa88 nghttpd: Use StringRef 2016-03-19 20:57:40 +09: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 c897d5b294 src: Use StringRef in parse_http_date 2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa 2782ef67de nghttpd: Remove unused function 2016-02-23 01:18:52 +09:00
Tatsuhiro Tsujikawa 9d15f9b00d nghttpd: Start SETTINGS timer after it is written to output buffer 2016-02-23 01:18:07 +09:00
Tatsuhiro Tsujikawa b0227d4051 nghttpd: Limit request header buffer 2016-02-11 23:20:31 +09:00
Tatsuhiro Tsujikawa 5659e295b3 nghttpd: Add trailer header field to status responses 2016-01-27 22:47:30 +09:00
Tatsuhiro Tsujikawa 5b195092e1 nghttpd: Add -w and -W options to change window size 2016-01-27 22:34:17 +09:00
Tatsuhiro Tsujikawa 85bb37ab7c Enable ConstructorInitializerAllOnOneLineOrOnePerLine for better diff 2016-01-27 21:14:07 +09:00
Tatsuhiro Tsujikawa b64fc3ac49 nghttpd: Add --no-content-length option to omit content-length in response 2016-01-07 22:51:47 +09:00
Tatsuhiro Tsujikawa 248a64f0b2 Compile with OpenSSL 1.1.0-pre1 2015-12-14 21:12:25 +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 c44ee44cc3 nghttpd: Fix compile error due to incomplete FileEntry 2015-11-23 21:25:12 +09:00
Tatsuhiro Tsujikawa c7304317d4 nghttpd: Check validity of cached file descriptor periodically
This commit adds ability to check status of cached file descriptor to
make sure that it can be reused.  We inspect last modification time
and number of hard links.  If last modification is changed from the
last validation time, or number of hard links gets 0, we don't reuse
file descriptor.  We also capped upper limit of the cached file
descriptors.  If the limit is reached, we will close file descriptor
which is least recently used, and its usecount is 0.
2015-11-21 16:05:08 +09:00
Tatsuhiro Tsujikawa 63aa3466e9 nghttpd: Fix crash with CONNECT request 2015-11-21 12:54:04 +09:00
Tatsuhiro Tsujikawa 8b4f6f1778 nghttpd: Defered eviction of cached fd using timer
To make use cache fd more robust manner (e.g. among several
connections), eviction of cached file descriptor now takes place using
timer.  The timer is started when there is no handler (no
connections).  The timeout value is hard-coded and 2 seconds.
2015-11-18 23:21:57 +09:00
Tatsuhiro Tsujikawa f29ccc9c20 nghttpd: Read /etc/mime.types to set content-type header field
User can change file name using --mime-types-file option.
2015-10-29 00:21:36 +09:00
Tatsuhiro Tsujikawa e3c95265a4 nghttpd: Fix leak when server failed to listen to given port 2015-10-21 22:27:15 +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 4a99853021 nghttpd: Fix crash without SSL/TLS 2015-08-21 22:50:15 +09:00
Tatsuhiro Tsujikawa 4b4a0f7492 nghttpd: GOAWAY if SSL/TLS requirements for HTTP/2 are not met 2015-08-20 21:21:56 +09:00
Tatsuhiro Tsujikawa 627d04fe6b nghttpd: Return date header field for 304 2015-08-17 23:49:01 +09:00
Tatsuhiro Tsujikawa 165cab7a29 nghttpd: Support HEAD request 2015-08-17 23:47:35 +09:00
Tatsuhiro Tsujikawa 6c8243f6d2 nghttpd: Add verbose output when SSL/TLS session is reused 2015-07-24 23:40:44 +09:00
Tatsuhiro Tsujikawa abce7c7210 nghttpd: Fix the bug that 304 response has non-empty body 2015-07-24 23:25:10 +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 68c0f8a310 Fix compile error with gcc-4.7
Use std::map::insert instead of std::map::emplace, since gcc-4.7 does
not support the latter.
2015-06-27 11:19:54 +09:00
Tatsuhiro Tsujikawa 301df2a856 src: Disable SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 2015-06-22 23:26:45 +09:00
Tatsuhiro Tsujikawa cebfdacc5a src: Use user-defined literals for time (hours and minutes) 2015-06-21 14:51:32 +09:00
Tatsuhiro Tsujikawa 39f89f4a60 src: Use user-defined literals for k, m, and g. 2015-06-21 14:32:47 +09:00
Tatsuhiro Tsujikawa c6c7145167 Fix compile warning with android NDK 2015-06-12 19:19:53 +09:00
Tatsuhiro Tsujikawa 34efc6b7a4 More constexpr 2015-05-29 22:36:05 +09:00
Tatsuhiro Tsujikawa fe752174a9 nghttpd: Close connection after settings timeout and GOAWAY was sent 2015-05-18 21:38:12 +09:00
Tatsuhiro Tsujikawa 0b27f005e0 Merge branch 'master' into v1.0.0
Conflicts:
	src/HttpServer.cc
2015-05-15 23:24:19 +09:00
Tatsuhiro Tsujikawa 38cfc5c47c Check more headers and funcs 2015-05-13 23:29:20 +09:00
Tatsuhiro Tsujikawa 5da49989f8 nghttpd: Add --echo-upload option to send back request body 2015-05-13 00:38:28 +09:00