Commit Graph

459 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 227a48cea1 src: Move http_parser_url related functions to util 2014-02-27 21:53:52 +09:00
Tatsuhiro Tsujikawa 13cc3f2fe9 src, python: Only produce header_table_size when it is changed 2014-02-25 23:55:06 +09:00
Tatsuhiro Tsujikawa 9cc7f9fb36 nghttp: Wait for pushed resources to complete
The statistics of pushed resources are also calculated.
2014-02-25 01:16:47 +09:00
Tatsuhiro Tsujikawa d1c1deaf03 Add promised_stream_user_data parameter to nghttp2_submit_push_promise
This is very useful to associate application specific data to promised
stream.

nghttp2_nv_array_copy now does not complain the header field is large.
2014-02-25 00:26:12 +09:00
Tatsuhiro Tsujikawa 86aa905c10 nghttpx: Code cleanup 2014-02-22 11:26:32 +09:00
Tatsuhiro Tsujikawa fc25143418 Remove END_PUSH_PROMISE in favor of END_HEADERS 2014-02-21 21:23:51 +09:00
Tatsuhiro Tsujikawa 659c3b0aa0 nghttpx: Initialize response_htp_ with 0 2014-02-20 21:30:25 +09:00
Tatsuhiro Tsujikawa bbc09b005b nghttpd: Use nghttp2_session_mem_recv and nghttp2_session_mem_send 2014-02-19 23:27:53 +09:00
Tatsuhiro Tsujikawa 1e1e77ad5e nghttp: Use nghttp2_session_mem_recv and nghttp2_session_mem_send 2014-02-19 23:27:52 +09:00
Tatsuhiro Tsujikawa cdf5d5402b nghttpx: Code cleanup 2014-02-19 23:11:26 +09:00
Tatsuhiro Tsujikawa 3c96041c43 nghttpx: Fix typo 2014-02-19 22:53:33 +09:00
Tatsuhiro Tsujikawa 6320bd8926 nghttpx: Fix priority bits 2014-02-19 22:52:00 +09:00
Tatsuhiro Tsujikawa 649586fff6 Add nghttp2_session_mem_send() API function
This function behaves like nghttp2_session_send(), but it does not
use nghttp2_send_callback to send data. Instead, it returns the
serialized data to trasmit and its length to the caller.
2014-02-18 23:23:11 +09:00
Tatsuhiro Tsujikawa f5342494f4 src: Format help message and add --version to make man page generation easier 2014-02-16 19:39:41 +09:00
Tatsuhiro Tsujikawa 1fd5fdd54a src: Remove redundant SETTINGS_ENABLE_PUSH from server side 2014-02-16 16:05:26 +09:00
Tatsuhiro Tsujikawa 7504d89f9b src: Add at most N bytes as padding if --padding option is used 2014-02-15 16:40:32 +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 cd3eae3dd2 src: Fix select_padding_callback which returns value greater than max_payload 2014-02-11 19:19:00 +09:00
Tatsuhiro Tsujikawa c280cc7c4d nghttpx: Add --padding option for debugging purpose 2014-02-11 17:23:22 +09:00
Tatsuhiro Tsujikawa 39fe7a5cfa Don't set select_padding_callback if padding_boundary is 0 or not set 2014-02-11 16:48:27 +09:00
Tatsuhiro Tsujikawa 78d202ac30 Callback based padding from application
Now previous padding options are removed and instead we added
select_padding_callback to select padding length for each frame
by application. If this callback is not implemented by application,
no padding is added.

This change also fixes the broken session_detect_idle_stream()
if stream_id is our side.
2014-02-11 15:28:44 +09:00
Tatsuhiro Tsujikawa 118ed09da5 Allow disabling padding 2014-02-09 23:53:53 +09:00
Tatsuhiro Tsujikawa 68b5ffc1dc Rename padding related names 2014-02-09 21:46:15 +09:00
Tatsuhiro Tsujikawa ce53d7bd9e src: Don't output priority if NGHTTP2_FLAG_PRIORITY is not set 2014-02-09 21:34:28 +09:00
Tatsuhiro Tsujikawa c7c283f3a9 nghttpx: Add --frontend-frame-debug option to debug HTTP/2 frame in upstream
The output format is the same one with nghttp/nghttpd. The output
is made into stderr to make it sync with logging.
2014-02-09 18:47:26 +09:00
Tatsuhiro Tsujikawa 1db2195389 Implement padding for HEADERS and CONTINUATION 2014-02-09 15:17:26 +09:00
Tatsuhiro Tsujikawa be9d5efa4c nghttp: Add --continuation option to test CONTINUATION 2014-02-08 00:23:18 +09:00
Tatsuhiro Tsujikawa 814d0f76f3 Implement DATA frame padding 2014-02-08 00:23:18 +09:00
Tatsuhiro Tsujikawa c79adf6997 Remove flow control disabling feature 2014-02-06 00:23:20 +09:00
Tatsuhiro Tsujikawa 8be17f077a Add nghttp2_check_header_name and nghttp2_check_header_value APIs
These are promoted to public API from src/http2.h
2014-02-01 19:31:50 +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 ff475104ab nghttpx: Fix runtime errors due to uninitialized values 2014-01-29 00:59:12 +09:00
Tatsuhiro Tsujikawa 878afd7df1 nghttp: Fix bad handling of addrinfo 2014-01-28 01:40:00 +09:00
Tatsuhiro Tsujikawa 864789ca65 nghttpx: Limit the maximum header block size (again) 2014-01-28 01:17:54 +09:00
Tatsuhiro Tsujikawa ce434d56a7 src: Print header emission with stream_id
Since all headers are not always longer available on one
nghttp2_session_mem_recv call, received headers may be interleaved
with transmission log of the other frames. To make it clear that
each header belongs to which stream, each header is printed with
stream_id.
2014-01-28 00:20:48 +09:00
Tatsuhiro Tsujikawa a3082b7c1e Remove nghttp2_on_data_recv_callback and nghttp2_on_data_send_callback
nghttp2_data is added to nghttp2_frame union. When DATA is
received, nghttp2_on_frame_recv_callback is called. When DATA is
sent, nghttp2_on_frame_send_callback is called.
2014-01-27 22:16:05 +09:00
Tatsuhiro Tsujikawa fbffd2c923 nghttpx: Limit the number of receiving headers 2014-01-27 00:45:36 +09:00
Tatsuhiro Tsujikawa 545f24bc1b Remove nghttp2_on_frame_recv_parse_error_callback 2014-01-26 23:23:07 +09:00
Tatsuhiro Tsujikawa 6e6127037b src: Fix compiler warning 2014-01-26 23:13:02 +09:00
Tatsuhiro Tsujikawa 9314e30987 Support transmission of CONTINUATION, change nghttp2_frame_hd
The maximum frame size including header block is still limited
to NGHTTP2_HD_MAX_BUFFER_LENGTH, which is 32KB.
2014-01-26 23:10:33 +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 8317559090 nghttp2_hd: Implement stream header inflater
This stream inflater can inflate incoming header block in streaming
fashion. Currently, we buffer up single name/value pair, but we chose
far more smaller buffer size than HTTP/2 frame size.
2014-01-25 18:24:15 +09:00
Tatsuhiro Tsujikawa a8e4da8058 deflatehd: Fix wire is not written if length is 0 2014-01-24 21:54:00 +09:00
Tatsuhiro Tsujikawa 1f4577adb9 nghttp: Use getaddrnfo directly instead of using evdns_base
evdns_base uses /etc/resolve.conf for *nix like systems,
but all platforms don't have the file (e.g., android device).
For such platforms, address resolution fails.
To fix this problem we use getaddrinfo() directly.
2014-01-23 00:29:09 +09:00
Tatsuhiro Tsujikawa 9cd90bcff2 nghttp: Fix host to connect when SSL/TLS is used 2014-01-22 21:55:30 +09:00
Tatsuhiro Tsujikawa be71e1f11c nghttp: Update doc 2014-01-21 23:24:13 +09:00
Tatsuhiro Tsujikawa 72aef67cca nghttp: Replace build-in headers completely with -H option 2014-01-20 21:54:03 +09:00
Tatsuhiro Tsujikawa 16497d91c1 nghttpx: Call upstream_writecb when underlying bufferevent buffer gets empty 2014-01-19 23:32:07 +09:00
Tatsuhiro Tsujikawa dfbea797bd src: Use static_cast instead of reinterpret_cast if possible 2014-01-19 21:18:37 +09:00
Tatsuhiro Tsujikawa 660e1ec44d nghttpx: Move backend outbuf threshold to each downstream type 2014-01-19 18:07:50 +09:00