HttpSendRequestEx without knowing postsize



Hi,

I would like to know if it's possible to do a HttpSendRequestEx with an unknown size ?
All the sample code I 've seen fill the dwBufferTotal but in my class hierarchy I don't know yet the size to be posted.

My question is can I put dwBufferTotal to 0 ?






INTERNET_BUFFERS BufferIn;
memset(&BufferIn, 0, sizeof(BufferIn));
BufferIn.dwStructSize = sizeof( INTERNET_BUFFERS ); // Must be set or error will occur
BufferIn.Next = NULL;
BufferIn.lpcszHeader = (LPCTSTR)sHeaders.c_str();
BufferIn.dwHeadersLength = sHeaders.size();
BufferIn.dwHeadersTotal = sHeaders.size();
BufferIn.lpvBuffer = 0;
BufferIn.dwBufferLength = 0;
BufferIn.dwBufferTotal = m_Stream.m_dwDataLen;
BufferIn.dwOffsetLow = 0;
BufferIn.dwOffsetHigh = 0;

bRet = ::HttpSendRequestEx(m_hRequest, &BufferIn, NULL, 0, 0);
.