http2简单的get请求报错absolutely wrong message
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Describe the bug (描述bug)**
http2 简单的get请求报错
**To Reproduce (复现方法)**
1、编译master版本example下的http_c++
2、运行命令 ./http_client --http_verbose=1 --protocol=h2 https://fapi.binance.com/fapi/v1/time
3、即使代码里加上options.mutable_ssl_options();也一样报错
root@tomo6:/home/ubuntu/brpc/example/http_c++# ./http_client --http_verbose=1 --protocol=h2 https://fapi.binance.com/fapi/v1/time
I0713 02:00:56.035332 3436 src/brpc/policy/http2_rpc_protocol.cpp:1800]
[ H2 REQUEST @172.31.9.191 ]
> :method = GET
> :scheme = https
> :path = /fapi/v1/time
> :authority = fapi.binance.com
> accept = */*
> user-agent = brpc/1.0 curl/7.0
E0713 02:00:56.040389 3444 src/brpc/policy/http2_rpc_protocol.cpp:450] Too large frame length=4740180 max=16384
W0713 02:00:56.040512 3444 src/brpc/input_messenger.cpp:247] Close Socket{id=1 fd=3 addr=54.178.200.31:443:53516} (0x563cd6665800): absolutely wrong message
[E22]Close Socket{id=1 fd=3 addr=54.178.200.31:443:53516} (0x0x563cd6665800): absolutely wrong message
**Expected behavior (期望行为)**
正常返回{"serverTime":1689213610168},和去掉protocol=h2一样
**Versions (各种版本)**
OS: ubuntu 20.4
Compiler:gcc g++
brpc:-DBRPC_REVISION=\"1.5.0\|master\|af899d7b\|2023-07-10T13:06:03+08:00\"
protobuf:
**Additional context/screenshots (更多上下文/截图)**
Contributor guide
Research direction
Build the master version of example/http_c++ and reproduce the request with --protocol=h2 and --http_verbose=1. Start at src/brpc/policy/http2_rpc_protocol.cpp:450 and compare the HTTP/2 frame handling with the logged request; done means the Binance endpoint returns its serverTime JSON without the “absolutely wrong message” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100