Commit Graph

239 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 301eb29cd4 Added ability to postpone DATA frames for asynchronous I/O. 2012-02-19 23:42:25 +09:00
Tatsuhiro Tsujikawa 03307116a2 Send GOAWAY when spdylay_frame_unpack_* is failed with non-fatal error.
SPDYLAY_ERR_ZLIB is now moved back to non-fatal error and it is subject
to GOAWAY if it occurred.
2012-02-18 21:55:40 +09:00
Tatsuhiro Tsujikawa 6f30bbbcb5 Fixed test name 2012-02-16 23:47:04 +09:00
Jim Morrison 40e8fc960e Create a test that explicitly checks that a key exists only once in a name/value block. 2012-02-15 12:07:25 -08:00
Tatsuhiro Tsujikawa 85ec883d11 Lower-case names in name/value pairs in spdylay_submit_{request, response} 2012-02-15 23:54:42 +09:00
Tatsuhiro Tsujikawa fd06d21638 Call on_stream_close_callback when server pushed SYN_STREAM has FIN flag set.
Don't mix status code and return value in
spdylay_session_on_syn_stream_received.
2012-02-15 00:45:09 +09:00
Tatsuhiro Tsujikawa a48ad800b2 When a stream is canceled by RST_STREAM, don't send further DATA on that stream. 2012-02-12 19:01:23 +09:00
Tatsuhiro Tsujikawa 028e1f2b8f Added test case where DATA frame is backed off by higher priority frame. 2012-02-12 18:30:19 +09:00
Tatsuhiro Tsujikawa 34f0f6be1b Refuse incoming SYN_STREAM with SPDYLAY_REFUSED_STREAM if max-concurrent-streams number is reached. 2012-02-08 23:45:48 +09:00
Tatsuhiro Tsujikawa 679159878f Merge branch 'master' of https://github.com/sorced-jim/spdylay into sorced-jim-master
Conflicts:
	tests/main.c
	tests/spdylay_session_test.c
	tests/spdylay_session_test.h
2012-02-08 21:37:44 +09:00
Jim Morrison 4298dc8a51 Erase the stream from the map after calling the on_stream_close callback 2012-02-07 14:17:38 -08:00
Tatsuhiro Tsujikawa 4630dfb4fe Added spdylay_on_request_recv_callback function.
This function invoked when request from remote peer is
received.  In other words, frame with FIN flag set is received.  In
HTTP, this means HTTP request, including request body, is fully
received.
2012-02-08 00:11:44 +09:00
Tatsuhiro Tsujikawa 00bed87537 Support max concurrent streams limit.
If max concurrent streams limit is reached, SYN_STREAM frames are not sent
and backed off. If other type of frame is waiting in the tx queue, it is
sent first. We introduced another priority queue for this purpose.
In this change we did not add code to send RST_STREAM when SYN_STREAM is
received but max concurrent stream is reached.
2012-02-06 00:14:19 +09:00
Tatsuhiro Tsujikawa 8b20e83652 Rewritten spdylay_frame_unpack_nv().
We use just single buffer to store name/value headers fields, instead of
allocating memory for each name/value strings.
It is now more than 2 times faster than old one.
2012-02-04 23:09:03 +09:00
Tatsuhiro Tsujikawa 876c33c562 Merge branch 'master' of https://github.com/sorced-jim/spdylay into sorced-jim-master
Conflicts:
	examples/spdylay_ssl.cc
	tests/Makefile.am
	tests/main.c

Changes:
        spdylay_select_next_protocol() returns -1 if it fails.
        Use cunit without pkg-config because debian does not provide .pc file.
        Some doc updates to suite my taste.
        Added spdylay_npn.h
2012-02-03 23:53:43 +09:00
Jim Morrison ea60bd8c6e Add an NPN callback helper that finds the correct version of spdy 2012-02-02 16:31:11 -08:00
Tatsuhiro Tsujikawa 4030c5ccf5 Closes all server-pushed streams when original stream is closed by RST_STREAM with CANCEL from client.
Fixed spdylay_session_is_my_stream_id()
2012-02-02 23:20:25 +09:00
Tatsuhiro Tsujikawa bb6a90dc4d Added spdylay_stream_add_pushed_stream
With this function and 3 new member in spdylay_stream, we can track server-
pushed streams which associate them to this stream.
2012-02-02 21:51:52 +09:00
Tatsuhiro Tsujikawa 562278194c Added server push SYN_STREAM validation. Added spdylay_session_server_new()
We still does not check "url" is in nv.
2012-02-02 00:19:31 +09:00
Tatsuhiro Tsujikawa 0b75800c23 Added SETTINGS frame and its pack/unpack functions. 2012-02-01 00:26:26 +09:00
Tatsuhiro Tsujikawa 3d4cf8aec3 Added data_prd arugment to spdylay_submit_request() and supported POST request. 2012-01-29 19:07:31 +09:00
Tatsuhiro Tsujikawa 06dae79b28 Discard inbound HEADERS and DATA in CLOSING state. Handle stream shutdown when DATA is received with FIN bit set. 2012-01-29 16:27:00 +09:00
Tatsuhiro Tsujikawa aed626bfa5 Added GOAWAY handling 2012-01-28 19:22:38 +09:00
Tatsuhiro Tsujikawa de57b6efea Sort nv in spdylay_submit_request and spdylay_submit_response 2012-01-28 00:09:01 +09:00
Tatsuhiro Tsujikawa 8f53343dc3 Renamed spdylay_req_submit and spdylay_reply_submit as spdylay_submit_request and spdylay_submit_response 2012-01-27 23:35:23 +09:00
Tatsuhiro Tsujikawa d1c4c59aad Added handling of received PING 2012-01-27 23:05:29 +09:00
Tatsuhiro Tsujikawa 9461147968 Added pack/unpack of PING 2012-01-27 19:35:05 +09:00
Tatsuhiro Tsujikawa a59c3efedb Added handling when HEADERS is received. 2012-01-27 19:10:13 +09:00
Tatsuhiro Tsujikawa 1c0ec66a2b Added HEADERS frame. Added SPDYLAY_FRAME_HEAD_LENGTH. 2012-01-27 18:21:14 +09:00
Tatsuhiro Tsujikawa beb509ef39 Check stream before sending SYN_REPLY and DATA. Don't make stream if incoming SYN_STREAM has FIN and UNIDIRECTIONAL set. 2012-01-27 17:09:40 +09:00
Tatsuhiro Tsujikawa 21e165f1f8 Added spdylay_reply_submit() and DATA frame handling after SYN_REPLY. 2012-01-27 01:17:40 +09:00
Tatsuhiro Tsujikawa 6e627548be Added stream status change after sending SYN_STREAM and SYN_REPLY. 2012-01-26 01:04:01 +09:00
Tatsuhiro Tsujikawa cbb8dd6a8c Added pri to spdylay_stream. Refactored SYN_STREAM, SYN_REPLY handling when they are received. 2012-01-25 23:46:07 +09:00
Tatsuhiro Tsujikawa 3bfe48972c Queue RST_STREAM if invalid stream ID is received in SYN_STREAM or SYN_REPLY.
Fixed bug that Z_DATA_ERROR is not handled.
Fixed bug that spdylay_frame_alloc_pack_nv does not use nv_offset correctly.
2012-01-25 21:31:28 +09:00
Tatsuhiro Tsujikawa 5ececcd8e7 Added test 2012-01-24 23:06:58 +09:00
Tatsuhiro Tsujikawa 9c8270436f Added header deflate/inflate using zlib. Added send/recv frame. 2012-01-24 22:02:24 +09:00
Tatsuhiro Tsujikawa 1330d74b73 Added struct of fixed sized chunk buffers backed by queue 2012-01-20 01:04:13 +09:00
Tatsuhiro Tsujikawa 1000998228 Added spdylay_queue 2012-01-19 21:57:26 +09:00
Tatsuhiro Tsujikawa a03afa6a82 Added spdylay_map. Added missing tests/main.c 2012-01-19 21:36:13 +09:00