From 7439155029db1c0273b4a034f1ab6532aa74e1cb Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 13 Nov 2011 17:12:57 +0100 Subject: waitress: Check return code for proxy CONNECT writes --- src/libwaitress/waitress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c index a43c81e..d3487c8 100644 --- a/src/libwaitress/waitress.c +++ b/src/libwaitress/waitress.c @@ -822,15 +822,15 @@ static WaitressReturn_t WaitressConnect (WaitressHandle_t *waith) { snprintf (buf, sizeof (buf), "CONNECT %s:%s HTTP/" WAITRESS_HTTP_VERSION "\r\n", waith->url.host, WaitressDefaultPort (&waith->url)); - waith->request.write (waith, buf, strlen (buf)); + WRITE_RET (buf, strlen (buf)); /* write authorization headers */ if (WaitressFormatAuthorization (waith, &waith->proxy, "Proxy-", buf, WAITRESS_BUFFER_SIZE)) { - waith->request.write (waith, buf, strlen (buf)); + WRITE_RET (buf, strlen (buf)); } - waith->request.write (waith, "\r\n", 2); + WRITE_RET ("\r\n", 2); if ((wRet = WaitressReceiveHeaders (waith, &size)) != WAITRESS_RET_OK) { -- cgit v1.2.3