X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=isapi_shib%2Fisapi_shib.cpp;h=73fb7a0106259f2f31953d5f3c9809ebe7be7ba2;hb=cd2d04ee7aff08a37498fcc7ca61f35dfd5ef81e;hp=d4d06bd3a07ed91bec09995b74d54dc1de92dc6b;hpb=7b9e8d3c9d432f1242dd23b285b63d27167db9d4;p=shibboleth%2Fcpp-sp.git diff --git a/isapi_shib/isapi_shib.cpp b/isapi_shib/isapi_shib.cpp index d4d06bd..73fb7a0 100644 --- a/isapi_shib/isapi_shib.cpp +++ b/isapi_shib/isapi_shib.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -800,8 +800,12 @@ public: throw opensaml::SecurityPolicyException("Size of request body exceeded 1M size limit."); else if (m_lpECB->cbTotalBytes > m_lpECB->cbAvailable) { m_gotBody=true; - char buf[8192]; DWORD datalen=m_lpECB->cbTotalBytes; + if (m_lpECB->cbAvailable > 0) { + m_body.assign(reinterpret_cast(m_lpECB->lpbData),m_lpECB->cbAvailable); + datalen-=m_lpECB->cbAvailable; + } + char buf[8192]; while (datalen) { DWORD buflen=8192; BOOL ret = m_lpECB->ReadClient(m_lpECB->ConnID, buf, &buflen);