① 请求报文就是几行文本:
'GET /help HTTP/1.1\r\nHost: 127.0.0.1:56718\r\nUser-Agent: k6-demo\r\nAccept: text/plain\r\n\r\n'
--- ② 响应 200(注意 Content-Length 按字节计)
HTTP/1.1 200 OK
Server: BaseHTTP/0.6 Python/3.12.14
Date: Wed, 14 Oct 2026 23:54:57 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 51
ETag: "76b90d86b0742cc0"
[body] b'\xe6\x98\x9f\xe6\xb2\xb3\xe7\xac\x94\xe8\xae\xb0\xe5\xb8\xae\xe5\x8a\xa9\xef\xbc\x9a7 \xe5\xa4\xa9\xe5\x86\x85\xe5\x8f\xaf\xe6\x97\xa0\xe7\x90\x86\xe7\x94\xb1\xe9\x80\x80\xe6\xac\xbe\xe3\x80\x82\n'
中文正文字符数 19 ,字节数 51
--- ③ 同一 TCP 连接上的第二个请求:带 If-None-Match → 304,无正文
HTTP/1.1 304 Not Modified
Server: BaseHTTP/0.6 Python/3.12.14
Date: Wed, 14 Oct 2026 23:54:57 GMT
ETag: "76b90d86b0742cc0"
--- ④ 不存在的路径 → 404
HTTP/1.1 404 Not Found
Server: BaseHTTP/0.6 Python/3.12.14
Date: Wed, 14 Oct 2026 23:54:57 GMT
Content-Type: application/json
Content-Length: 21
[body] b'{"error":"not found"}'
--- ⑤ 分块传输(本客户端按 HTTP 边界读取,而非假设一次 recv 收全)
HTTP/1.1 200 OK
Server: BaseHTTP/0.6 Python/3.12.14
Date: Wed, 14 Oct 2026 23:54:57 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
[body] b'6\r\n\xe4\xbd\xa0\xe5\xa5\xbd\r\n3\r\n\xef\xbc\x8c\r\n6\r\n\xe6\x88\x91\xe6\x98\xaf\r\n6\r\n\xe5\xae\xa2\xe6\x9c\x8d\r\n0\r\n\r\n'
完整流接收耗时(ms,非逐块到达时刻): 202
--- ⑥ 未实现的方法
HTTP/1.1 501 Unsupported method ('BREW')
核验记录:09-本次运行.txt
与教程配套的原始示例或核验资料,保留完整内容;其中真实用户目录已脱敏,运行范围以记录本身为准。