* released 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.
This commit is contained in:
willy tarreau 2005-12-17 14:13:08 +01:00
parent c1cae63922
commit c58fc6943d
2 changed files with 29 additions and 7 deletions

View File

@ -1,6 +1,12 @@
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.

View File

@ -53,8 +53,8 @@
#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
@ -2464,6 +2464,16 @@ int process_cli(struct session *t) {
* 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;
}
@ -2845,8 +2855,8 @@ int process_cli(struct session *t) {
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);
@ -2857,10 +2867,16 @@ int process_cli(struct session *t) {
/* 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);
}
}