cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: HTTP/2 multiplexing

From: Alcides Viamontes Esquivel <a.viamontes.esquivel_at_gmail.com>
Date: Sun, 3 May 2015 11:47:48 +0200

>> Hm, btw, I think I'll also push my http2 test setup to github in case
>> someone wants to play along. I'll do that in a separate test repo and
I'll
>> mention it here when it is up.

> My playground area for testing my multiplexing work is now on github:

> https://github.com/bagder/curl-http2-dev

This is cool. I was playing with your code and noticed that so far it does
one request after another... or so it seems to me. Just in case you have
any use for it, I'm putting below curl's log.

The server code that I used to play with this can be found at
https://github.com/alcidesv/lock_step_transfer ... it is a server that
refuses to finish one stream while the other has not been opened.

== 0 Info: STATE: INIT => CONNECT handle 0x24e75d8; line 1034 (connection
#-5000)
== 0 Info: Added connection 0. The cache now contains 1 members
== 0 Info: Trying 127.0.0.1...
== 0 Info: STATE: CONNECT => WAITCONNECT handle 0x24e75d8; line 1087
(connection #0)
== 0 Info: Connected to localhost (127.0.0.1) port 8443 (#0)
== 0 Info: Marked for [keep alive]: HTTP default
== 0 Info: ALPN, offering h2-14, http/1.1
== 0 Info: successfully set certificate verify locations:
== 0 Info: CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
== 0 Info: TLSv1.2, TLS Unknown, Unknown (22):
0 => Send SSL data, 5 bytes (0x5)
0000: .....
== 0 Info: TLSv1.2, TLS handshake, Client hello (1):
0 => Send SSL data, 512 bytes (0x200)
0000: ......C...{....p:..k....D...x.."a...>0....0.,.(.$.............k.
0040: j.i.h.9.8.7.6.........2...*.&.......=.5.../.+.'.#.............g.
0080: @.?.>.3.2.1.0.........E.D.C.B.1.-.).%.......<./...A.............
00c0: ............3.........localhost...........:.8...................
0100: ........................................ .......................
0140: ..............3t.........h2-14.http/1.1.........................
0180: ................................................................
01c0: ................................................................
== 0 Info: STATE: WAITCONNECT => PROTOCONNECT handle 0x24e75d8; line 1223
(connection #0)
== 1 Info: STATE: INIT => CONNECT handle 0x24f04f8; line 1034 (connection
#-5000)
== 1 Info: Found bundle for host localhost: 0x24fe2b8
== 1 Info: Server doesn't support pipelining
== 1 Info: No connections available.
== 1 Info: STATE: CONNECT => CONNECT_PEND handle 0x24f04f8; line 1053
(connection #-5000)
== 0 Info: SSLv2, Unknown (22):
0 <= Recv SSL data, 5 bytes (0x5)
0000: ....n
== 0 Info: TLSv1.2, TLS handshake, Server hello (2):
0 <= Recv SSL data, 110 bytes (0x6e)
0000: ...j..(j.`.T.Y..R\..O.......l....>.... P...9K.}.&.>..uN..,@o....
0040: c..L..../..".............................h2-14
== 0 Info: SSLv2, Unknown (22):
0 <= Recv SSL data, 5 bytes (0x5)
0000: .....
== 0 Info: TLSv1.2, TLS handshake, CERT (11):
0 <= Recv SSL data, 1025 bytes (0x401)
0000: ..........0...0.............6...s.0...*.H........0..1.0...U....S
0040: E1.0...U....Weirdo1.0...U....Internet1.0...U....curl hackers gal
0080: ore1.0...U....Moo1.0...U....debugit1.0...*.H........foo_at_example.
00c0: com0...150425181751Z..180424181751Z0..1.0...U....SE1.0...U....We
0100: irdo1.0...U....Internet1.0...U....curl hackers galore1.0...U....
0140: Moo1.0...U....debugit1.0...*.H........foo_at_example.com0.."0...*.H
0180: .............0.........9k.-faY..`J......V.........a..?....i.9...
01c0: 0..)....B..e...:....uMF......;..Am..{g......2...C.!.f&.1z<.}....
0200: ....[+..x...........OR...V...d.or.@..fo....;(.t.T_.ne......?uO.j
0240: .nnG..zxYFv8Q...+...3.P;'.h.....JK......Z....rd..bR...3V?.qKl...
0280: ....xn..].cS....Vp.*q.......P0N0...U........X.`_.w9..:..Q...BK0.
02c0: ..U.#..0.....X.`_.w9..:..Q...BK0...U....0....0...*.H............
0300: ..I.......ExBA-..{X=.|..[.......k.E....{...q.'...E..#....[.K/O.v
0340: {g._...06..+.V7.....%n#Y:+&..%.......6.....G...$[H...Nk.....D<..
0380: ...sIx.~../..O..._a.......I#.....O.P{....M....V".<..6t...< .M'Z.
03c0: .g.......m.,"...+..Kv.M...f...x ...V3.g.'k..Q..B....Y.A.~n....&e
0400: w
== 0 Info: SSLv2, Unknown (22):
0 <= Recv SSL data, 5 bytes (0x5)
0000: .....
== 0 Info: TLSv1.2, TLS handshake, Server key exchange (12):
0 <= Recv SSL data, 413 bytes (0x19d)
0000: ............4.......4...(Cx.K}....fa.az5}..8#.....-.....A.....q5
0040: X..p........S.,....J.n.)S..6......ZI...........FY.5S..W@.1....b
0080: @.C2.........:..`}E..MC......b...R...l...a...1Se....`r|...C...).
00c0: ...?.@..#..E...n"*n.+.ql...w.vi+..m...!-.V+.).$.(.mw..b...r.\cH.
0100: L...1.....9......[..^.^t.. Q...+../.?....%.5.!.....v}....f_44...
0140: .Y6...\.>O..1~.=L...<.C...+.....i......f6h..-.gN..p.(.b.i3..UH
0180: ....h...C....D..zd:Q..D......
== 0 Info: SSLv2, Unknown (22):
0 <= Recv SSL data, 5 bytes (0x5)
0000: .....
== 0 Info: TLSv1.2, TLS handshake, Server finished (14):
0 <= Recv SSL data, 4 bytes (0x4)
0000: ....
== 0 Info: SSLv2, Unknown (22):
0 => Send SSL data, 5 bytes (0x5)
0000: .....
== 0 Info: TLSv1.2, TLS handshake, Client key exchange (16):
0 => Send SSL data, 150 bytes (0x96)
0000: ........i.........'y,A..r....W......% ..).:.9$.Lh.;...}.8..w.-l
0040: X...U.#......I.Kcv^\V........iX*.Z.h.....)..H.........N.{pJ..?[.
0080: .l....C.......Qc.c..Q.
== 0 Info: SSLv2, Unknown (20):
0 => Send SSL data, 5 bytes (0x5)
0000: .....
== 0 Info: TLSv1.2, TLS change cipher, Client hello (1):
0 => Send SSL data, 1 bytes (0x1)
0000: .
== 0 Info: SSLv2, Unknown (22):
0 => Send SSL data, 5 bytes (0x5)
0000: ....(
== 0 Info: TLSv1.2, TLS handshake, Finished (20):
0 => Send SSL data, 16 bytes (0x10)
0000: .....>.d........
== 0 Info: SSLv2, Unknown (20):
0 <= Recv SSL data, 5 bytes (0x5)
0000: .....
== 0 Info: TLSv1.2, TLS change cipher, Client hello (1):
0 <= Recv SSL data, 1 bytes (0x1)
0000: .
== 0 Info: SSLv2, Unknown (22):
0 <= Recv SSL data, 5 bytes (0x5)
0000: ....(
== 0 Info: TLSv1.2, TLS handshake, Finished (20):
0 <= Recv SSL data, 16 bytes (0x10)
0000: ..........!{hBb.
== 0 Info: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
== 0 Info: ALPN, server accepted to use h2-14
== 0 Info: Server certificate:
== 0 Info: subject: C=SE; ST=Weirdo; L=Internet; O=curl hackers galore;
OU=Moo; CN=debugit; emailAddress=foo_at_example.com
== 0 Info: start date: 2015-04-25 18:17:51 GMT
== 0 Info: expire date: 2018-04-24 18:17:51 GMT
== 0 Info: issuer: C=SE; ST=Weirdo; L=Internet; O=curl hackers galore;
OU=Moo; CN=debugit; emailAddress=foo_at_example.com
== 0 Info: SSL certificate verify result: self signed certificate (18),
continuing anyway.
== 0 Info: STATE: PROTOCONNECT => WAITDO handle 0x24e75d8; line 1241
(connection #0)
== 0 Info: WAITDO: Conn 0 send pipe 1 inuse FALSE athead TRUE
== 0 Info: STATE: WAITDO => DO handle 0x24e75d8; line 1267 (connection #0)
== 0 Info: Using HTTP2
== 0 Info: SSLv2, Unknown (23):
0 => Send SSL data, 5 bytes (0x5)
0000: ....0
== 0 Info: http2_send len=63
== 0 Info: before_frame_send() was called
== 0 Info: SSLv2, Unknown (23):
0 => Send SSL data, 5 bytes (0x5)
0000: ....!
== 0 Info: on_frame_send() was called
== 0 Info: before_frame_send() was called
== 0 Info: SSLv2, Unknown (23):
0 => Send SSL data, 5 bytes (0x5)
0000: ....5
== 0 Info: on_frame_send() was called
0 => Send header, 63 bytes (0x3f)
0000: GET /index.html HTTP/1.1
001a: Host: localhost:8443
0030: Accept: */*
003d:
== 0 Info: STATE: DO => DO_DONE handle 0x24e75d8; line 1314 (connection #0)
== 1 Info: STATE: CONNECT_PEND => CONNECT handle 0x24f04f8; line 2780
(connection #-5000)
== 0 Info: STATE: DO_DONE => WAITPERFORM handle 0x24e75d8; line 1441
(connection #0)
== 0 Info: STATE: WAITPERFORM => PERFORM handle 0x24e75d8; line 1454
(connection #0)
== 0 Info: http2_recv: 16384 bytes buffer
== 0 Info: SSLv2, Unknown (23):
0 <= Recv SSL data, 5 bytes (0x5)
0000: ....!
== 0 Info: nread=9
== 0 Info: on_frame_recv() was called with header 4
== 0 Info: nghttp2_session_mem_recv() returns 9
== 0 Info: before_frame_send() was called
== 0 Info: SSLv2, Unknown (23):
0 => Send SSL data, 5 bytes (0x5)
0000: ....!
== 0 Info: on_frame_send() was called
== 1 Info: Found bundle for host localhost: 0x24fe2b8
== 1 Info: Server doesn't support pipelining
== 1 Info: No connections available.
== 1 Info: STATE: CONNECT => CONNECT_PEND handle 0x24f04f8; line 1053
(connection #-5000)
== 0 Info: http2_recv: 16384 bytes buffer
== 0 Info: SSLv2, Unknown (23):
0 <= Recv SSL data, 5 bytes (0x5)
0000: ....!
== 0 Info: nread=9
== 0 Info: on_frame_recv() was called with header 4
== 0 Info: nghttp2_session_mem_recv() returns 9
== 0 Info: http2_recv: 16384 bytes buffer
== 0 Info: SSLv2, Unknown (23):
0 <= Recv SSL data, 5 bytes (0x5)
0000: ....1
== 0 Info: nread=25
== 0 Info: on_begin_headers() was called
== 0 Info: got http2 header: server: lock_step_transfer
== 0 Info: on_frame_recv() was called with header 1
== 0 Info: nghttp2_session_mem_recv() returns 25
== 0 Info: HTTP 2 or upgraded connection do not support pipelining for now
0 <= Recv header, 14 bytes (0xe)
0000: HTTP/2.0 200
0 <= Recv header, 27 bytes (0x1b)
0000: server:lock_step_transfer
0 <= Recv header, 2 bytes (0x2)
0000:
== 0 Info: http2_recv: 16384 bytes buffer
== 0 Info: SSLv2, Unknown (23):
0 <= Recv SSL data, 5 bytes (0x5)
0000: ....K
== 0 Info: nread=51
== 0 Info: on_data_chunk_recv() len = 42, stream = 1
== 0 Info: 42 data written
== 0 Info: on_frame_recv() was called with header 0
== 0 Info: nghttp2_session_mem_recv() returns 51
0 <= Recv data, 42 bytes (0x2a)
0000: .long line and block with ordinal number 0

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-05-03