Commit Graph

39 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 388285675b python: Check protocol is None 2015-08-03 16:49:09 +09:00
Tatsuhiro Tsujikawa c2ca04c1db python: Call on_close callback when connection is lost for server session 2015-06-07 16:17:48 +09:00
Fabian Wiesel 7eafebfeb9 Expose client certificate, if available
Client certificates can use used for authentication/authorization in the server,
so expose them similar to the remote address.
2015-05-31 10:55:10 +02:00
Fabian Wiesel abe4c7c92a Catch and log failure to set TCP_NODELAY
Setting TCP_NODELAY may fail. Instead of failing the routine, log it and continue.
It seems, that setting TCP_NODELAY in python on Mac OS X is not necessarily supported.
2015-05-25 17:39:54 +02:00
Tatsuhiro Tsujikawa d0c27d5229 Send 24 bytes client magic byte string by library
Previously nghttp2_session_send() and nghttp2_session_mem_send() did
not send 24 bytes client magic byte string (MAGIC).  We made
nghttp2_session_recv() and nghttp2_session_mem_recv() process MAGIC by
default, so it is natural to make library send MAGIC as well.  This
commit makes nghttp2_session_send() and nghttp2_session_mem_send()
send MAGIC.  This commit also replace "connection preface" with
"client magic", since we call MAGIC as "connection preface" but it is
just a part of connection preface.  NGHTTP2_CLIENT_CONNECTION_PREFACE
macro was replaced with NGHTTP2_CLIENT_MAGIC.  The already deprecated
NGHTTP2_CLIENT_CONNECTION_HEADER macro was removed permanently.
nghttp2_option_set_no_recv_client_preface() was renamed as
nghttp2_option_set_no_recv_client_magic().  NGHTTP2_ERR_BAD_PREFACE
was renamed as NGHTTP2_ERR_BAD_CLIENT_MAGIC.
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa 250ea53e4b Deal with 24 bytes client connection preface by default
Since HTTP/2 spec requires for client to send connection preface, it
is reasonable to make this option enabled by default.  It is still a
use case to disable this, so replace this option with
nghttp2_option_set_no_recv_client_preface().
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa b0123448a4 python: Add async body generation support 2015-04-01 22:54:31 +09:00
Tatsuhiro Tsujikawa 1316065c14 python: Fix pseudo-header field ordering bug 2015-03-31 21:53:13 +09:00
Tatsuhiro Tsujikawa bf46539d10 python: Fix bug push response header fields are not passed to callback 2015-03-06 03:03:55 +09:00
Tatsuhiro Tsujikawa 62928ddbcd python: Remove validation offered by nghttp2 lib 2015-02-21 00:20:30 +09:00
Tatsuhiro Tsujikawa 6052a86df1 python: Fix request header ordering 2015-01-05 17:00:07 +09:00
Tatsuhiro Tsujikawa 5bac7f0ca6 python: Fix request is not sent without TLS 2014-11-16 17:31:11 +09:00
Tatsuhiro Tsujikawa 08fea5705a python: Fix bug that settings timer is started when SETTINGS with ACK is sent 2014-11-16 17:30:33 +09:00
Kyle Schomp 0cc73e279e Pull of the client Python bindings 2014-11-15 16:37:41 +01:00
Tatsuhiro Tsujikawa 42ac80d3da python: Fix build error 2014-08-26 00:13:53 +09:00
Tatsuhiro Tsujikawa 38bfbffb1b Remove HPACK reference set 2014-07-31 23:05:52 +09:00
Tatsuhiro Tsujikawa e517ff6534 python: Use public HPACK API 2014-06-30 22:45:18 +09:00
Tatsuhiro Tsujikawa 7b9a8acc22 Add HPACK deflation API 2014-05-13 23:42:55 +09:00
Tatsuhiro Tsujikawa 2411a08b09 python: Return Handler object for pushed resource from BaseRequestHandler.push
Also update doc
2014-05-13 21:42:58 +09:00
Tatsuhiro Tsujikawa 9683f88e6a Add NGHTTP2_DEFAULT_HEADER_TABLE_SIZE macro
Use this macro in Python sources.  Python module constant
HD_DEFLATE_HD_TABLE_BUFSIZE_MAX was renamed as
DEFLATE_MAX_HEADER_TABLE_SIZE since the previous name was awkward.
2014-05-11 21:38:30 +09:00
Tatsuhiro Tsujikawa 6e7d0286e3 python: Utilize return value of nghttp2_submit_push_promise 2014-05-10 23:45:05 +09:00
Tatsuhiro Tsujikawa c9f3de5f6b python: Fix compile error 2014-04-05 19:16:40 +09:00
Tatsuhiro Tsujikawa 9d9eb48258 python: Update according to HPACK change, but flags are not used yet 2014-04-02 02:16:39 +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 d07bb1ddff Rework outbound frame buffers 2014-03-13 22:11:02 +09:00
Tatsuhiro Tsujikawa 358b4386d3 Introduce nghttp2_buf to ease buffer management 2014-03-11 01:47:38 +09:00
Tatsuhiro Tsujikawa 52cec35906 python: Fix NameError if asyncio is not available 2014-02-26 00:54:16 +09:00
Tatsuhiro Tsujikawa 7cf574d0d8 python: Update doc 2014-02-25 23:29:50 +09:00
Tatsuhiro Tsujikawa 911ffb24fa python: Set NPN in HTTP2Server.__init__ 2014-02-25 21:25:31 +09:00
Tatsuhiro Tsujikawa add07c4303 python: Encode headers in UTF-8 if they are given in unicode 2014-02-25 21:21:35 +09:00
Tatsuhiro Tsujikawa 98715f4374 python: Add HTTP/2 server using asyncio 2014-02-25 01:47:09 +09:00
Tatsuhiro Tsujikawa fd88c6160d HPACK post -05 updates
* Use 1 Huffman code table for both request and response
* Remove complicated deflater side table size management
* Add encoding context update
* Fix memory leak in inflater
2014-02-13 23:22:52 +09:00
Tatsuhiro Tsujikawa e7fc2951b8 nghttp2_hd: Define dedicated struct for HPACK deflater and inflater 2014-01-26 17:53:04 +09:00
Tatsuhiro Tsujikawa 7048c56583 python: Update to latest nghttp2_hd spec 2014-01-17 02:27:42 +09:00
Tatsuhiro Tsujikawa a2ceae23a3 python: Handle name/value is NULL but its length is positive
This happens when deflater local header table is smaller than
inflater header table size. We use the same notation
"**DEALLOCATED**" for such name/values with hdtest programs.
2013-12-21 23:02:48 +09:00
Tatsuhiro Tsujikawa bddfa3c0b6 python: Add method to get/print header table 2013-12-18 00:20:14 +09:00
Tatsuhiro Tsujikawa 415b9d07d8 python: Refactor class 2013-12-17 23:53:49 +09:00
Tatsuhiro Tsujikawa 4e0ca71ef0 python: Add experimental python extension module
To build extension module, cython is required.
The module is not built with `make` in the top directory.
A user has to run `make build_ext` in python directory.
Currently header compression objects are available for testing.
2013-12-14 23:54:09 +09:00