Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
7a0d45a3
Commit
7a0d45a3
authored
Sep 11, 2018
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rebase http2
parent
e20c4ef6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
8 deletions
+4
-8
controller_private_accessor.h
src/brpc/details/controller_private_accessor.h
+0
-1
http2.h
src/brpc/http2.h
+0
-2
http2_rpc_protocol.cpp
src/brpc/policy/http2_rpc_protocol.cpp
+3
-4
http_rpc_protocol.cpp
src/brpc/policy/http_rpc_protocol.cpp
+1
-1
No files found.
src/brpc/details/controller_private_accessor.h
View file @
7a0d45a3
...
...
@@ -96,7 +96,6 @@ public:
_cntl
->
_request_protocol
=
protocol
;
return
*
this
;
}
ProtocolType
request_protocol
()
{
return
_cntl
->
_request_protocol
;
}
Span
*
span
()
const
{
return
_cntl
->
_span
;
}
...
...
src/brpc/http2.h
View file @
7a0d45a3
...
...
@@ -22,7 +22,6 @@
namespace
brpc
{
struct
H2Settings
{
// Allows the sender to inform the remote endpoint of the maximum size of
// the header compression table used to decode header blocks, in octets.
...
...
@@ -123,7 +122,6 @@ enum H2Error {
const
char
*
H2ErrorToString
(
H2Error
e
);
}
// namespace brpc
#endif // BAIDU_RPC_HTTP2_H
src/brpc/policy/http2_rpc_protocol.cpp
View file @
7a0d45a3
...
...
@@ -1491,7 +1491,7 @@ void H2UnsentRequest::Describe(butil::IOBuf* desc) const {
size_t
nskipped
=
body
->
size
()
-
(
size_t
)
FLAGS_http_verbose_max_body_length
;
body
->
append_to
(
desc
,
FLAGS_http_verbose_max_body_length
);
if
(
nskipped
)
{
char
str
[
32
];
char
str
[
48
];
snprintf
(
str
,
sizeof
(
str
),
"
\n
<skipped %"
PRIu64
" bytes>"
,
nskipped
);
desc
->
append
(
str
);
}
...
...
@@ -1615,7 +1615,7 @@ void H2UnsentResponse::Describe(butil::IOBuf* desc) const {
size_t
nskipped
=
_data
.
size
()
-
(
size_t
)
FLAGS_http_verbose_max_body_length
;
_data
.
append_to
(
desc
,
FLAGS_http_verbose_max_body_length
);
if
(
nskipped
)
{
char
str
[
32
];
char
str
[
48
];
snprintf
(
str
,
sizeof
(
str
),
"
\n
<skipped %"
PRIu64
" bytes>"
,
nskipped
);
desc
->
append
(
str
);
}
...
...
@@ -1649,6 +1649,7 @@ void PackH2Request(butil::IOBuf*,
static_cast
<
H2UnsentRequest
*>
(
cntl
->
stream_creator
())
->
RemoveRefManually
();
}
cntl
->
set_stream_creator
(
h2_req
);
h2_req
->
AddRefManually
();
*
user_message
=
h2_req
;
...
...
@@ -1682,8 +1683,6 @@ void H2GlobalStreamCreator::ReplaceSocketForStream(
SocketId
sid
;
SocketOptions
opt
=
(
*
inout
)
->
_options
;
// Only main socket can be the owner of ssl_ctx
opt
.
owns_ssl_ctx
=
false
;
opt
.
health_check_interval_s
=
-
1
;
// TODO(zhujiashun): Predictively create socket to improve performance
if
(
get_client_side_messenger
()
->
Create
(
opt
,
&
sid
)
!=
0
)
{
...
...
src/brpc/policy/http_rpc_protocol.cpp
View file @
7a0d45a3
...
...
@@ -466,7 +466,7 @@ void SerializeHttpRequest(butil::IOBuf* /*not used*/,
header
->
SetHeader
(
common
->
CONNECTION
,
common
->
KEEP_ALIVE
);
}
if
(
accessor
.
request_protocol
()
==
PROTOCOL_HTTP2
)
{
if
(
cntl
->
request_protocol
()
==
PROTOCOL_HTTP2
)
{
cntl
->
set_stream_creator
(
get_h2_global_stream_creator
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment