Commit Graph

365 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
2ca0bb0a2f Remove src/includes 2022-12-26 19:45:33 +09:00
Tatsuhiro Tsujikawa
e6d608b522 Remove deprecated libnghttp2_asio 2022-12-24 18:41:49 +09:00
Tatsuhiro Tsujikawa
15a8d913ea examples/client: Enable ALPN 2021-10-17 17:25:18 +09:00
Tatsuhiro Tsujikawa
65d3c9047f Replace TLSv23_method with TLS_method 2021-10-17 17:21:09 +09:00
Tatsuhiro Tsujikawa
8c36971ea9 Compile with OPENSSL_NO_DEPRECATED and fix memory leaks 2021-10-17 17:12:14 +09:00
Tatsuhiro Tsujikawa
474a6db00c Compile with gcc 2021-10-06 21:28:17 +09:00
Tatsuhiro Tsujikawa
a2e2e46af3 Build with OpenSSL v3.0.0 2021-09-09 18:35:35 +09:00
Tatsuhiro Tsujikawa
2f2b211766 Add LIBTOOL_LDFLAGS configure variable 2021-02-21 21:32:48 +09:00
Tatsuhiro Tsujikawa
c64d2573dc Replace http-parser with llhttp
llhttp does not include URL parser.  We extracted URL parser code from
http-parser and put it under third-party/url-parser.

llhttp bd3d224eb8cdc92c6fc8f508d7bbe0ba266e8e92
2019-04-20 18:42:30 +09:00
Tatsuhiro Tsujikawa
880f948684 Enable IndentPPDirectives 2018-06-09 16:21:30 +09:00
Tatsuhiro Tsujikawa
b48bcb214a examples: Use C style comment in .c files 2018-04-03 22:08:24 +09:00
Tatsuhiro Tsujikawa
6f3ce2c72d examples: Remove unused lambda capture 2018-04-03 22:07:02 +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
03084f7517 examples: Make client and server work with libevent-2.1.8 2017-10-29 23:09:23 +09:00
Dmitriy Vetutnev
af926fbe1f Refactoring include directories for build as CMake subdirectory (add_subdirectory(nghttp2)) 2017-08-16 21:28:12 +03:00
Tatsuhiro Tsujikawa
4b51ccbefe examples: Attempt to fix OpenSSL link error 2017-05-25 23:24:44 +09:00
Tatsuhiro Tsujikawa
85a12429ee Eliminate _U_ macro
Instead use (void)VAR for better compiler compatibility.
2017-03-11 18:45:49 +09:00
Alexis La Goutte
8256c6e070 libevent-client: fix Incorrect format found by PVS Studio (V576)
Consider checking the fourth actual argument of the 'fprintf' function. The SIGNED integer type argument is expected.
2017-01-03 22:03:53 +01:00
Tatsuhiro Tsujikawa
d2f456e5b1 Remove tiny-nghttpd from cmake build system 2016-12-14 23:56:02 +09:00
Tatsuhiro Tsujikawa
30a44b26d3 examples: Delete tiny-nghttpd
nghttpd does the better job in this area.
2016-12-14 23:26:52 +09:00
Tatsuhiro Tsujikawa
0cf6848646 clang-format-3.9 2016-10-15 18:36:04 +09:00
Tatsuhiro Tsujikawa
ca39c71ac3 examples: Fix compile error with OpenSSL v1.1.0-beta2 2016-07-06 23:32:50 +09:00
Tatsuhiro Tsujikawa
ad7cded2f4 examples: Check return value from nghttp2_submit_settings 2016-06-26 19:57:29 +09:00
Tatsuhiro Tsujikawa
fdc27c9f0e Specify 1 for 2nd parameter of fwrite as a convention 2016-06-22 23:29:09 +09:00
Tatsuhiro Tsujikawa
cdd72bad77 examples: Add ALPN support to tutorial client/server
This commit adds ALPN support to tutorial client/server.  It also adds
a code to check h2 was negotiated, if not, drop connection.

For tutorial server, now it sends connection preface just after TLS
handshake was made without waiting for the client connection preface.
2016-06-19 22:32:47 +09:00
Peter Wu
dad222b8f4 cmake: fix jemalloc, libevent include dirs
Caught with cmake --warn-uninitialized.
2016-03-13 16:42:35 +01:00
Peter Wu
7f8110601e cmake: fix compatibility with cmake before 3.3
The COMPILE_LANGUAGE generator expression is only supported since CMake
3.3. Moreover, it does not work with all generators (works with Makefile
and Ninja, but not with Visual Studio).

target_compile_options would only work if a target does not mix C and
C++ sources, since the flags are intended to be set for a specific
language, use set_source_files_properties instead. This approach is also
less repetitive.

Drop the idea of using lists and COMPILE_OPTIONS,
set_source_files_properties only understands COMPILE_FLAGS (a single
string, not a list).
2016-03-13 12:30:41 +01:00
Peter Wu
bdb6581990 Add CMake-related files to EXTRA_DIST 2016-03-12 01:38:12 +01:00
Peter Wu
8bca2d1048 cmake: fix libevent binary names
Match the output produced by autotools (libevent-client instead of
libevent_client).
2016-02-29 16:11:26 +01:00
Peter Wu
55b270587b cmake: build examples 2016-02-13 20:13:43 +01:00
Peter Wu
17215002a1 examples: fix compile warnings
Fixes the following two warnings:

    examples/client.c:292:0: error: macro "MAX_OUTLEN" is not used [-Werror=unused-macros]
    examples/tiny-nghttpd.c:298:13: error: function declaration isn’t a prototype [-Werror=strict-prototypes]

Caught using cmake as the autoconf check fails due to unused macros
(HAVE_xxx in conftest.c) and a main function without parameters
respectively.
2016-02-13 20:11:50 +01:00
Tatsuhiro Tsujikawa
7a6a59178a Don't taint CXXFLAGS from AX_CXX_COMPILE_STDCXX_11 2016-01-30 18:42:48 +09:00
Tatsuhiro Tsujikawa
2f80c453bb Add C++ compiler flags with --enable-werror, remove -Wall from CPPFLAGS 2016-01-22 22:48:45 +09:00
Tatsuhiro Tsujikawa
c6ef1c02b9 Switch to clang-format-3.6 2015-11-13 00:53:29 +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
170f2a144a Fix warning with gcc 2015-09-23 18:26:02 +09:00
Tatsuhiro Tsujikawa
28fe3e7e89 More warning flags for --enable-werror 2015-09-23 16:49:45 +09:00
Tatsuhiro Tsujikawa
43d6f6b16a Compile with IRIX gcc-4.7
Patch from Klaus Ziegler
2015-07-01 21:30:27 +09:00
Tatsuhiro Tsujikawa
0cb4750e3c libevent-client: Fix bug that path is broken if URI does not contain path part 2015-06-01 00:22:35 +09:00
Tatsuhiro Tsujikawa
791660ef8d Fix up OpenSSL initialization
Use the example presented at
http://en.wikibooks.org/wiki/OpenSSL/Initialization
2015-05-23 00:23:38 +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
53bfc70c9e Include inttypes.h (or cintypes for C++) instead of stdint.h
From autoconf manual, section 5.6.1 Portability of Headers, says:

"""
The C99 standard says that inttypes.h includes stdint.h, so there's no
need to include stdint.h separately in a standard environment. Some
implementations have inttypes.h but not stdint.h (e.g., Solaris 7),
but we don't know of any implementation that has stdint.h but not
inttypes.h.
"""
2015-05-14 00:17:45 +09:00
Tatsuhiro Tsujikawa
38cfc5c47c Check more headers and funcs 2015-05-13 23:29:20 +09:00
Tatsuhiro Tsujikawa
2f2a7ace81 Fix corresponding upstream source reported in previous commits accordingly 2015-05-12 23:24:18 +09:00
Tatsuhiro Tsujikawa
e63d6e490a Merge branch 'master' into v1.0.0
Conflicts:
	lib/nghttp2_option.h
	lib/nghttp2_session.h
	src/HttpServer.cc
2015-05-08 19:21:51 +09:00
Alexis La Goutte
a62778d6b0 fix comma at end of enumerator list [-Wpedantic] 2015-04-30 07:49:55 +02:00
Tatsuhiro Tsujikawa
1ad1fe6005 Merge branch 'master' into v1.0.0 2015-04-28 22:48:34 +09:00
Tatsuhiro Tsujikawa
eb05777d88 clang-format 2015-04-24 00:17:13 +09:00