HTTP server returning multiple early hints shows too many responses in "Follow HTTP Stream"
Summary
http server returning multiple early hints shows too many responses in "Follow http". When the server returns only one early hint, the view seems fine. Returning multiple early hints is allowed by the spec: https://datatracker.ietf.org/doc/html/rfc8297#section-2
A server MAY emit multiple 103 (Early Hints) responses
Steps to reproduce
- Capture Localhost
- Run this "http"-server:
#!/usr/bin/env python3
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("127.0.0.1", 9000))
s.listen()
while True:
c, addr = s.accept()
body = """\
<!DOCTYPE html>
<html>
<body>
Hello World
</body>
</html>
"""
resp = f"""\
HTTP/1.1 103 Early Hint\r\n\
Link: </hint-a.png>; rel=preload; as=image\r\n\
\r\n\
HTTP/1.1 103 Early Hint\r\n\
Link: </hint-b.png>; rel=preload; as=image\r\n\
\r\n\
HTTP/1.1 200 OK\r\n\
Content-Type: text/html;charset=utf-8\r\n\
Cache-Control: no-cache\r\n\
Content-Length: {len(body)}\r\n\
\r\n\
{body}
"""
c.send(resp.encode())
c.close()
- run
curl 127.0.0.1:9000
- click on follow > TCP Stream (of one packet) and see two early hint responses
- click on follow > HTTP Steam (of one packet)
What is the current bug behavior?
In the HTTP stream view more than 103 Early Hints
responses are displayed
What is the expected correct behavior?
The correct amount of early hints.
Sample capture file
(If possible attach a sample capture file showing this issue) earlyhint.pcapng
Relevant logs and/or screenshots
Screenshot http follow mode with too many early hints displayed:
Build information
3.6.2 (Git commit 626020d9b3c3)
Compiled (64-bit) using GCC 11.1.0, with Qt 5.15.2, with libpcap, with POSIX
capabilities (Linux), with libnl 3, with GLib 2.70.3, with zlib 1.2.11, with Lua
5.2.4, with GnuTLS 3.7.3 and PKCS #11 support, with Gcrypt 1.9.4-unknown, with
MIT Kerberos, with MaxMind DB resolver, with nghttp2 1.46.0, with brotli, with
LZ4, with Zstandard, with Snappy, with libxml2 2.9.12, without libsmi, with
QtMultimedia, without automatic updates, with SpeexDSP (using system library),
with Minizip.
Running on Linux 5.16.13-arch1-1, with Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
(with SSE4.2), with 31746 MB of physical memory, with GLib 2.70.4, with zlib
1.2.11, with Qt 5.15.3, with libpcap 1.10.1 (with TPACKET_V3), with c-ares
1.18.1, with GnuTLS 3.7.3, with Gcrypt 1.9.4-unknown, with nghttp2 1.47.0, with
brotli 1.0.9, with LZ4 1.9.3, with Zstandard 1.5.2, with light display mode,
without HiDPI, with LC_TYPE=en_DK.UTF-8, binary plugins supported (20 loaded).
Edited by Gerald Combs