ChangeLog :
===========
+2003/10/22 : 1.1.26
+ - the fix introduced in 1.1.25 for client timeouts while waiting for servers
+ broke almost all compatibility with POST requests, because the proxy
+ stopped to read anything from the client as soon as it got all of its
+ headers.
+
2003/10/15 : 1.1.25
- added the 'tcplog' option, which provides enhanced, HTTP-like logs for
generic TCP proxies, or lighter logs for HTTP proxies.
#include <linux/netfilter_ipv4.h>
#endif
-#define HAPROXY_VERSION "1.1.25"
-#define HAPROXY_DATE "2003/10/15"
+#define HAPROXY_VERSION "1.1.26"
+#define HAPROXY_DATE "2003/10/22"
/* this is for libc5 for example */
#ifndef TCP_NODELAY
* data state which will save one schedule.
*/
//break;
+
+ if (!t->proxy->clitimeout ||
+ (t->srv_state < SV_STDATA && t->proxy->srvtimeout))
+ /* If the client has no timeout, or if the server is not ready yet,
+ * and we know for sure that it can expire, then it's cleaner to
+ * disable the timeout on the client side so that too low values
+ * cannot make the sessions abort too early.
+ */
+ tv_eternity(&t->crexpire);
+
goto process_data;
}
return 1;
}
- if (req->l >= req->rlim - req->data || t->srv_state < SV_STDATA) {
- /* no room to read more data, or server not ready yet */
+ if (req->l >= req->rlim - req->data) {
+ /* no room to read more data */
if (FD_ISSET(t->cli_fd, StaticReadEvent)) {
/* stop reading until we get some space */
FD_CLR(t->cli_fd, StaticReadEvent);
/* there's still some space in the buffer */
if (! FD_ISSET(t->cli_fd, StaticReadEvent)) {
FD_SET(t->cli_fd, StaticReadEvent);
- if (t->proxy->clitimeout)
- tv_delayfrom(&t->crexpire, &now, t->proxy->clitimeout);
- else
+ if (!t->proxy->clitimeout ||
+ (t->srv_state < SV_STDATA && t->proxy->srvtimeout))
+ /* If the client has no timeout, or if the server not ready yet, and we
+ * know for sure that it can expire, then it's cleaner to disable the
+ * timeout on the client side so that too low values cannot make the
+ * sessions abort too early.
+ */
tv_eternity(&t->crexpire);
+ else
+ tv_delayfrom(&t->crexpire, &now, t->proxy->clitimeout);
}
}