Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
f44946bd
Commit
f44946bd
authored
8 years ago
by
Makarand Dharmapurikar
Browse files
Options
Downloads
Patches
Plain Diff
fixes for asan leak, and proxy test
freeing up payload_bytes. returning GET response only once.
parent
d322d4b3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/lib/channel/http_client_filter.c
+3
-6
3 additions, 6 deletions
src/core/lib/channel/http_client_filter.c
src/core/lib/channel/http_server_filter.c
+7
-1
7 additions, 1 deletion
src/core/lib/channel/http_server_filter.c
with
10 additions
and
7 deletions
src/core/lib/channel/http_client_filter.c
+
3
−
6
View file @
f44946bd
...
...
@@ -153,7 +153,7 @@ static void hc_mutate_op(grpc_call_element *elem,
/* Decide which HTTP VERB to use */
grpc_mdelem
*
method
=
GRPC_MDELEM_METHOD_POST
;
if
((
op
->
send_initial_metadata_flags
&
if
(
op
->
send_initial_metadata
!=
NULL
&&
(
op
->
send_initial_metadata_flags
&
GRPC_INITIAL_METADATA_CACHEABLE_REQUEST
)
&&
op
->
send_message
!=
NULL
&&
op
->
send_message
->
length
<
channeld
->
max_payload_size_for_get
)
{
...
...
@@ -189,6 +189,8 @@ static void hc_mutate_op(grpc_call_element *elem,
break
;
}
}
calld
->
on_complete
=
op
->
on_complete
;
op
->
on_complete
=
&
calld
->
hc_on_complete
;
op
->
send_message
=
NULL
;
}
...
...
@@ -216,11 +218,6 @@ static void hc_mutate_op(grpc_call_element *elem,
calld
->
on_done_recv
=
op
->
recv_initial_metadata_ready
;
op
->
recv_initial_metadata_ready
=
&
calld
->
hc_on_recv
;
}
if
(
op
->
on_complete
!=
NULL
&&
op
->
send_message
!=
NULL
)
{
calld
->
on_complete
=
op
->
on_complete
;
op
->
on_complete
=
&
calld
->
hc_on_complete
;
}
}
static
void
hc_start_transport_op
(
grpc_exec_ctx
*
exec_ctx
,
...
...
This diff is collapsed.
Click to expand it.
src/core/lib/channel/http_server_filter.c
+
7
−
1
View file @
f44946bd
...
...
@@ -53,6 +53,9 @@ typedef struct call_data {
grpc_linked_mdelem
status
;
grpc_linked_mdelem
content_type
;
/* flag to ensure payload_bin is delivered only once */
uint8_t
payload_bin_delivered
;
grpc_metadata_batch
*
recv_initial_metadata
;
bool
*
recv_idempotent_request
;
bool
*
recv_cacheable_request
;
...
...
@@ -221,10 +224,13 @@ static void hs_on_complete(grpc_exec_ctx *exec_ctx, void *user_data,
call_data
*
calld
=
elem
->
call_data
;
/* Call recv_message_ready if we got the payload via the header field */
if
(
calld
->
seen_payload_bin
&&
calld
->
recv_message_ready
!=
NULL
)
{
*
calld
->
pp_recv_message
=
(
grpc_byte_stream
*
)
&
calld
->
read_stream
;
*
calld
->
pp_recv_message
=
calld
->
payload_bin_delivered
?
NULL
:
(
grpc_byte_stream
*
)
&
calld
->
read_stream
;
calld
->
recv_message_ready
->
cb
(
exec_ctx
,
calld
->
recv_message_ready
->
cb_arg
,
err
);
calld
->
recv_message_ready
=
NULL
;
calld
->
payload_bin_delivered
=
true
;
}
calld
->
on_complete
->
cb
(
exec_ctx
,
calld
->
on_complete
->
cb_arg
,
err
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment