From 3accb9990bf57161efde3c35e65afa011cf06e47 Mon Sep 17 00:00:00 2001 From: cantor Date: Sun, 20 Jun 2010 17:31:29 +0000 Subject: [PATCH] Add GetLastError call when client read fails. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3263 cb58f699-b61c-0410-a6fe-9272a202ed29 --- isapi_shib/isapi_shib.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/isapi_shib/isapi_shib.cpp b/isapi_shib/isapi_shib.cpp index 58bc86b..9fcecea 100644 --- a/isapi_shib/isapi_shib.cpp +++ b/isapi_shib/isapi_shib.cpp @@ -870,8 +870,11 @@ public: while (datalen) { DWORD buflen=8192; BOOL ret = m_lpECB->ReadClient(m_lpECB->ConnID, buf, &buflen); - if (!ret) - throw IOException("Error reading request body from browser."); + if (!ret) { + char message[65]; + _snprintf(message, 64, "Error reading request body from browser (%x).", GetLastError()); + throw IOException(message); + } else if (!buflen) throw IOException("Socket closed while reading request body from browser."); m_body.append(buf, buflen); -- 2.1.4