Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moxi in mcmux mode give error if default(or behaviour) downstream pro…

…tocol is ascii

when moxi running in mcmux mode, if client want to use binary protocol between
moxi and membase, it will send B:host:port <command>, so the peer_protocol of
upstream connection will be binary but we will send still in ascii to membase since
default behaviour is ascii. When we get response from membase, we check that that
upstream connection's peer protocol is binary, so try to parse ascii response with
binary handler and it fails.

Change-Id: I26f097bc7d20a0e11c76560c8be54a9dda6b05b1
Reviewed-by: Steve Yen <>
Tested-by: Steve Yen <>
  • Loading branch information...
commit c0e094a5536ea0f3d0bc34377f8361c436fc0755 1 parent 120c83d
@nimishzynga nimishzynga authored steveyen committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 cproxy.c
8 cproxy.c
@@ -1935,8 +1935,12 @@ bool cproxy_forward(downstream *d) {
if (IS_ASCII(d->upstream_conn->protocol)) {
// ASCII upstream.
- if (IS_ASCII(d->upstream_conn->peer_protocol) ||
- IS_ASCII(d->ptd->behavior_pool.base.downstream_protocol)) {
+ unsigned int peer_protocol =
+ d->upstream_conn->peer_protocol ?
+ d->upstream_conn->peer_protocol :
+ d->ptd->behavior_pool.base.downstream_protocol;
+ if (IS_ASCII(peer_protocol)) {
return cproxy_forward_a2a_downstream(d);
} else {
return cproxy_forward_a2b_downstream(d);
Please sign in to comment.
Something went wrong with that request. Please try again.