BUG/MEDIUM: lua: the Lua process is not waked up after sending data on requests side

If we are writing in the request buffer, we are not waked up
when the data are forwarded because it is useles. The request
analyzers are waked up only when data is incoming. So, if the
request buffer is full, we set the WAKE_ON_WRITE flag.
diff --git a/src/hlua.c b/src/hlua.c
index 0e1df42..7f937f7 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2238,7 +2238,9 @@
 		 */
 		if (chn->chn == chn->s->rep)
 			HLUA_SET_WAKERESWR(hlua);
-		WILL_LJMP(hlua_yieldk(L, 0, 0, _hlua_channel_send, TICK_ETERNITY, 0));
+		else
+			HLUA_SET_WAKEREQWR(hlua);
+		WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_send_yield, TICK_ETERNITY, 0));
 	}
 
 	return 1;
@@ -2298,6 +2300,8 @@
 		 */
 		if (chn->chn == chn->s->rep)
 			HLUA_SET_WAKERESWR(hlua);
+		else
+			HLUA_SET_WAKEREQWR(hlua);
 
 		/* Otherwise, we can yield waiting for new data in the inpout side. */
 		WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_forward_yield, TICK_ETERNITY, 0));
@@ -3269,6 +3273,8 @@
 			if ((analyzer & (AN_REQ_INSPECT_FE|AN_REQ_HTTP_PROCESS_FE)))
 				s->rep->analysers |= analyzer;
 		}
+		if (HLUA_IS_WAKEREQWR(&s->hlua))
+			s->req->flags |= CF_WAKE_WRITE;
 		return 0;
 
 	/* finished with error. */