diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-11-13 17:12:57 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-11-13 17:16:38 +0100 |
commit | 7439155029db1c0273b4a034f1ab6532aa74e1cb (patch) | |
tree | 2a62b07ceed382b44862d7460999964bd9a1b996 /src/libwaitress | |
parent | 19c81bb9fa9209a24ccf3d8c6843cd37a8120a1e (diff) | |
download | pianobar-7439155029db1c0273b4a034f1ab6532aa74e1cb.tar.gz pianobar-7439155029db1c0273b4a034f1ab6532aa74e1cb.tar.bz2 pianobar-7439155029db1c0273b4a034f1ab6532aa74e1cb.zip |
waitress: Check return code for proxy CONNECT writes
Diffstat (limited to 'src/libwaitress')
-rw-r--r-- | src/libwaitress/waitress.c | 6 |
1 files 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) { |