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
0a000b46
Commit
0a000b46
authored
Sep 27, 2018
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary code
parent
3799ed32
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
15 deletions
+4
-15
.gitignore
.gitignore
+1
-0
controller_private_accessor.h
src/brpc/details/controller_private_accessor.h
+0
-1
options.proto.rej
src/brpc/options.proto.rej
+0
-9
http_rpc_protocol.cpp
src/brpc/policy/http_rpc_protocol.cpp
+3
-3
socket.h
src/brpc/socket.h
+0
-2
No files found.
.gitignore
View file @
0a000b46
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
*.prof
*.prof
*.so
*.so
*.dylib
*.dylib
*.rej
/output
/output
/test/output
/test/output
...
...
src/brpc/details/controller_private_accessor.h
View file @
0a000b46
...
@@ -100,7 +100,6 @@ public:
...
@@ -100,7 +100,6 @@ public:
_cntl
->
_request_protocol
=
protocol
;
_cntl
->
_request_protocol
=
protocol
;
return
*
this
;
return
*
this
;
}
}
ProtocolType
request_protocol
()
{
return
_cntl
->
_request_protocol
;
}
Span
*
span
()
const
{
return
_cntl
->
_span
;
}
Span
*
span
()
const
{
return
_cntl
->
_span
;
}
...
...
src/brpc/options.proto.rej
deleted
100644 → 0
View file @
3799ed32
diff a/src/brpc/options.proto b/src/brpc/options.proto (rejected hunks)
@@ -53,6 +53,7 @@ enum ProtocolType {
// Reserve special protocol for cds-agent, which depends on FIFO right now
PROTOCOL_CDS_AGENT = 23; // Client side only
PROTOCOL_ESP = 24; // Client side only
+ PROTOCOL_HTTP2 = 25;
}
message ChunkInfo {
src/brpc/policy/http_rpc_protocol.cpp
View file @
0a000b46
...
@@ -280,7 +280,7 @@ void ProcessHttpResponse(InputMessageBase* msg) {
...
@@ -280,7 +280,7 @@ void ProcessHttpResponse(InputMessageBase* msg) {
res_body
.
cut1
(
&
grpc_compressed
);
res_body
.
cut1
(
&
grpc_compressed
);
res_body
.
cutn
(
buf
,
4
);
res_body
.
cutn
(
buf
,
4
);
int
message_length
=
ReadBigEndian4Bytes
(
buf
);
int
message_length
=
ReadBigEndian4Bytes
(
buf
);
CHECK
(
message_length
==
res_body
.
length
())
<<
message_length
CHECK
(
(
size_t
)
message_length
==
res_body
.
length
())
<<
message_length
<<
" vs "
<<
res_body
.
length
();
<<
" vs "
<<
res_body
.
length
();
}
}
...
@@ -531,7 +531,7 @@ void SerializeHttpRequest(butil::IOBuf* /*not used*/,
...
@@ -531,7 +531,7 @@ void SerializeHttpRequest(butil::IOBuf* /*not used*/,
butil
::
IOBuf
compressed
;
butil
::
IOBuf
compressed
;
if
(
GzipCompress
(
cntl
->
request_attachment
(),
&
compressed
,
NULL
))
{
if
(
GzipCompress
(
cntl
->
request_attachment
(),
&
compressed
,
NULL
))
{
cntl
->
request_attachment
().
swap
(
compressed
);
cntl
->
request_attachment
().
swap
(
compressed
);
if
(
accessor
.
request_protocol
()
==
PROTOCOL_GRPC
)
{
if
(
cntl
->
request_protocol
()
==
PROTOCOL_GRPC
)
{
grpc_compressed
=
true
;
grpc_compressed
=
true
;
cntl
->
http_request
().
SetHeader
(
common
->
GRPC_ENCODING
,
common
->
GZIP
);
cntl
->
http_request
().
SetHeader
(
common
->
GRPC_ENCODING
,
common
->
GZIP
);
}
else
{
}
else
{
...
@@ -563,7 +563,7 @@ void SerializeHttpRequest(butil::IOBuf* /*not used*/,
...
@@ -563,7 +563,7 @@ void SerializeHttpRequest(butil::IOBuf* /*not used*/,
cntl
->
set_stream_creator
(
get_h2_global_stream_creator
());
cntl
->
set_stream_creator
(
get_h2_global_stream_creator
());
}
}
if
(
accessor
.
request_protocol
()
==
PROTOCOL_GRPC
)
{
if
(
cntl
->
request_protocol
()
==
PROTOCOL_GRPC
)
{
// always tell client gzip support
// always tell client gzip support
// TODO(zhujiashun): add zlib and snappy?
// TODO(zhujiashun): add zlib and snappy?
header
->
SetHeader
(
common
->
GRPC_ACCEPT_ENCODING
,
header
->
SetHeader
(
common
->
GRPC_ACCEPT_ENCODING
,
...
...
src/brpc/socket.h
View file @
0a000b46
...
@@ -783,8 +783,6 @@ private:
...
@@ -783,8 +783,6 @@ private:
butil
::
Mutex
_stream_mutex
;
butil
::
Mutex
_stream_mutex
;
std
::
set
<
StreamId
>
*
_stream_set
;
std
::
set
<
StreamId
>
*
_stream_set
;
SocketUniquePtr
_agent_socket
;
};
};
}
// namespace brpc
}
// namespace brpc
...
...
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