happend with non-persistent PUT connections that had a very short
body. If the whole body was read from the client before the
connection to the server was set up, the event callback was not
called. Do the regular checks after relay_connect() succeeded.
OK reyk@
-/* $OpenBSD: relay_http.c,v 1.32 2014/07/17 11:35:26 stsp Exp $ */
+/* $OpenBSD: relay_http.c,v 1.33 2014/08/10 21:55:17 bluhm Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
relay_bindanyreq(con, 0, IPPROTO_TCP);
return;
}
- if (relay_connect(con) == -1)
+ if (relay_connect(con) == -1) {
relay_abort_http(con, 502, "session failed", 0);
- return;
+ return;
+ }
}
}
if (con->se_done) {