Commit Graph

240 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 880f948684 Enable IndentPPDirectives 2018-06-09 16:21:30 +09:00
Tatsuhiro Tsujikawa e65e7711ca Add comment on #endif 2018-04-03 21:39:44 +09:00
Tatsuhiro Tsujikawa 636ef51b0f Fix compile error with -Wunused-function 2018-04-03 21:33:09 +09:00
Bernard Spil 400934e5a3 [PATCH] Allow building without NPN
NPN has been superseeded by ALPN. OpenSSL provides a configure
option to disable npn (no-npn) which results in an OpenSSL
installation that defines OPENSSL_NO_NEXTPROTONEG in opensslconf.h

The #ifdef's look safe here (as the next_proto is initialized as
nullptr). Alteratively, macros could be defined for the used npn
methods that return a 0 for next_proto.

Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
2018-03-25 18:27:23 +02:00
Tatsuhiro Tsujikawa ff200bfcf3 clang-format-5.0 2017-11-23 14:19:12 +09:00
Tatsuhiro Tsujikawa 194acb1f2c src: Use nghttp2_error_callback2 2017-11-19 16:51:52 +09:00
Tatsuhiro Tsujikawa aaeeec8f1c Fix typos 2017-10-28 22:25:42 +09:00
Tatsuhiro Tsujikawa a584cf5a4f Use clang-format-4.0 2017-04-30 15:45:53 +09:00
Tatsuhiro Tsujikawa 69f63c529d src: Rename ssl.{h,cc} as tls.{h,cc}
nghttp2::ssl namespace was also renamed as nghttp2::tls.
2017-04-01 15:12:28 +09:00
Tatsuhiro Tsujikawa 9e8d9d658a src: Enable TLSv1.3 if OpenSSL supports it
If OpenSSL supports TLSv1.3, enable it by default for all applications
under src.  BoringSSL can work at the moment although it does not
unlock all the features nghttpx offers.  OpenSSL's TLSv1.3 support is
still WIP at the time of writing.
2017-02-15 22:34:53 +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