Tatsuhiro Tsujikawa
992c14e354
asio: Rename *_reader as *_generator and read_cb as generator_cb
2015-03-06 01:47:55 +09:00
Tatsuhiro Tsujikawa
42c174e803
asio: Add example to use timer to achieve delayed response
2015-03-06 01:04:46 +09:00
Tatsuhiro Tsujikawa
05b8d8c5b7
asio: Start sending response header when write_head is called
2015-03-06 00:06:53 +09:00
Tatsuhiro Tsujikawa
e4ce595ebb
asio: Add serve_mux class to route incoming requet by path
...
serve_mux is direct port of ServeMux from go
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
726e6c087d
asio: server: Move push member function to response object
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
e7d052100c
asio: Utilize aggregate or value-initialization for header_value
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
fc2170e488
asio: Use uri_ref in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
566baab307
asio: asio-cl: Disable peer verification to make development easier
...
Don't do this in practice
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
6753b6d61e
asio: Use header_map in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
35817876fe
asio: Move server API to asio_http2_server.h
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
b0c1986a46
asio: Avoid shared_ptr for request and response
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
062b42918c
asio: Remove threaded task runner
...
This is too complicated and not suitable for event driven server. We
plan to expose io_service instead.
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
2fa28e790d
asio: Separate client API to asio_http2_client.h
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
76eab3faa0
asio: Pass connected address to connect_cb
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
70ea774f23
asio: Clear up TLS peer verification
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
e15d302985
asio: Introduce uri_ref
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
b2196f215a
asio: Use boost::system::error_code for on_error callback
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
8afd75ca47
Make request, response const
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
0676535caf
Do async-resove in ctor
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
dd741a58ae
Use header_map instead of wrapping it
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
26304546c4
[WIP] Add asio client interface
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
3144f7de72
asio-sv2: Fix compile error with OS X
...
Use struct stat.st_mtime instead of st_mtim which seems to be Linux
specific.
2015-02-21 21:02:40 +09:00
Tatsuhiro Tsujikawa
fe84ec5e8b
tiny-nghttpd: Add token lookup for slight optimization
2015-02-20 21:50:02 +09:00
Tatsuhiro Tsujikawa
2216fd2bc1
tiny-nghttpd: Remove validations offered by lib
2015-02-20 20:58:11 +09:00
Tatsuhiro Tsujikawa
2dd6353e24
examples/client: Send SETTINGS
2015-02-06 01:22:29 +09:00
Tatsuhiro Tsujikawa
fbd9bcb00e
Use _LDADD to specify libraries instead of _LDFLAGS
...
This is because _LDFLAGS comes before _LDADD. If we specify a library
and another library in _LDADD depends on it, we get undefined
reference error.
2015-01-25 00:58:30 +09:00
Tatsuhiro Tsujikawa
8bfd900be5
src, examples: Check return value
2015-01-07 00:26:17 +09:00
Alexis La Goutte
27fa4d310a
Fix: error pointer target types incompatible in C++ [-Werror=c++-compat]
2014-12-16 17:54:47 +01:00
Tatsuhiro Tsujikawa
7036859823
Do not change user variable CFLAGS in configure.ac
2014-12-01 23:06:11 +09:00
Tatsuhiro Tsujikawa
2b465ee65f
libevent-client: Disable SSLv3
2014-11-30 21:09:23 +09:00
Tatsuhiro Tsujikawa
b1f807abd1
Reformat lines with clang-format-3.5
2014-11-27 23:56:30 +09:00
Tatsuhiro Tsujikawa
5d59adc52b
libevent-server: Disable SSLv3
2014-11-27 21:40:34 +09:00
Tatsuhiro Tsujikawa
770cfcaae9
libevent-server: Enable ECDHE ciphers
2014-11-27 21:38:54 +09:00
Tatsuhiro Tsujikawa
dfbc6e6a57
examples: Guard include config.h with HAVE_CONFIG_H
2014-11-27 00:12:42 +09:00
Alexis La Goutte
bac44d7ffb
Fix -Werror=unused-parameter using _U_ macro
2014-11-25 17:08:09 +01:00
Tatsuhiro Tsujikawa
20ffe2b2a0
tiny-nghttpd: Fix memory leak
2014-11-10 21:20:44 +09:00
Tatsuhiro Tsujikawa
0ef99b90d9
asio-lib: Make request_cb take const ref and use int64_t as http_date arg
2014-10-28 01:01:48 +09:00
Tatsuhiro Tsujikawa
9c1b5e8fb1
Update .gitignore
2014-10-18 18:55:42 +09:00
Tatsuhiro Tsujikawa
e570225e97
tiny-nghttpd: Simplify timer event handling
2014-10-14 21:52:30 +09:00
Tatsuhiro Tsujikawa
3931a0b04d
Fix bugs found by coverity scan
2014-10-10 22:50:35 +09:00
Tatsuhiro Tsujikawa
6d42b6697b
examples: Disable tiny-nghttpd if timerfd_create is not available
2014-10-09 21:18:24 +09:00
Tatsuhiro Tsujikawa
b6d0a32d0e
tiny-nghttpd: Save number of read(2) calls using file size
2014-09-29 22:37:41 +09:00
Tatsuhiro Tsujikawa
88d7abcc23
libnghttp2_asio: Add request::run_task to execute task in separate thread
2014-09-28 16:25:45 +09:00
Tatsuhiro Tsujikawa
409316018d
examples: Fix travis error: unreachable-code
2014-09-28 00:02:13 +09:00
Tatsuhiro Tsujikawa
34413d8d7c
examples: Build tiny-nghttpd only when epoll is available
2014-09-27 23:45:57 +09:00
Tatsuhiro Tsujikawa
b7ccca4c47
examples: Add tiny-nghttpd
...
tiny-nghttpd is HTTP/2 server and its purpose is measure the
performance of nghttp2 library code. Currently it only accepts direct
HTTP/2 connection only.
2014-09-27 23:44:33 +09:00
Tatsuhiro Tsujikawa
e887b2516f
Remove boost LDFLAGS from examples
2014-09-26 21:42:31 +09:00
Tatsuhiro Tsujikawa
fd07f5e142
src: Add utility APIs to asio_http2.h; add asio-sv2 example to serve files
2014-09-24 23:05:13 +09:00
Tatsuhiro Tsujikawa
83728219db
Update doc
2014-09-24 00:45:40 +09:00
Tatsuhiro Tsujikawa
5d0bf4cc84
Add C++ library libnghttp2_asio on top of libnghttp2
...
The libnghttp2_asio library is C++ library built on top of libnghttp2.
Currently, it has server API and easily create HTTP/2 server using
node.js like API calls. See the example server source code in
examples/asio-sv.cc. The library depends on Boost::ASIO library.
2014-09-24 00:45:40 +09:00
Tatsuhiro Tsujikawa
5ff73de195
libevent-server: Use nghttp2_option_set_recv_client_preface()
2014-09-13 21:24:45 +09:00
Tatsuhiro Tsujikawa
ab5b81bee1
Hide nghttp2_session_callbacks details and provide setter like functions
...
To make it possible to add new callbacks without bumping so name, we
decided to hide details of nghttp2_session_callbacks. We provide
setter like functions to set individual callback function.
2014-08-25 21:24:04 +09:00
Tatsuhiro Tsujikawa
455d911f61
src, examples: Call OPENSSL_config()
2014-08-02 10:11:45 +09:00
Tatsuhiro Tsujikawa
8dc47c6750
Fix resource leaks
2014-07-18 00:31:32 +09:00
Tatsuhiro Tsujikawa
39498beffd
examples: Fix possible division by zero
2014-07-18 00:09:05 +09:00
Tatsuhiro Tsujikawa
8235bb136b
doc: Add HPACK API tutorial
2014-06-29 23:45:49 +09:00
Tatsuhiro Tsujikawa
ae74a18624
examples: Fix libevent-server which could not send error reply
2014-06-18 13:11:01 +09:00
Tatsuhiro Tsujikawa
85a43cfa66
examples: Check return value of evbuffer_drain
2014-06-18 13:06:05 +09:00
Tatsuhiro Tsujikawa
b78a51da0e
Support graceful shutdown using multiple GOAWAY
...
Add last_stream_id parameter to nghttp2_submit_goaway(). To terminate
connection immediately with application chosen last stream ID,
nghttp2_session_terminate_session2() was added.
2014-06-18 11:35:08 +09:00
Tatsuhiro Tsujikawa
9b174bf5c9
Fix compile error with -Wshorten-64-to-32
...
The original patch was contributed by Alexis La Goutte
2014-06-11 23:37:16 +09:00
Tatsuhiro Tsujikawa
e8de437d5c
Return new stream ID from nghttp2_submit_{request, headers, push_promise}
...
Previously stream ID was assigned just before HEADERS or PUSH_PROMISE
was serialized and nghttp2_submit_{request, headers, push_promise} did
not return stream ID. The application has to check assigned stream ID
using before_frame_send_callback. Now it is apparent that priority is
meant to DATA transfer only. Also application can reorder the
requests if it wants. Therefore we can assign stream ID in
nghttp2_submit_* functions and return stream ID from them. With this
change, now application does not have to check stream ID using
before_frame_send_callback and its code will be simplified.
2014-05-07 23:24:07 +09:00
Tatsuhiro Tsujikawa
4f027c1562
libnghttp2: Remove dependency to zlib
...
We inherited gzip compression API from spdylay codebase. In spdylay,
the cost of having such API is almost free because spdylay requires
zlib for header compression. nghttp2 no longer uses gzip to header
compression. zlib dependency exists just for gzip compression API,
which is not an essential. So we decided to move gzip code to under
src and remove zlib dependency from libnghttp2 itself. As nghttp2
package, we depend on zlib to compile tools under src.
2014-05-06 23:10:50 +09:00
Tatsuhiro Tsujikawa
9ca63de9e8
examples: Zero clear callbacks
2014-05-01 10:46:08 +09:00
Tatsuhiro Tsujikawa
813c750c12
Merge branch 'clang' of https://github.com/alagoutte/nghttp2 into alagoutte-clang
2014-05-01 10:45:38 +09:00
Alexis La Goutte
66ed7f6a59
Fix build when use Clang
...
libevent-server.c:552:43: error: missing field 'recv_callback' initializer [-Werror,-Wmissing-field-initializers]
2014-04-30 17:31:33 +02:00
Alexis La Goutte
8ca2f6aa92
Fix build when use Clang
...
libevent-client.c:355:43: error: missing field 'recv_callback' initializer [-Werror,-Wmissing-field-initializers]
2014-04-30 17:31:29 +02:00
Alexis La Goutte
fa2fbe944f
Fix GCC build with -Werror
...
libevent-server.c:691:8: error: C++ style comments are not allowed in ISO C90
2014-04-30 17:09:06 +02:00
Tatsuhiro Tsujikawa
660c536275
Extend namelen and valuelen in nghttp2_nv to size_t
2014-04-30 23:08:34 +09:00
Tatsuhiro Tsujikawa
1b79114d2d
Fix compiler warnings
2014-04-30 22:16:21 +09:00
Tatsuhiro Tsujikawa
e7ad3633c7
nghttp2_data_source_read_callback: Replace eof with uint32_t *data_flags
...
Replace int *eof with uint32_t *data_flags so that we can easily
extend functionality if we have to (but we don't do if possible).
2014-04-05 17:59:24 +09:00
Tatsuhiro Tsujikawa
c9f90924a9
Add flags parameter to nghttp2_on_header_callback
2014-04-02 02:10:35 +09:00
Tatsuhiro Tsujikawa
24cb90806d
Add flags to nghttp2_nv structure
...
This is preliminary change for upcoming HPACK updates. The flags are
used to determine the name/value pair is indexable or not.
2014-04-01 23:17:50 +09:00
Tatsuhiro Tsujikawa
60a2c260a5
Define NGHTTP2_CLIENT_CONNECTION_PREFACE macro
...
NGHTTP2_CLIENT_CONNECTION_PREFACE has the same content with
NGHTTP2_CLIENT_CONNECTION_HEADER, which is now obsoleted by
NGHTTP2_CLIENT_CONNECTION_PREFACE.
2014-03-30 21:02:25 +09:00
Tatsuhiro Tsujikawa
ab2dc5967d
Replace HTTP/2.0 with HTTP/2
2014-03-30 19:26:37 +09:00
Tatsuhiro Tsujikawa
f7162ab702
Implement dependency based priority
2014-03-30 01:24:16 +09:00
Tatsuhiro Tsujikawa
46f5d4b1c4
examples: Check stream_data is null
2014-02-20 21:30:05 +09:00
Tatsuhiro Tsujikawa
e186e01933
Replace on_end_headers_callback with on_begin_headers_callback
...
Previously, there is inconsistency when on_frame_recv_callback
is called between HEADERS/PUSH_PROMISE and the other frames.
For former case, it is called before header block, in latter
case, it is called after whole frame is received. To make it
consistent, we call on_frame_recv_callback for HEADERS/PUSH_PROMISE
after its frame is fully received. Since on_frame_recv_callback
can signal the end of header block, we replaced on_end_headers_callback
with on_begin_headers_callback, which is called when the reception
of the header block is started.
2014-01-29 21:23:13 +09:00
Tatsuhiro Tsujikawa
67d4cb6367
examples: Log disconnected in delete_http2_session_data
2014-01-18 01:17:09 +09:00
Tatsuhiro Tsujikawa
2cc28863e9
examples: Fix crash if port is not in request URI
2014-01-18 01:13:04 +09:00
Tatsuhiro Tsujikawa
0b14319675
doc, examples: Update tutorial and examples
2014-01-18 00:06:24 +09:00
Tatsuhiro Tsujikawa
37d41313d3
examples: Fix build failure with android NDK
2014-01-12 21:43:55 +09:00
Tatsuhiro Tsujikawa
a47abdba9b
Update .gitignore
2014-01-11 01:05:42 +09:00
Tatsuhiro Tsujikawa
0e9390d5ad
Move http-parser to third-party dir and fix `make distcheck`
2014-01-11 00:36:20 +09:00
Tatsuhiro Tsujikawa
46b3a7e1b3
examples: Remove EXTRA_DIST
2014-01-11 00:22:23 +09:00
MATSUMOTO Ryosuke
87f4f1d4f5
Fix :host header bug
2013-12-31 20:51:34 +09:00
Tatsuhiro Tsujikawa
a94fb43bb9
examples: Code cleanup, cut request path after '?'
2013-12-26 21:45:29 +09:00
Tatsuhiro Tsujikawa
9cb8754d09
Rename nghttp2_session_fail_session as nghttp2_session_terminate_session
2013-12-26 00:23:07 +09:00
Tatsuhiro Tsujikawa
286345a2ef
examples/libevent-client.c: Fix memory leak, use nghttp2_session_fail_session
2013-12-25 00:29:36 +09:00
Tatsuhiro Tsujikawa
946d3150ba
examples: Add minimum error handling for API functions
2013-12-24 21:30:49 +09:00
Tatsuhiro Tsujikawa
9fc9ef9a40
examples: Refactor a bit
2013-12-24 19:55:26 +09:00
Tatsuhiro Tsujikawa
0fb7e430d7
examples: Set TCP_NODELAY option
2013-12-24 00:01:44 +09:00
Tatsuhiro Tsujikawa
4e01ed1a95
examples: Add libevent-server.c
2013-12-23 23:49:30 +09:00
Tatsuhiro Tsujikawa
e04e6ccdf9
examples: Remove false README.rst
2013-12-22 19:28:26 +09:00
Tatsuhiro Tsujikawa
dcfd9b22fc
examples: Add libevent-client, requires libevent for examples
2013-12-22 19:26:32 +09:00
Tatsuhiro Tsujikawa
6c77cec270
Remove nghttp2_submit_* API functions which has char **nv parameter
...
The nghttp2_submit_{request,response}2 functions are renamed as
nghttp2_submit_{request, response}.
2013-12-08 21:39:43 +09:00
Tatsuhiro Tsujikawa
6ea91e57e0
Adjust struct/class alignment
2013-12-06 23:17:38 +09:00
Tatsuhiro Tsujikawa
896db5b24f
API change: Add flags parameter to all submit_* functions
...
The nghttp2_submit_{request,response} family do not get this change.
2013-10-25 22:50:24 +09:00
Tatsuhiro Tsujikawa
588fd3bda7
src, examples: Update .gitignore
2013-09-08 15:33:17 +09:00
Tatsuhiro Tsujikawa
d960cf8953
Add const to read-only nghttp2_frame* parameter in callbacks
2013-09-03 21:24:14 +09:00
Tatsuhiro Tsujikawa
27c0f76afb
examples: Remove unused source files
2013-09-02 22:55:37 +09:00