summaryrefslogtreecommitdiff
path: root/proxy.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2023-04-03 14:30:15 -0700
committerdormando <dormando@rydia.net>2023-04-03 14:30:15 -0700
commit41be027140ac4c42564e472178e88ed149570fbd (patch)
treea83254d24586705bfb4c408ac488e189a67f997f /proxy.h
parent8f9a2e653dedcabd7f1932e73e73e15c940f3d92 (diff)
downloadmemcached-41be027140ac4c42564e472178e88ed149570fbd.tar.gz
proxy: send CLIENT_ERROR when necessarystaging
A few code paths were returning SERVER_ERROR (a retryable error) when it should have been CLIENT_ERROR (bad protocol syntax).
Diffstat (limited to 'proxy.h')
-rw-r--r--proxy.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/proxy.h b/proxy.h
index 87f2b7e..8b5cd37 100644
--- a/proxy.h
+++ b/proxy.h
@@ -554,7 +554,9 @@ void mcp_request_attach(lua_State *L, mcp_request_t *rq, io_pending_proxy_t *p);
int mcp_request_render(mcp_request_t *rq, int idx, const char *tok, size_t len);
void proxy_lua_error(lua_State *L, const char *s);
void proxy_lua_ferror(lua_State *L, const char *fmt, ...);
-void proxy_out_errstring(mc_resp *resp, const char *str);
+#define PROXY_SERVER_ERROR "SERVER_ERROR "
+#define PROXY_CLIENT_ERROR "CLIENT_ERROR "
+void proxy_out_errstring(mc_resp *resp, char *type, const char *str);
int _start_proxy_config_threads(proxy_ctx_t *ctx);
int proxy_thread_loadconf(proxy_ctx_t *ctx, LIBEVENT_THREAD *thr);