1
0
mirror of https://github.com/moparisthebest/spdylay synced 2024-11-15 05:55:04 -05:00
Commit Graph

125 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
9fa8357bbc Made return value of spdylay_map_init() void. Updated doc. 2012-02-21 23:23:47 +09:00
Tatsuhiro Tsujikawa
37944253d2 Ensure read_callback is non-NULL for response bodies. 2012-02-21 22:04:24 +09:00
Jim Morrison
6e7025b9f5 Test that FLAG_FIN is set if the read callback is NULL. 2012-02-20 13:12:13 -08:00
Tatsuhiro Tsujikawa
54e4c80b96 Added stream_id argument to spdylay_data_source_read_callback 2012-02-19 23:48:39 +09:00
Tatsuhiro Tsujikawa
301eb29cd4 Added ability to postpone DATA frames for asynchronous I/O. 2012-02-19 23:42:25 +09:00
Tatsuhiro Tsujikawa
4f28698572 Fixed: if bytes of one frame are received in several chunks, unpacking fails. 2012-02-19 00:05:52 +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
b182179aca Check frame length strictly for GOAWAY, RST_STREAM and PING. 2012-02-18 21:51:57 +09:00
Tatsuhiro Tsujikawa
122c619260 Fixed spdylay_frame_count_nv_space() bug. Check all data is processed in spdylay_frame_count_unpack_nv_space() 2012-02-18 17:25:13 +09:00
Tatsuhiro Tsujikawa
b1da54a549 Made SPDYLAY_ERR_ZLIB FATAL error. Removed SPDYLAY_ERR_ZLIB_BUF.
If SPDYLAY_ERR_ZLIB is encountered, zlib context is out of sync.
So we cannot further SYN_STREAM/SYN_REPLY/HEADERS frames.
I'm not sure we should send GOAWAY in this case.
So bail out with fatal error and drop connection for now.
2012-02-18 02:19:09 +09:00
Tatsuhiro Tsujikawa
005883e363 Added TODO comment 2012-02-17 00:34:36 +09:00
Tatsuhiro Tsujikawa
4dd43fc28f Updated doc 2012-02-16 23:48:12 +09:00
Tatsuhiro Tsujikawa
6cb4259232 Merge branch 'master' of https://github.com/sorced-jim/spdylay into sorced-jim-master 2012-02-16 23:41:53 +09:00
Tatsuhiro Tsujikawa
b81b5a3116 Added eof member to spdylay_data to indicate all data are read.
Ensure that if flags contains SPDYLAY_FLAG_FIN, only the last DATA frame
has FLAG_FIN set.
2012-02-16 23:38:19 +09:00
Tatsuhiro Tsujikawa
d4ba423248 Reuse session->iframe.buf for all incoming frames. 2012-02-16 23:09:06 +09:00
Tatsuhiro Tsujikawa
7a6bf8e5cc Allocate bytes divisible by 4KiB when expanding buffer 2012-02-16 22:54:08 +09:00
Tatsuhiro Tsujikawa
61cfa3b9f8 Simplified error handling in spdylay_session_new 2012-02-16 22:47:49 +09:00
Tatsuhiro Tsujikawa
ac1629e61b Reuse buffers when unpacking frames. 2012-02-16 22:01:34 +09:00
Tatsuhiro Tsujikawa
050f33e8f9 Reuse buffers when packing frames.
Temporal name/value buffer will be shared by unpacking frame.
2012-02-16 20:54:30 +09:00
Jim Morrison
63353ea486 Ensure read_callback is non-NULL for request bodies. 2012-02-15 14:30:36 -08:00
Jim Morrison
f05a67641f Be a bit more liberal about what methods accept message bodies. 2012-02-15 13:49:02 -08:00
Jim Morrison
d04449eb28 Document that url should have the query parameters. 2012-02-15 13:33:30 -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
e7e2c69526 Renamed spdylay_submit_cancel() as spdylay_submit_rst_stream(). 2012-02-15 23:27:19 +09:00
Tatsuhiro Tsujikawa
c1aefb3ba5 Added flags argument to spdylay_submit_data() and spdylay_frame_data_init().
The intention is make spdylay_submit_data() more generic, allowing trailing
DATA and/or HEADERS frames.
2012-02-15 23:02:51 +09:00
Tatsuhiro Tsujikawa
938f51964d Respond RST_STREAM with PROTOCOL_ERROR when upper cased name is present in nv. 2012-02-15 22:11:42 +09:00
Tatsuhiro Tsujikawa
f71572b835 Don't send DATA frame if RST_STREAM was queued for this stream. 2012-02-15 01:07:51 +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
97b853254a Fixed the bug that length parameter in on_data_send_callback includes header length. 2012-02-14 01:42:00 +09:00
Tatsuhiro Tsujikawa
7abf48f061 Fixed typo 2012-02-13 01:41:35 +09:00
Tatsuhiro Tsujikawa
81307745c4 Made spdylay_outbound_item_compar() static 2012-02-13 00:48:03 +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
9e3191a548 Updated doc 2012-02-12 17:43:50 +09:00
Tatsuhiro Tsujikawa
a4961a95bd Moved spdylay_submit_* functions to spdylay_submit.c 2012-02-12 17:41:55 +09:00
Tatsuhiro Tsujikawa
8fac259285 For non-overlap case, made out and outlen left untouched 2012-02-09 22:46:26 +09:00
Tatsuhiro Tsujikawa
4f5c6b60ef Ignore control frame other than SYN_STREAM if version != SPDYLAY_PROTO_VERSION 2012-02-09 00:27:22 +09:00
Tatsuhiro Tsujikawa
d7e58b5cab Updated doc 2012-02-08 23:51:52 +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
580a2b1b1e Updated doc 2012-02-08 22:34:48 +09:00
Tatsuhiro Tsujikawa
656a4b6e72 Fixed compiler warning 2012-02-08 21:49:15 +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
Tatsuhiro Tsujikawa
b8700259fd Changed behaviour of spdylay_select_next_protocol()
We use following algorithm to select protocol:

 1. If server's list contains "spdy/2", this function selects
    "spdy/2" and returns 1. The following steps are not taken.

 2. If server's list contains "http/1.1", this function selects
    "http/1.1" and returns 0. The following step is not taken.

 3. This function selects "spdy/2" and returns -1. (So called
    non-overlap case).
2012-02-08 21:20:50 +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
6904ccc023 Removed unused debug function 2012-02-08 01:28:59 +09:00
Tatsuhiro Tsujikawa
154b02c464 Set max outbound DATA frame length to 8+4KiB 2012-02-08 01:28:00 +09:00
Tatsuhiro Tsujikawa
59329b0070 Set buffer size of inbound frames to 16KiB. 2012-02-08 01:25:26 +09: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
e8a9268985 Included spdylayver.h from spdylay.h 2012-02-07 21:19:23 +09:00
Tatsuhiro Tsujikawa
5012f177d0 Fixed 2 bugs: incorrect DATA frame length and data payload is zero-cleard. 2012-02-07 02:04:00 +09:00
Tatsuhiro Tsujikawa
a14b9a1ba6 Added spdylay_submit_cancel() to send RST_STREAM 2012-02-06 21:20:35 +09:00