proxy: Fix a read corruption issue caused by us failing to reset needles on timeout

This commit is contained in:
nick
2014-02-11 20:43:44 +00:00
parent 175f19b3e7
commit 0baf93fd7b

View File

@@ -797,6 +797,13 @@ void proxy_session( struct proxier* proxy )
proxy_session_state_names[state] proxy_session_state_names[state]
); );
state = CONNECT_TO_UPSTREAM; state = CONNECT_TO_UPSTREAM;
/* Since we've timed out, we won't have gone through the timeout logic
* in the various state handlers that resets these appropriately... */
proxy->init.size = 0;
proxy->init.needle = 0;
proxy->rsp.size = 0;
proxy->rsp.needle = 0;
} }
} }
} }