Closed jhcloos closed 12 years ago
I did similar fix with you in 9d6257a. I could not find SPDY site which does server-push, so could you check that the change really fixes the problem?
Thanks. It works well now. Feel free to use my server for light testing:
:; spdycat -vn https://jhcloos.com/
[ 0.261] NPN select next protocol: the remote server offers:
* spdy/3
* spdy/2
* http/1.1
* x-mod-spdy/0.9.3.2-376
NPN selected the protocol: spdy/3
[ 0.390] send SYN_STREAM frame
When I point spdycat at a site using apache+mod_spdy, which pushes associated content, there is an invariable assert(3) in check_response_header() in the next frame (a SYN_HEADERS fram) after the SYN_REPLY frame which contains the requested body.
W/o associated content, it goes:
[ 0.256] NPN select next protocol: the remote server offers: [ 0.386] send SYN_STREAM frame
[ 0.501] recv SETTINGS frame
[ 0.522] recv SYN_REPLY frame
[ 0.523] recv DATA frame (stream_id=1, flags=1, length=44)
[ 0.523] send GOAWAY frame
(last_good_stream_id=0)
With associated content (in this case pushing four images and one css), it goes:
[ 0.251] NPN select next protocol: the remote server offers: [ 0.375] send SYN_STREAM frame
[ 0.490] recv SETTINGS frame
[ 0.493] recv SYN_STREAM frame
[ 0.494] recv SYN_STREAM frame
[ 0.494] recv SYN_STREAM frame
[ 0.494] recv SYN_STREAM frame
[ 0.605] recv SYN_STREAM frame
[ 0.606] recv SYN_REPLY frame
[ 0.606] recv DATA frame (stream_id=1, flags=1, length=1356)
and then assert(3)s, so the next fram (I presume a GOAWAY?) isn’t processed or reported.
I see that the lengths, as reported in the verbose output, of the SYN_STREAM frames are not indicative of the sizes of the associated files or of their URIs. I don’t know whether that is relevant.
Gdb tells me that check_response_header() is called with type=SPDYLAY_HEADERS, frame is:
$5 = {ctrl = {hd = {version = 3, type = 8, flags = 0 '\000', length = 120}}, syn_stream = { hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, stream_id = 2, assoc_stream_id = 6550624, pri = 0 '\000', slot = 0 '\000', nv = 0x40aa25 <spdylay::recv_callback(spdylay_session, unsigned char, unsigned long, int, void)+58>}, syn_reply = {hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, stream_id = 2, nv = 0x63f460}, rst_stream = {hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, stream_id = 2, status_code = 6550624}, settings = { hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, niv = 6550624, iv = 0x40aa25 <spdylay::recv_callback(spdylay_session, unsigned char, unsigned long, int, void)+58>}, ping = {hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, unique_id = 2}, goaway = {hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, last_good_stream_id = 2, status_code = 6550624}, headers = {hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, stream_id = 2, nv = 0x63f460}, window_update = {hd = { version = 3, type = 8, flags = 0 '\000', length = 120}, stream_id = 2, delta_window_size = 6550624}, credential = {hd = {version = 3, type = 8, flags = 0 '\000', length = 120}, slot = 2, proof = {data = 0x63f460 "\b\365c", length = 4237861}, certs = 0x14, ncerts = 140737488331984}}
If I add a return in the SYN_HEADERS if clause, it works and reports the headers and data frames of each of the associated URIs.